integ/kernel/kernel-rt/centos/patches/memblock-introduce-memblock_alloc_range.patch
Martin, Chen 3de433a3b1 rebase rt kernel patch to CentOS7.6 3.10.0-957.1.3
timer-Reduce-timer-migration-overhead-if-disabled.patch
timer-Minimize-nohz-off-overhead.patch
two patches already included in upgraded kernel
remove description in meta patch.

fix compile error in drbd_req.c for improper usage of
request queue API; fix warning in kernel/bpf/core.c
for implicit declaration trace call for CFLAG
-Werror-implicit-function-declaration.

remove patch change is_swiotlb_buffer in lib/swiotlb.c
As change already in new kernel code.

explicitly disable three config, CONFIG_TORTURE_TEST=n,
CONFIG_RCU_TORTURE_TEST=n, CONFIG_LOCK_TORTURE_TEST=n.
As torture.c, locktorture.c, rcutorture.c are introduced
by new kernel release, which request CONFIG_PERCPU_RWSEM
be enabled. But config file generated by merge
kernel-3.10.0-x86_64-rt.config in source rpm and
kernel-3.10.0-x86_64-rt.config.tis_extra in meta_patch,
disable CONFIG_PERCPU_RWSEM, which makes build error
with "undefined symbol". These three file are built to
generate one module for one upper layer torture test
tool, so explicitly disable these config.

Depends-On: https://review.openstack.org/625773/
Story: 2004521
Task: 28352

Change-Id: I0f7e7db51aa38e98eae1219196a926ed8fc1b152
Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2019-01-22 20:23:07 +08:00

97 lines
3.8 KiB
Diff

From ea38fcef34645b2220eadad6c862d5884c48026d Mon Sep 17 00:00:00 2001
Message-Id: <ea38fcef34645b2220eadad6c862d5884c48026d.1528226387.git.Jim.Somerville@windriver.com>
In-Reply-To: <c8270e79f6b7008fde44b8d5aa6314d8cf89d3ed.1528226387.git.Jim.Somerville@windriver.com>
References: <c8270e79f6b7008fde44b8d5aa6314d8cf89d3ed.1528226387.git.Jim.Somerville@windriver.com>
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Tue, 31 May 2016 16:07:55 -0400
Subject: [PATCH 10/32] memblock: introduce memblock_alloc_range()
Commit 2bfc2862c4fe38379a2fb2cfba33fad32ccb4ff4 upstream
Backported-by: Nam Ninh <nam.ninh@windriver.com>
This introduces memblock_alloc_range() which allocates memblock from the
specified range of physical address. I would like to use this function
to specify the location of CMA.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Don Dutile <ddutile@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
include/linux/memblock.h | 2 ++
mm/memblock.c | 22 ++++++++++++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 5a439c9..d6bcbef 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -306,6 +306,8 @@ static inline bool memblock_bottom_up(void) { return false; }
#define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0)
#define MEMBLOCK_ALLOC_ACCESSIBLE 0
+phys_addr_t __init memblock_alloc_range(phys_addr_t size, phys_addr_t align,
+ phys_addr_t start, phys_addr_t end);
phys_addr_t memblock_alloc_base(phys_addr_t size, phys_addr_t align,
phys_addr_t max_addr);
phys_addr_t __memblock_alloc_base(phys_addr_t size, phys_addr_t align,
diff --git a/mm/memblock.c b/mm/memblock.c
index fbc8071..ff910a4 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1120,9 +1120,9 @@ int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size,
}
#endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
-static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size,
- phys_addr_t align, phys_addr_t max_addr,
- int nid, ulong flags)
+static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
+ phys_addr_t align, phys_addr_t start,
+ phys_addr_t end, int nid, ulong flags)
{
phys_addr_t found;
@@ -1132,7 +1132,7 @@ static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size,
/* align @size to avoid excessive fragmentation on reserved array */
size = round_up(size, align);
- found = memblock_find_in_range_node(size, align, 0, max_addr, nid,
+ found = memblock_find_in_range_node(size, align, start, end, nid,
flags);
if (found && !memblock_reserve(found, size))
return found;
@@ -1140,6 +1140,20 @@ static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size,
return 0;
}
+phys_addr_t __init memblock_alloc_range(phys_addr_t size, phys_addr_t align,
+ phys_addr_t start, phys_addr_t end)
+{
+ ulong flags = choose_memblock_flags();
+ return memblock_alloc_range_nid(size, align, start, end, NUMA_NO_NODE, flags);
+}
+
+static phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size,
+ phys_addr_t align, phys_addr_t max_addr,
+ int nid, ulong flags)
+{
+ return memblock_alloc_range_nid(size, align, 0, max_addr, nid, flags);
+}
+
phys_addr_t __init memblock_alloc_nid(phys_addr_t size, phys_addr_t align, int nid)
{
ulong flags = choose_memblock_flags();
--
1.8.3.1