x86: fix crash on cpu hotplug on pat-incapable machines
authorAvi Kivity <avi@qumranet.com>
Wed, 14 May 2008 09:20:32 +0000 (12:20 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 17 May 2008 20:57:20 +0000 (22:57 +0200)
pat_disable() is __init, which means it goes away after booting is complete.
Unfortunately it is used by the hotplug code if the machine is not
pat-capable, causing a crash.

Fix by marking pat_disable() as __cpuinit.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/pat.c

index bcb1a8e4b2db5b28626c1e153a625b2c304d4d24..de3a998124506df3c4a43011033dfb55602f2d59 100644 (file)
@@ -28,7 +28,7 @@
 #ifdef CONFIG_X86_PAT
 int __read_mostly pat_wc_enabled = 1;
 
-void __init pat_disable(char *reason)
+void __cpuinit pat_disable(char *reason)
 {
        pat_wc_enabled = 0;
        printk(KERN_INFO "%s\n", reason);