Explorar o código

x86: fix crash on cpu hotplug on pat-incapable machines

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>
Avi Kivity %!s(int64=17) %!d(string=hai) anos
pai
achega
31f4d870b0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/x86/mm/pat.c

+ 1 - 1
arch/x86/mm/pat.c

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