Re: [PATCH] i386: add command line option "local_apic_timer_c2_ok"

Len Brown
2007-03-27T21:31:35Z

On Monday 26 March 2007 09:52, Thomas Gleixner wrote:
> On Mon, 2007-03-26 at 12:31 +0000, Pavel Machek wrote:
> > > + lapic_timer_c2_ok [IA-32,APIC] trust the local apic timer in
> > > + C2 power state.
> > > +

> I still twist my brain how to autodetect that in a safe way, which would
> make it really useful for the firmware tester.

I think the only fool-proof way to do this automatically is to
1. do a boot-time calibration vs HPET, RTC, or 8254 to make sure it starts sane.
ideally, this boot time test would enter the deepest available C-state --
as that would catch 99% of the failures.
2. do a _continuous_ sanity check against the same time to make sure it never gets off track.
It has to be continuous because we apparently have no control over
when the BIOS breaks it on some systems. However, continuous really
means "long term" here, because over the uptime of the system we'd
probably notice the drift between different timers etc, so we'd
have to reset the sanity check periodically to not get fooled by that.

If this worked, then we could delete the new DMI entry for the nx6325,
as that would get detected and disable the lapic timer use automatically.
We could also delete the check for C2 and the check for C3 to disable
the lapic timer.

-Len