Re: [PATCH][2.6.24-rc2-mm1] memory hotplug x86_64 fix [2/3] fixsection mismatch in vmammap_allock_block

From: Andrew Morton
Date: Thu Nov 15 2007 - 19:53:57 EST


On Thu, 15 Nov 2007 19:35:44 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> Fixes section mismatch below.
>
> WARNING: vmlinux.o(.text+0x946b5): Section mismatch: reference to .init.text:'
> __alloc_bootmem_node (between 'vmemmap_alloc_block' and 'vmemmap_pgd_populate')
>
> Changelog
> - changed bootmem alloc wrapper function's name to be
> __earlyonly_bootmem_alloc().
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>
>
> mm/sparse-vmemmap.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> Index: linux-2.6.24-rc2-mm1/mm/sparse-vmemmap.c
> ===================================================================
> --- linux-2.6.24-rc2-mm1.orig/mm/sparse-vmemmap.c
> +++ linux-2.6.24-rc2-mm1/mm/sparse-vmemmap.c
> @@ -34,6 +34,16 @@
> * or to back the page tables that are used to create the mapping.
> * Uses the main allocators if they are available, else bootmem.
> */
> +
> +static void * __init_refok __earlyonly_bootmem_alloc(int node,
> + unsigned long size,
> + unsigned long align,
> + unsigned long goal)
> +{
> + return __alloc_bootmem_node(NODE_DATA(node), size, align, goal);
> +}
> +
> +
> void * __meminit vmemmap_alloc_block(unsigned long size, int node)
> {
> /* If the main allocator is up use that, fallback to bootmem. */
> @@ -44,7 +54,7 @@ void * __meminit vmemmap_alloc_block(uns
> return page_address(page);
> return NULL;
> } else
> - return __alloc_bootmem_node(NODE_DATA(node), size, size,
> + return __earlyonly_bootmem_alloc(node, size, size,
> __pa(MAX_DMA_ADDRESS));
> }
>

AFACIT this is applicable to mainline?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/