diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-10-16 16:28:38 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-10-19 23:49:05 +0200 |
commit | 21492e1333a0d07af6968667f128e19088cf5ead (patch) | |
tree | e9c0acefa6bff885274b37ef0de7804821da01e6 /drivers/clocksource/timer-of.h | |
parent | 2d764649e4b18409a65befb2bdf1483dd56b992b (diff) | |
download | linux-rt-21492e1333a0d07af6968667f128e19088cf5ead.tar.gz |
clocksource/drivers/arm_arch_timer: Validate CNTFRQ after enabling frame
The ACPI GTDT code validates the CNTFRQ field of each MMIO timer
frame against the CNTFRQ system register of the current CPU, to
ensure that they are equal, which is mandated by the architecture.
However, reading the CNTFRQ field of a frame is not possible until
the RFRQ bit in the frame's CNTACRn register is set, and doing so
before that willl produce the following error:
arch_timer: [Firmware Bug]: CNTFRQ mismatch: frame @ 0x00000000e0be0000: (0x00000000), CPU: (0x0ee6b280)
arch_timer: Disabling MMIO timers due to CNTFRQ mismatch
arch_timer: Failed to initialize memory-mapped timer.
The reason is that the CNTFRQ field is RES0 if access is not enabled.
So move the validation of CNTFRQ into the loop that iterates over the
timers to find the best frame, but defer it until after we have selected
the best frame, which should also have enabled the RFRQ bit.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/timer-of.h')
0 files changed, 0 insertions, 0 deletions