]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/setup.c
x86 Fix VMI crash on boot in 2.6.28-rc8
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / setup.c
index 2255782e8d4b94664ff8c3c053af26aa114d0e6c..bdec76e5559433d77366b85535f0563451614501 100644 (file)
@@ -561,7 +561,13 @@ static void __init reserve_standard_io_resources(void)
 
 }
 
-#ifdef CONFIG_PROC_VMCORE
+/*
+ * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
+ * is_kdump_kernel() to determine if we are booting after a panic. Hence
+ * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
+ */
+
+#ifdef CONFIG_CRASH_DUMP
 /* elfcorehdr= specifies the location of elf core header
  * stored by the crashed kernel. This option will be passed
  * by kexec loader to the capture kernel.
@@ -758,7 +764,7 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
                .callback = dmi_low_memory_corruption,
                .ident = "Phoenix BIOS",
                .matches = {
-                       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
+                       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"),
                },
        },
 #endif
@@ -788,6 +794,9 @@ void __init setup_arch(char **cmdline_p)
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
+       /* VMI may relocate the fixmap; do this before touching ioremap area */
+       vmi_init();
+
        early_cpu_init();
        early_ioremap_init();
 
@@ -874,13 +883,8 @@ void __init setup_arch(char **cmdline_p)
        check_efer();
 #endif
 
-#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
-       /*
-        * Must be before kernel pagetables are setup
-        * or fixmap area is touched.
-        */
-       vmi_init();
-#endif
+       /* Must be before kernel pagetables are setup */
+       vmi_activate();
 
        /* after early param, so could get panic from serial */
        reserve_early_setup_data();
@@ -1067,6 +1071,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 
        prefill_possible_map();
+
 #ifdef CONFIG_X86_64
        init_cpu_to_node();
 #endif
@@ -1074,6 +1079,9 @@ void __init setup_arch(char **cmdline_p)
        init_apic_mappings();
        ioapic_init_mappings();
 
+       /* need to wait for io_apic is mapped */
+       nr_irqs = probe_nr_irqs();
+
        kvm_guest_init();
 
        e820_reserve_resources();