diff options
author | Zachary Amsden <zach@vmware.com> | 2008-12-13 15:36:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-14 19:24:38 -0500 |
commit | ae8d04e2ecbb233926860e9ce145eac19c7835dc (patch) | |
tree | c6553749f2428e6b828af9b5a165c0ce31cb71f6 /arch/x86/kernel/setup.c | |
parent | ca7e716c7833aeaeb8fedd6d004c5f5d5e14d325 (diff) |
x86 Fix VMI crash on boot in 2.6.28-rc8
VMI initialiation can relocate the fixmap, causing early_ioremap to
malfunction if it is initialized before the relocation. To fix this,
VMI activation is split into two phases; the detection, which must
happen before setting up ioremap, and the activation, which must happen
after parsing early boot parameters.
This fixes a crash on boot when VMI is enabled under VMware.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 9d5674f7b6cc..bdec76e55594 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -794,6 +794,9 @@ void __init setup_arch(char **cmdline_p) | |||
794 | printk(KERN_INFO "Command line: %s\n", boot_command_line); | 794 | printk(KERN_INFO "Command line: %s\n", boot_command_line); |
795 | #endif | 795 | #endif |
796 | 796 | ||
797 | /* VMI may relocate the fixmap; do this before touching ioremap area */ | ||
798 | vmi_init(); | ||
799 | |||
797 | early_cpu_init(); | 800 | early_cpu_init(); |
798 | early_ioremap_init(); | 801 | early_ioremap_init(); |
799 | 802 | ||
@@ -880,13 +883,8 @@ void __init setup_arch(char **cmdline_p) | |||
880 | check_efer(); | 883 | check_efer(); |
881 | #endif | 884 | #endif |
882 | 885 | ||
883 | #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) | 886 | /* Must be before kernel pagetables are setup */ |
884 | /* | 887 | vmi_activate(); |
885 | * Must be before kernel pagetables are setup | ||
886 | * or fixmap area is touched. | ||
887 | */ | ||
888 | vmi_init(); | ||
889 | #endif | ||
890 | 888 | ||
891 | /* after early param, so could get panic from serial */ | 889 | /* after early param, so could get panic from serial */ |
892 | reserve_early_setup_data(); | 890 | reserve_early_setup_data(); |