* [PATCH] x86: get the MWAIT idle driver in sync with the ACPI one
@ 2012-10-02 14:46 Jan Beulich
2012-10-02 17:00 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2012-10-02 14:46 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 858 bytes --]
.. 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@suse.com>
--- 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 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;
[-- Attachment #2: x86-MWAIT-idle-match-ACPI.patch --]
[-- Type: text/plain, Size: 912 bytes --]
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@suse.com>
--- 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 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;
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: get the MWAIT idle driver in sync with the ACPI one
2012-10-02 14:46 [PATCH] x86: get the MWAIT idle driver in sync with the ACPI one Jan Beulich
@ 2012-10-02 17:00 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2012-10-02 17:00 UTC (permalink / raw)
To: Jan Beulich, xen-devel
On 02/10/2012 15:46, "Jan Beulich" <JBeulich@suse.com> wrote:
> .. 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@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
> --- 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 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-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-02 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 14:46 [PATCH] x86: get the MWAIT idle driver in sync with the ACPI one Jan Beulich
2012-10-02 17:00 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).