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

[Xen-changelog] [xen-unstable] x86: get the MWAIT idle driver in sync with the ACPI one


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 04 Oct 2012 21:11:07 +0000
  • Delivery-date: Thu, 04 Oct 2012 21:11:15 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1349334186 -7200
# Node ID d0d7e20b998969234eb5dc41a56e91d7f7f1378a
# Parent  572821a5682bbad552fb597194752b882ca12fae
x86: get the MWAIT idle driver in sync with the ACPI one

.. with respect to behavior when there is no HPET broadcast support
(for using the PIT broadcast instead, it requires explicitly enabling
CPU idle management).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 572821a5682b -r d0d7e20b9989 xen/arch/x86/cpu/mwait-idle.c
--- a/xen/arch/x86/cpu/mwait-idle.c     Wed Oct 03 12:59:30 2012 +0100
+++ b/xen/arch/x86/cpu/mwait-idle.c     Thu Oct 04 09:03:06 2012 +0200
@@ -501,11 +501,14 @@ int __init mwait_idle_init(struct notifi
                return -ENODEV;
 
        err = mwait_idle_probe();
-       if (!err) {
-               if (!boot_cpu_has(X86_FEATURE_ARAT))
-                       hpet_broadcast_init();
-               if (!lapic_timer_init())
+       if (!err && !boot_cpu_has(X86_FEATURE_ARAT)) {
+               hpet_broadcast_init();
+               if (xen_cpuidle < 0 && !hpet_broadcast_is_available())
+                       err = -ENODEV;
+               else if(!lapic_timer_init())
                        err = -EINVAL;
+               if (err)
+                       pr_debug(PREFIX "not used (%d)\n", err);
        }
        if (!err) {
                nfb->notifier_call = mwait_idle_cpu_init;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.