]> xenbits.xensource.com Git - xen.git/commitdiff
x86: fix dom0 S3 when x2apic is used.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 18 Mar 2010 11:02:25 +0000 (11:02 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 18 Mar 2010 11:02:25 +0000 (11:02 +0000)
1) Some variables and functions in xen/arch/x86/genapic/x2apic.c
should not be marked with __init* as they will be used during s3
resume;
2) In do_suspend_lowlevel -> restore_rest_processor_state ->
mcheck_init, lapic is accessed, but x2apic hasn't been re-enabled yet
(x2apic is re-enabled() in device_power_up -> lapic_resume). The patch
moves mcheck_init to a later place.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
xen/arch/x86/acpi/power.c
xen/arch/x86/acpi/suspend.c
xen/arch/x86/genapic/x2apic.c

index 25d92e1527723a53c151a26859a83d3ead64be65..dfe35468aca257499d653718514b72ea7a96c503 100644 (file)
@@ -207,6 +207,8 @@ static int enter_state(u32 state)
 
     device_power_up();
 
+    mcheck_init(&boot_cpu_data);
+
     printk(XENLOG_INFO "Finishing wakeup from ACPI S%d state.\n", state);
 
     if ( (state == ACPI_STATE_S3) && error )
index 7735e3a6fb5eb74f27c24f1059daa1d3846f5777..ddddbc89218350f54c5eb4444d3043efc6b59bf2 100644 (file)
@@ -82,5 +82,4 @@ void restore_rest_processor_state(void)
         wrmsrl(MSR_IA32_CR_PAT, host_pat);
 
     mtrr_bp_restore();
-    mcheck_init(&boot_cpu_data);
 }
index 610db8baa02cb124ac7cb48e5c9b6ab9daf6082f..2cb78350600a68aaeb8d40b518c9be399a5d679f 100644 (file)
 #include <xen/smp.h>
 #include <asm/mach-default/mach_mpparse.h>
 
-static int __initdata x2apic = 1;
+static int x2apic = 1;
 boolean_param("x2apic", x2apic);
 
-static int __initdata x2apic_phys; /* By default we use logical cluster mode. */
+static int  x2apic_phys; /* By default we use logical cluster mode. */
 boolean_param("x2apic_phys", x2apic_phys);
 
-static int __init probe_x2apic_phys(void)
+static int probe_x2apic_phys(void)
 {
     return x2apic && x2apic_phys && x2apic_is_available() &&
         iommu_supports_eim();
 }
 
-static int __init probe_x2apic_cluster(void)
+static int probe_x2apic_cluster(void)
 {
     return x2apic && !x2apic_phys && x2apic_is_available() &&
         iommu_supports_eim();