[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <556F4C10.7050005@zytor.com>
Date: Wed, 03 Jun 2015 11:48:48 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: George Spelvin <linux@...izon.com>
CC: adrian.hunter@...el.com, ak@...ux.intel.com,
linux-kernel@...r.kernel.org, luto@...capital.net,
tglx@...utronix.de, torvalds@...ux-foundation.org
Subject: Re: [PATCH RFC] x86, tsc: Allow for high latency in quick_pit_calibrate()
On 06/03/2015 11:29 AM, George Spelvin wrote:
>
> Indeed, it's the only one which is guaranteed a separate crystal.
> Many low-cost chipsets generate ALL other frequencies from one crystal
> with PLLs.
>
Not guaranteed either, and I know for a fact there are platforms out
there which synthesize the RTC clock.
> But as I mentioned earlier, you *can* get higher frequencies with
> interrupts *or* polling. When you program the periodic event frequency
> (from 2 to 8192 Hz), it does three things at that rate:
>
> 1) Periodic interrupts (if enabled),
> 2) Square wave output (if enabled, and relevant to discrete chips only), and
> 3) Sets the PE bit (register C, bit 6), which is auto-cleared on read.
Ah, I wasn't aware of the PF (not PE) bit. That suddenly makes it a lot
more interesting. So polling for the PF bit suddenly makes sense, and
is probably the single best option for calibration.
> So if you're willing to poll the device (which the TSC calibration does
> already), you can get high resolution tick edges without interrupts.
>
> Because it's only one read (port 0x71), it's slightly faster than the PIT.
>
> (I also wish we could use all those TSC reads for initial entropy seeding
> somehow.)
Well, on x86 hopefully the entropy problem should soon be history...
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists