]> git.baikalelectronics.ru Git - kernel.git/commit
x86: fix section mismatch warning - spp_getpage()
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Fri, 15 Aug 2008 16:32:24 +0000 (18:32 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 Aug 2008 17:16:06 +0000 (19:16 +0200)
commitcbd38425358ec40a7b29f33cb5fb48d8ba8aa4a9
tree43aaa48637908a3fbb2843f3a5ee08ac58871e40
parent680bfbff01b9cefc80bc81b8c1123e6c4fa8ff0a
x86: fix section mismatch warning - spp_getpage()

WARNING: vmlinux.o(.text+0x17a3e): Section mismatch in reference from the function set_pte_vaddr_pud() to the function .init.text:spp_getpage()
The function set_pte_vaddr_pud() references
the function __init spp_getpage().
This is often because set_pte_vaddr_pud lacks a __init
annotation or the annotation of spp_getpage is wrong.

spp_getpage is called from __init (__init_extra_mapping) and
non __init (set_pte_vaddr_pud) functions, so it can't be __init.
Unfortunately it calls alloc_bootmem_pages which is __init,
but does it only when bootmem allocator is available (after_bootmem == 0).

So annotate it accordingly.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
arch/x86/mm/init_64.c