linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Allwinner A64 timer workaround
@ 2019-01-13  2:17 Samuel Holland
  2019-01-13  2:17 ` [PATCH v3 1/2] arm64: arch_timer: Workaround for Allwinner A64 timer instability Samuel Holland
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Samuel Holland @ 2019-01-13  2:17 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Maxime Ripard, Chen-Yu Tsai,
	Rob Herring, Mark Rutland, Daniel Lezcano, Thomas Gleixner,
	Marc Zyngier
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-sunxi, Samuel Holland

This is the third version of a patch series to fix system clock jumps
and other timer instability on the Allwinner A64 SoC. It has now been
tested for a week, and I've received no reports of date jumps with this
version. So this is, as far as I can tell, a complete workaround.

See the commit messages for a detailed description of the issue, but the
summary is that, when a high counter bit rolls over, indeterminance in
the low bits causes CNTPCT/CNTVCT and their respective TVAL registers to
jump forward or backward. Backward jumps (or the next read after forward
jumps) are sometimes seen by the kernel and interpreted as the timer
wrapping around after 2^56 cycles. This causes the system clock to jump
forward approximately 91 years.

changes since v2;
- Reduced workaround threshold from 11 to 10 bits based on reports from
  other hardare and the U-Boot version of this workaround
- Added TVAL handling based on Marc's suggestion
- Added erratum documentation and renamed symbols to match
- Added Maxime's Acked-by

changes since v1:
- Add an iteration limit like most other arch timer workarounds
- Added Andre's Tested-by

Samuel Holland (2):
  arm64: arch_timer: Workaround for Allwinner A64 timer instability
  arm64: dts: allwinner: a64: Enable A64 timer workaround

 Documentation/arm64/silicon-errata.txt        |  2 +
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi |  1 +
 drivers/clocksource/Kconfig                   | 10 ++++
 drivers/clocksource/arm_arch_timer.c          | 55 +++++++++++++++++++
 4 files changed, 68 insertions(+)

-- 
2.19.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-12-04 15:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-13  2:17 [PATCH v3 0/2] Allwinner A64 timer workaround Samuel Holland
2019-01-13  2:17 ` [PATCH v3 1/2] arm64: arch_timer: Workaround for Allwinner A64 timer instability Samuel Holland
2019-01-14  9:25   ` Marc Zyngier
2019-12-04  4:18     ` [linux-sunxi] " Vasily Khoruzhick
2019-12-04 12:21       ` Marc Zyngier
2019-12-04 15:37         ` Vasily Khoruzhick
2019-01-13  2:17 ` [PATCH v3 2/2] arm64: dts: allwinner: a64: Enable A64 timer workaround Samuel Holland
2019-01-24 10:06   ` [linux-sunxi] " Chen-Yu Tsai
2019-01-14 12:56 ` [PATCH v3 0/2] Allwinner " Daniel Lezcano
2019-01-15  2:52   ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).