Re: [RFC PATCH 13/29] memblock: replace __alloc_bootmem_nopanic with memblock_alloc_from_nopanic
From: Michal Hocko
Date: Thu Sep 06 2018 - 03:57:25 EST
On Wed 05-09-18 18:59:28, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
The translation is simpler here but still a word or two would be nice.
Empty changelogs suck.
To the change
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> ---
> arch/arc/kernel/unwind.c | 4 ++--
> arch/x86/kernel/setup_percpu.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
> index 183391d..2a01dd1 100644
> --- a/arch/arc/kernel/unwind.c
> +++ b/arch/arc/kernel/unwind.c
> @@ -181,8 +181,8 @@ static void init_unwind_hdr(struct unwind_table *table,
> */
> static void *__init unw_hdr_alloc_early(unsigned long sz)
> {
> - return __alloc_bootmem_nopanic(sz, sizeof(unsigned int),
> - MAX_DMA_ADDRESS);
> + return memblock_alloc_from_nopanic(sz, sizeof(unsigned int),
> + MAX_DMA_ADDRESS);
> }
>
> static void *unw_hdr_alloc(unsigned long sz)
> diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
> index 67d48e26..041663a 100644
> --- a/arch/x86/kernel/setup_percpu.c
> +++ b/arch/x86/kernel/setup_percpu.c
> @@ -106,7 +106,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size,
> void *ptr;
>
> if (!node_online(node) || !NODE_DATA(node)) {
> - ptr = __alloc_bootmem_nopanic(size, align, goal);
> + ptr = memblock_alloc_from_nopanic(size, align, goal);
> pr_info("cpu %d has no node %d or node-local memory\n",
> cpu, node);
> pr_debug("per cpu data for cpu%d %lu bytes at %016lx\n",
> @@ -121,7 +121,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size,
> }
> return ptr;
> #else
> - return __alloc_bootmem_nopanic(size, align, goal);
> + return memblock_alloc_from_nopanic(size, align, goal);
> #endif
> }
>
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs