Commit dec2e6b7 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Linus Torvalds
Browse files

x86_64: fix section mismatch warning in init.c

Fix following warning:
WARNING: vmlinux.o(.text+0x188ea): Section mismatch: reference to .init.text:__alloc_bootmem_core (between 'alloc_bootmem_high_node' and 'get_gate_vma')

alloc_bootmem_high_node() is only used from __init scope so declare it __init.
And in addition declare the weak variant __init too.
Signed-off-by: default avatarSam Ravnborg <>
Signed-off-by: default avatarAndi Kleen <>
Signed-off-by: default avatarLinus Torvalds <>
parent 7aa6ec56
......@@ -724,7 +724,7 @@ int in_gate_area_no_task(unsigned long addr)
return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
void * __init alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
return __alloc_bootmem_core(pgdat->bdata, size,
SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0);
......@@ -209,7 +209,7 @@ static int __meminit sparse_init_one_section(struct mem_section *ms,
return 1;
__attribute__((weak)) __init
void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size)
return NULL;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment