]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Gary Hade <garyhade@us.ibm.com> |
2 | Subject: move kernel_physical_mapping_init to __meminit | |
3 | Patch-mainline: 2.6.29 (probably) | |
4 | References: bnc#467474 | |
5 | ||
6 | kernel_physical_mapping_init() is called during memory hotplug | |
7 | so it does not belong in the init section. | |
8 | ||
9 | If the kernel is built with CONFIG_DEBUG_SECTION_MISMATCH=y on | |
10 | the make command line, arch/x86/mm/init_64.c is compiled with | |
11 | the -fno-inline-functions-called-once gcc option defeating | |
12 | inlining of kernel_physical_mapping_init() within init_memory_mapping(). | |
13 | When kernel_physical_mapping_init() is not inlined it is placed | |
14 | in the .init.text section according to the __init in it's current | |
15 | declaration. A later call to kernel_physical_mapping_init() during | |
16 | a memory hotplug operation encounters an int3 trap because the | |
17 | .init.text section memory has been freed. This patch eliminates | |
18 | the crash caused by the int3 trap by moving the non-inlined | |
19 | kernel_physical_mapping_init() from .init.text to .meminit.text. | |
20 | ||
21 | Signed-off-by: Gary Hade <garyhade@us.ibm.com> | |
22 | Acked-by: Jeff Mahoney <jeffm@suse.com> | |
23 | --- | |
24 | ||
25 | arch/x86/mm/init_64.c | 2 +- | |
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
27 | ||
28 | --- a/arch/x86/mm/init_64.c | |
29 | +++ b/arch/x86/mm/init_64.c | |
30 | @@ -495,7 +495,7 @@ static void __init init_gbpages(void) | |
31 | direct_gbpages = 0; | |
32 | } | |
33 | ||
34 | -static unsigned long __init kernel_physical_mapping_init(unsigned long start, | |
35 | +static unsigned long __meminit kernel_physical_mapping_init(unsigned long start, | |
36 | unsigned long end, | |
37 | unsigned long page_size_mask) | |
38 | { |