]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/xen3-remove_kernel_physical_mapping_init_from_init
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / xen3-remove_kernel_physical_mapping_init_from_init
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 Automatically 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 {