aboutsummaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-11-01 16:28:20 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-11-01 16:28:20 +0100
commitf6177063dfac6d5c83e95f5dd2b2b7baea1053e0 (patch)
tree0e352ef11079ac10e749c935b1214b94bc6b977a /patches
parent6a889fa0e3bcfd11ca1b2ab7ed52d48d8c98d2bd (diff)
downloadxen-f6177063dfac6d5c83e95f5dd2b2b7baea1053e0.tar.gz
xen-f6177063dfac6d5c83e95f5dd2b2b7baea1053e0.tar.bz2
xen-f6177063dfac6d5c83e95f5dd2b2b7baea1053e0.zip
Fix CPU hotplug -- cpu initialisation functions must be declared
__cpuinit or later hotplug references freed code and data. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/linux-2.6.12/cpu-hotplug-init.patch34
1 files changed, 34 insertions, 0 deletions
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);