From: Jan Beulich Date: Thu, 4 Oct 2012 07:03:06 +0000 (+0200) Subject: x86: get the MWAIT idle driver in sync with the ACPI one X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7823 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f06fabda84d6a6e61d45d7444eeb5fdca9f71b3f;p=xen.git 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 Acked-by: Keir Fraser --- diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c index 6a9ca95d33..f8bbf0f231 100644 --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -501,11 +501,14 @@ int __init mwait_idle_init(struct notifier_block *nfb) 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;