[RFC PATCH 10/29] memblock: replace __alloc_bootmem_node_nopanic with memblock_alloc_try_nid_nopanic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-mm@xxxxxxxxx
- Subject: [RFC PATCH 10/29] memblock: replace __alloc_bootmem_node_nopanic with memblock_alloc_try_nid_nopanic
- From: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 5 Sep 2018 18:59:25 +0300
- Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Paul Burton <paul.burton@xxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
- In-reply-to: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com>
- References: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com>
The __alloc_bootmem_node_nopanic() is used only once, there is no reason to
add a wrapper for memblock_alloc_try_nid_nopanic for it.
Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
---
arch/x86/kernel/setup_percpu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index ea554f8..67d48e26 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -112,8 +112,10 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size,
pr_debug("per cpu data for cpu%d %lu bytes at %016lx\n",
cpu, size, __pa(ptr));
} else {
- ptr = __alloc_bootmem_node_nopanic(NODE_DATA(node),
- size, align, goal);
+ ptr = memblock_alloc_try_nid_nopanic(size, align, goal,
+ BOOTMEM_ALLOC_ACCESSIBLE,
+ node);
+
pr_debug("per cpu data for cpu%d %lu bytes on node%d at %016lx\n",
cpu, size, node, __pa(ptr));
}
--
2.7.4
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]