]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.xen/xen3-remove_kernel_physical_mapping_init_from_init
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.xen / xen3-remove_kernel_physical_mapping_init_from_init
CommitLineData
2cb7cef9
BS
1From: Gary Hade <garyhade@us.ibm.com>
2Subject: move kernel_physical_mapping_init to __meminit
3Patch-mainline: 2.6.29 (probably)
4References: bnc#467474
5
6kernel_physical_mapping_init() is called during memory hotplug
7so it does not belong in the init section.
8
9If the kernel is built with CONFIG_DEBUG_SECTION_MISMATCH=y on
10the make command line, arch/x86/mm/init_64.c is compiled with
11the -fno-inline-functions-called-once gcc option defeating
12inlining of kernel_physical_mapping_init() within init_memory_mapping().
13When kernel_physical_mapping_init() is not inlined it is placed
14in the .init.text section according to the __init in it's current
15declaration. A later call to kernel_physical_mapping_init() during
16a memory hotplug operation encounters an int3 trap because the
17.init.text section memory has been freed. This patch eliminates
18the crash caused by the int3 trap by moving the non-inlined
19kernel_physical_mapping_init() from .init.text to .meminit.text.
20
21Signed-off-by: Gary Hade <garyhade@us.ibm.com>
22Acked-by: Jeff Mahoney <jeffm@suse.com>
23Automatically created from "patches.fixes/remove_kernel_physical_mapping_init_from_init" by xen-port-patches.py
24
25--- sle11-2009-02-16.orig/arch/x86/mm/init_64-xen.c 2009-02-17 18:05:39.000000000 +0100
26+++ sle11-2009-02-16/arch/x86/mm/init_64-xen.c 2009-02-17 18:05:54.000000000 +0100
27@@ -739,7 +739,7 @@ static void __init init_gbpages(void)
28 #endif
29 }
30
31-static unsigned long __init kernel_physical_mapping_init(unsigned long start,
32+static unsigned long __meminit kernel_physical_mapping_init(unsigned long start,
33 unsigned long end,
34 unsigned long page_size_mask)
35 {