lkml.org 
[lkml]   [2019]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/apic: Handle missing global clockevent gracefully
On Mon, 12 Aug 2019, Li, Aubrey wrote:
> On 2019/8/9 20:54, Thomas Gleixner wrote:
> > + local_irq_disable();
> > /*
> > * Setup the APIC counter to maximum. There is no way the lapic
> > * can underflow in the 100ms detection time frame
> > */
> > __setup_APIC_LVTT(0xffffffff, 0, 0);
> >
> > - /* Let the interrupts run */
> > - local_irq_enable();
> > + /*
> > + * Methods to terminate the calibration loop:
> > + * 1) Global clockevent if available (jiffies)
> > + * 2) TSC if available and frequency is known
> > + */
> > + jif_start = READ_ONCE(jiffies);
> > +
> > + if (tsc_khz) {
> > + tsc_start = rdtsc();
> > + tsc_perj = div_u64((u64)tsc_khz * 1000, HZ);
> > + }
> > +
> > + while (lapic_cal_loops <= LAPIC_CAL_LOOPS) {
>
> Is this loop still meaningful, can we just invoke the handler twice
> before and after the tick?

And that solves what?

> Thanks,
> -Aubrey

<Remove tons of useless quote>

Can you please trim your replies?

Thanks,

tglx


\
 
 \ /
  Last update: 2019-08-12 14:25    [W:0.235 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site