Re: Detecting x86 LAPIC timer frequency from CPUID data

From: Jacob Pan
Date: Fri Apr 19 2019 - 19:07:12 EST


On Fri, 19 Apr 2019 22:52:01 +0200 (CEST)
Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:

> On Fri, 19 Apr 2019, Jacob Pan wrote:
> > On Fri, 19 Apr 2019 10:57:10 +0200 (CEST)
> > Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > > On Fri, 19 Apr 2019, Daniel Drake wrote:
> > > > 0x7FFFFF vs 0x7FFFFFFF, is that intentional?
> > >
> > > I don't think so. Looks like a failed copy and paste. Cc'ed
> > > Jacob, he might know.
> > >
> > At the time of v2.6.35 both places use 0x7FFFFF. But later this
> > patch increased the latter to 0x7FFFFFFF but forgot the first part.
> > So I guess it is not exactly a failed copy and paste.
> >
> > commit 4aed89d6b515b9185351706ca95cd712c9d8d6a3
> > Author: Pierre Tardy <pierre.tardy@xxxxxxxxx>
> > Date: Thu Jan 6 16:23:29 2011 +0100
> >
> > x86, lapic-timer: Increase the max_delta to 31 bits
>
> Indeed. Thanks for digging that up!
>
> tglx

How about a fix like this? I should have taken your advice 9 years ago
to avoid duplicated code :)
https://lkml.org/lkml/2010/5/11/499