Skip to content

Commit

Permalink
x86: fix crash on cpu hotplug on pat-incapable machines
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Avi Kivity authored and Thomas Gleixner committed May 17, 2008
1 parent a738d89 commit 31f4d87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/pat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 31f4d87

Please sign in to comment.