[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86 cpuidle: check whether cpu is online in cpu idle control



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1282069957 -3600
# Node ID 5218db847b58a151d8f320b7141efc984f759b35
# Parent  542e8cd16a6cf036e89b597ba6343245fcaafa25
x86 cpuidle: check whether cpu is online in cpu idle control

We observed a 2.6.18.8 dom0 kernel crash when Xen has maxcpus < num
of physical cores (maxcpus=3D4 for a 12-core system). It appeared that
hypervisor doesn't check whether CPU is online or not. This small
patch fixed the issue.

Signed-off-by: Uwe Dannowski <uwe.dannowski@xxxxxxx>
Acked-by: Wei Huang <wei.huang2@xxxxxxx>
---
 xen/arch/x86/acpi/cpuidle_menu.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -r 542e8cd16a6c -r 5218db847b58 xen/arch/x86/acpi/cpuidle_menu.c
--- a/xen/arch/x86/acpi/cpuidle_menu.c  Tue Aug 17 19:30:35 2010 +0100
+++ b/xen/arch/x86/acpi/cpuidle_menu.c  Tue Aug 17 19:32:37 2010 +0100
@@ -270,9 +270,10 @@ static void menu_reflect(struct acpi_pro
 
 static int menu_enable_device(struct acpi_processor_power *power)
 {
-    struct menu_device *data = &per_cpu(menu_devices, power->cpu);
-
-    memset(data, 0, sizeof(struct menu_device));
+    if (!cpu_online(power->cpu))
+        return -1;
+
+    memset(&per_cpu(menu_devices, power->cpu), 0, sizeof(struct menu_device));
 
     return 0;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.