On Monday, January 24, 2011, Thomas Renninger wrote:
> Hi,
> 
> as there was not much response on this topic, adding some
> more people to CC.
> Would be great to get the one or other acked-by: for stable
> inclusion.

I agree it would be good to have that in -stable, FWIW.

Thanks,
Rafael


> On Monday, January 17, 2011 11:03:13 AM Thomas Renninger wrote:
> > Hi,
> > 
> > this patch seem to not only be a performance optimization,
> > but fixes (works around) a time drift issue when suspending.
> > 
> > The time drift happens when hpet.c encounters specific hpet/HW
> > capabilities to set up per CPU hpet msi interrupt vectors.
> > 
> > While the real culprit seem to be in the per CPU hpet msi vector
> > code, this patch seem to address the issue in an easy and riskless
> > manner, suitable for stable@ kernels.
> > No idea which HW is set up with per CPU hpet msi irqs (not much).
> > If such configuration only happens on recent arat capable machines,
> > latest mainline kernels might get cleaned up by removing this
> > code and stable@ kernels are fine with this easy patch.
> > 
> > Patch slightly adjusted (hunk 3/3 did not apply)
> > to latest linux-2.6.32.y tree.
> > 
> > Thanks,
> > 
> >    Thomas
> > 
> > ---
> > From: Shaohua Li <[email protected]>
> > x86, hpet: Disable per-cpu hpet timer if ARAT is supported
> > 
> > Git-commit: 39fe05e58c5e448601ce46e6b03900d5bf31c4b0
> > 
> > If CPU support always running local APIC timer, per-cpu hpet
> > timer could be disabled, which is useless and wasteful in such
> > case. Let's leave the timers to others.
> > 
> > The effect is that we reserve less timers.
> > 
> > Signed-off-by: Shaohua Li <[email protected]>
> > LKML-Reference: <[email protected]>
> > Signed-off-by: Ingo Molnar <[email protected]>
> > 
> > ---
> >  arch/x86/kernel/hpet.c |   12 ++++++++++--
> >  1 files changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
> > index c771e1a..69cab24 100644
> > --- a/arch/x86/kernel/hpet.c
> > +++ b/arch/x86/kernel/hpet.c
> > @@ -606,6 +606,8 @@ static void hpet_msi_capability_lookup(unsigned 
> int start_timer)
> >     if (hpet_msi_disable)
> >             return;
> >  
> > +   if (boot_cpu_has(X86_FEATURE_ARAT))
> > +           return;
> >     id = hpet_readl(HPET_ID);
> >  
> >     num_timers = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT);
> > @@ -894,10 +896,8 @@ int __init hpet_enable(void)
> >  
> >     if (id & HPET_ID_LEGSUP) {
> >             hpet_legacy_clockevent_register();
> > -           hpet_msi_capability_lookup(2);
> >             return 1;
> >     }
> > -   hpet_msi_capability_lookup(0);
> >     return 0;
> >  
> >  out_nohpet:
> > @@ -930,12 +930,20 @@ static __init int hpet_late_init(void)
> >     if (!hpet_virt_address)
> >             return -ENODEV;
> >  
> > +   if (hpet_readl(HPET_ID) & HPET_ID_LEGSUP)
> > +           hpet_msi_capability_lookup(2);
> > +   else
> > +           hpet_msi_capability_lookup(0);
> > +
> >     hpet_reserve_platform_timers(hpet_readl(HPET_ID));
> >     hpet_print_config();
> >  
> >     if (hpet_msi_disable)
> >             return 0;
> >  
> > +   if (boot_cpu_has(X86_FEATURE_ARAT))
> > +           return 0;
> > +
> >     for_each_online_cpu(cpu) {
> >             hpet_cpuhp_notify(NULL, CPU_ONLINE, (void *)(long)cpu);
> >     }
> > 
> 
> 
> 

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to