login
Header Space

 
 

[PATCH] [25/35] i386: Change sysenter_setup to __cpuinit & improve __INIT, __INITDATA

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Prarit Bhargava <prarit@...>, <linux-kernel@...>, <patches@...>
Date: Saturday, April 28, 2007 - 1:52 pm

From: Prarit Bhargava <prarit@redhat.com>
Change sysenter_setup to __cpuinit.
Change __INIT & __INITDATA to be cpu hotplug aware.

Resolve MODPOST warnings similar to:

WARNING: vmlinux - Section mismatch: reference to .init.text:sysenter_setup from
 .text between 'identify_cpu' (at offset 0xc040a380) and 'detect_ht'

and

WARNING: vmlinux - Section mismatch: reference to .init.data:vsyscall_int80_end
from .text between 'sysenter_setup' (at offset 0xc041a269) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_int80_start from .text between 'sysenter_setup' (at offset
0xc041a26e) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_sysenter_end from .text between 'sysenter_setup' (at offset
0xc041a275) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_sysenter_start from .text between 'sysenter_setup' (at
offset 0xc041a27a) and 'enable_sep_cpu'

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>

---
 arch/i386/kernel/sysenter.c |    2 +-
 include/linux/init.h        |    7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

Index: linux/arch/i386/kernel/sysenter.c
===================================================================
--- linux.orig/arch/i386/kernel/sysenter.c
+++ linux/arch/i386/kernel/sysenter.c
@@ -72,7 +72,7 @@ extern const char vsyscall_int80_start, 
 extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
 static struct page *syscall_pages[1];
 
-int __init sysenter_setup(void)
+int __cpuinit sysenter_setup(void)
 {
 	void *syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
 	syscall_pages[0] = virt_to_page(syscall_page);
Index: linux/include/linux/init.h
===================================================================
--- linux.orig/include/linux/init.h
+++ linux/include/linux/init.h
@@ -52,9 +52,14 @@
 #endif
 
 /* For assembly routines */
+#ifdef CONFIG_HOTPLUG_CPU
+#define __INIT		.section	".text","ax"
+#define __INITDATA	.section	".data","aw"
+#else
 #define __INIT		.section	".init.text","ax"
-#define __FINIT		.previous
 #define __INITDATA	.section	".init.data","aw"
+#endif
+#define __FINIT		.previous
 
 #ifndef __ASSEMBLY__
 /*
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] [14/35] i386: mtrr range check correction, Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [15/35] i386: pit_latch_buggy has no effect, Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [12/35] x86: consolidate smp_send_stop(), Andi Kleen, (Sat Apr 28, 1:52 pm)
Re: [patches] [PATCH] [8/35] x86_64: a memcpy that tries to ..., Bryan O'Sullivan, (Mon Apr 30, 12:14 pm)
[PATCH] [32/35] x86_64: Remove unused set_seg_base, Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [30/35] i386: clean up mach_reboot_fixups, Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [25/35] i386: Change sysenter_setup to __cpuinit &am..., Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [24/35] i386: Add __init to probe_bigsmp, Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [21/35] x86_64: Some cleanup in time.c, Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [17/35] i386: probe_roms() cleanup, Andi Kleen, (Sat Apr 28, 1:52 pm)
[PATCH] [6/35] x86_64: remove clustered APIC mode, Andi Kleen, (Sat Apr 28, 1:52 pm)
speck-geostationary