All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: suppress HPET broadcast initialization in the presence of ARAT
@ 2011-02-10 13:58 Jan Beulich
  2011-02-12  7:15 ` Wei, Gang
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2011-02-10 13:58 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

This follows Linux commit 39fe05e58c5e448601ce46e6b03900d5bf31c4b0,
noticing that all this setup is pointless when ARAT support is there,
and knowing that on SLED11's native kernel it has actually caused S3
resume issues.

A question would be whether HPET legacy interrupts should be forced
off in this case (rather than leaving whatever came from firmware).

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -557,6 +557,9 @@ void hpet_broadcast_init(void)
     u32 hpet_id, cfg;
     int i;
 
+    if ( boot_cpu_has(X86_FEATURE_ARAT) )
+        return;
+
     if ( irq_channel == NULL )
     {
         irq_channel = xmalloc_array(int, nr_irqs);




[-- Attachment #2: x86-arat-no-hpet-irq.patch --]
[-- Type: text/plain, Size: 725 bytes --]

This follows Linux commit 39fe05e58c5e448601ce46e6b03900d5bf31c4b0,
noticing that all this setup is pointless when ARAT support is there,
and knowing that on SLED11's native kernel it has actually caused S3
resume issues.

A question would be whether HPET legacy interrupts should be forced
off in this case (rather than leaving whatever came from firmware).

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -557,6 +557,9 @@ void hpet_broadcast_init(void)
     u32 hpet_id, cfg;
     int i;
 
+    if ( boot_cpu_has(X86_FEATURE_ARAT) )
+        return;
+
     if ( irq_channel == NULL )
     {
         irq_channel = xmalloc_array(int, nr_irqs);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] x86: suppress HPET broadcast initialization in the presence of ARAT
  2011-02-10 13:58 [PATCH] x86: suppress HPET broadcast initialization in the presence of ARAT Jan Beulich
@ 2011-02-12  7:15 ` Wei, Gang
  2011-02-12  7:35   ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Wei, Gang @ 2011-02-12  7:15 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Wei, Gang

