Subject: [PATCH] arm64: acpi/gtdt: validate CNTFRQ after having enabled the frame

From: [email-masked] (Mark Rutland)
Date: Tue, 1 Aug 2017 12:31:21 +0100

On Tue, Aug 01, 2017 at 12:09:32PM +0100, Ard Biesheuvel wrote:
> On 1 August 2017 at 11:53, Mark Rutland <[email-masked]> wrote:
> > On Mon, Jul 24, 2017 at 04:10:53PM +0100, Ard Biesheuvel wrote:
> >> So move the validation of CNTFRQ into the loop that iterates over the
> >> timers to find the best frame, and only validate the frame that has
> >> been selected as the best frame (and has thus been enabled).
> >
> > The intention here was to verify all frames, such that if/when we choose
> > to use other frames in future, CNTFRQ will be valid. This is stricter
> > than the DT case, which I'd also make stricter were it not for legacy.
> >
> > So while that check needs to be corrected, I'd like to retain the check
> > for all frames.
> 
> The point here is that CNTFRQ cannot differ between frames. It either
> returns the value of the base frame or RES0.

Sorry; you had mentioned this before, and I had forgotten.

I'm under the impression that the ARM ARM may be misleading (and
potentially erroneous) in that regard. In the past I had been told that
each instance of a CNTFRQ register was independent, and each must be
writeable for system initialization.

I will try to get that clarified ASAP.

Thanks,
Mark.