aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-03-18 11:02:25 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-03-18 11:02:25 +0000
commit7f6331edab97a85e3ce722a5e3442b849db4891f (patch)
tree13bc1a3b24c542aa98e588ee8a7bd2fd128c5999
parentcaf500204f0cd52a0e1fb838029e52bafbfd072b (diff)
downloadxen-7f6331edab97a85e3ce722a5e3442b849db4891f.tar.gz
xen-7f6331edab97a85e3ce722a5e3442b849db4891f.tar.bz2
xen-7f6331edab97a85e3ce722a5e3442b849db4891f.zip
x86: fix dom0 S3 when x2apic is used.
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>
-rw-r--r--xen/arch/x86/acpi/power.c2
-rw-r--r--xen/arch/x86/acpi/suspend.c1
-rw-r--r--xen/arch/x86/genapic/x2apic.c8
3 files changed, 6 insertions, 5 deletions
diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
index 25d92e1527..dfe35468ac 100644
--- a/xen/arch/x86/acpi/power.c
+++ b/xen/arch/x86/acpi/power.c
@@ -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 )
diff --git a/xen/arch/x86/acpi/suspend.c b/xen/arch/x86/acpi/suspend.c
index 7735e3a6fb..ddddbc8921 100644
--- a/xen/arch/x86/acpi/suspend.c
+++ b/xen/arch/x86/acpi/suspend.c
@@ -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);
}
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
index 610db8baa0..2cb7835060 100644
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -23,19 +23,19 @@
#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();