Jan Beulich wrote on 2011-02-10:
> This follows Linux commit 39fe05e58c5e448601ce46e6b03900d5bf31c4b0,
> noticing that all this setup is pointless when ARAT support is there, 
> and knowing that on SLED11's native kernel it has actually caused S3 resume issues.
> 
> A question would be whether HPET legacy interrupts should be forced 
> off in this case (rather than leaving whatever came from firmware).
> 
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
> 
> --- a/xen/arch/x86/hpet.c
> +++ b/xen/arch/x86/hpet.c
> @@ -557,6 +557,9 @@ void hpet_broadcast_init(void)
>      u32 hpet_id, cfg;
>      int i;
> +    if ( boot_cpu_has(X86_FEATURE_ARAT) )
> +        return;
> +
>      if ( irq_channel == NULL )
>      {
>          irq_channel = xmalloc_array(int, nr_irqs);
>

Although this patch was already checked in, I still have to say it is not necessary for Xen. Because hpet_broadcast_init() fn is only called if (xen_cpuidle && !boot_cpu_has(X86_FEATURE_ARAT)) in disable_pit_irq(). Of course I agree to keep it as a never used double check.

Jimmy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: suppress HPET broadcast initialization in the presence of ARAT
  2011-02-12  7:15 ` Wei, Gang
@ 2011-02-12  7:35   ` Keir Fraser
  2011-02-12  8:46     ` Wei, Gang
  2011-02-14  8:15     ` Jan Beulich
  0 siblings, 2 replies; 5+ messages in thread
From: Keir Fraser @ 2011-02-12  7:35 UTC (permalink / raw)
  To: Wei, Gang, Jan Beulich, xen-devel

On 12/02/2011 07:15, "Wei, Gang" <gang.wei@intel.com> wrote:

> Jan Beulich wrote on 2011-02-10:
>> This follows Linux commit 39fe05e58c5e448601ce46e6b03900d5bf31c4b0,
>> noticing that all this setup is pointless when ARAT support is there,
>> and knowing that on SLED11's native kernel it has actually caused S3 resume
>> issues.
>> 
> 
> Although this patch was already checked in, I still have to say it is not
> necessary for Xen. Because hpet_broadcast_init() fn is only called if
> (xen_cpuidle && !boot_cpu_has(X86_FEATURE_ARAT)) in disable_pit_irq(). Of
> course I agree to keep it as a never used double check.

Hmm I didn't spot that. Actually it is part of a more complex series of
checks in the caller, so I wonder whether repeating just that one check in
the function itself really makes much sense. I'm somewhat inclibned to
revert it.

 -- Keir

> Jimmy
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] x86: suppress HPET broadcast initialization in the presence of ARAT
  2011-02-12  7:35   ` Keir Fraser
@ 2011-02-12  8:46     ` Wei, Gang
  2011-02-14  8:15     ` Jan Beulich
  1 sibling, 0 replies; 5+ messages in thread
From: Wei, Gang @ 2011-02-12  8:46 UTC (permalink / raw)
  To: Keir Fraser, Jan Beulich, xen-devel; +Cc: Wei, Gang

Keir Fraser wrote on 2011-02-12:
> On 12/02/2011 07:15, "Wei, Gang" <gang.wei@intel.com> wrote:
>> Jan Beulich wrote on 2011-02-10:
>>> This follows Linux commit 39fe05e58c5e448601ce46e6b03900d5bf31c4b0,
>>> noticing that all this setup is pointless when ARAT support is
>>> there, and knowing that on SLED11's native kernel it has actually
>>> caused S3 resume issues.
>> 
>> Although this patch was already checked in, I still have to say it
>> is not necessary for Xen. Because hpet_broadcast_init() fn is only
>> called if (xen_cpuidle && !boot_cpu_has(X86_FEATURE_ARAT)) in
>> disable_pit_irq(). Of course I agree to keep it as a never used double check.
> 
> Hmm I didn't spot that. Actually it is part of a more complex series
> of checks in the caller, so I wonder whether repeating just that one
> check in the function itself really makes much sense. I'm somewhat inclibned to revert it.

Revert it would be better.

Jimmy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: suppress HPET broadcast initialization in the presence of ARAT
  2011-02-12  7:35   ` Keir Fraser
  2011-02-12  8:46     ` Wei, Gang
@ 2011-02-14  8:15     ` Jan Beulich
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2011-02-14  8:15 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Gang Wei

>>> On 12.02.11 at 08:35, Keir Fraser <keir@xen.org> wrote:
> On 12/02/2011 07:15, "Wei, Gang" <gang.wei@intel.com> wrote:
> 
>> Jan Beulich wrote on 2011-02-10:
>>> This follows Linux commit 39fe05e58c5e448601ce46e6b03900d5bf31c4b0,
>>> noticing that all this setup is pointless when ARAT support is there,
>>> and knowing that on SLED11's native kernel it has actually caused S3 resume
>>> issues.
>>> 
>> 
>> Although this patch was already checked in, I still have to say it is not
>> necessary for Xen. Because hpet_broadcast_init() fn is only called if
>> (xen_cpuidle && !boot_cpu_has(X86_FEATURE_ARAT)) in disable_pit_irq(). Of
>> course I agree to keep it as a never used double check.
> 
> Hmm I didn't spot that. Actually it is part of a more complex series of
> checks in the caller, so I wonder whether repeating just that one check in
> the function itself really makes much sense. I'm somewhat inclibned to
> revert it.

Yes, revert it - somehow I managed to not notice we do this check
already.

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-14  8:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 13:58 [PATCH] x86: suppress HPET broadcast initialization in the presence of ARAT Jan Beulich
2011-02-12  7:15 ` Wei, Gang
2011-02-12  7:35   ` Keir Fraser
2011-02-12  8:46     ` Wei, Gang
2011-02-14  8:15     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.