From f6177063dfac6d5c83e95f5dd2b2b7baea1053e0 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 1 Nov 2005 16:28:20 +0100 Subject: Fix CPU hotplug -- cpu initialisation functions must be declared __cpuinit or later hotplug references freed code and data. Signed-off-by: Keir Fraser --- patches/linux-2.6.12/cpu-hotplug-init.patch | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 patches/linux-2.6.12/cpu-hotplug-init.patch (limited to 'patches') diff --git a/patches/linux-2.6.12/cpu-hotplug-init.patch b/patches/linux-2.6.12/cpu-hotplug-init.patch new file mode 100644 index 0000000000..9e039db252 --- /dev/null +++ b/patches/linux-2.6.12/cpu-hotplug-init.patch @@ -0,0 +1,34 @@ +diff -ur linux-2.6.12.orig/include/linux/init.h linux-2.6.12/include/linux/init.h +--- linux-2.6.12.orig/include/linux/init.h 2005-11-01 14:52:28.656025573 +0000 ++++ linux-2.6.12/include/linux/init.h 2005-11-01 14:53:28.015791549 +0000 +@@ -229,6 +229,18 @@ + #define __devexitdata __exitdata + #endif + ++#ifdef CONFIG_HOTPLUG_CPU ++#define __cpuinit ++#define __cpuinitdata ++#define __cpuexit ++#define __cpuexitdata ++#else ++#define __cpuinit __init ++#define __cpuinitdata __initdata ++#define __cpuexit __exit ++#define __cpuexitdata __exitdata ++#endif ++ + /* Functions marked as __devexit may be discarded at kernel link time, depending + on config options. Newer versions of binutils detect references from + retained sections to discarded sections and flag an error. Pointers to +diff -ur linux-2.6.12.orig/arch/x86_64/kernel/i387.c linux-2.6.12/arch/x86_64/kernel/i387.c +--- linux-2.6.12.orig/arch/x86_64/kernel/i387.c 2005-11-01 15:01:58.932991232 +0000 ++++ linux-2.6.12/arch/x86_64/kernel/i387.c 2005-11-01 15:02:09.729312416 +0000 +@@ -42,7 +42,7 @@ + * Called at bootup to set up the initial FPU state that is later cloned + * into all processes. + */ +-void __init fpu_init(void) ++void __cpuinit fpu_init(void) + { + unsigned long oldcr0 = read_cr0(); + extern void __bad_fxsave_alignment(void); -- cgit v1.2.3