]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround
authorSamuel Holland <samuel@sholland.org>
Sat, 15 May 2021 02:14:39 +0000 (21:14 -0500)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 16 Jun 2021 15:33:04 +0000 (17:33 +0200)
commit525794e3bba400de8b8c7e4548216293742dcdb8
tree18ec7113c022b700fd66fea7c89438afb66edb67
parent9ffd7e986834f9de14faeb8988506625c7410429
clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround

Bad counter reads are experienced sometimes when bit 10 or greater rolls
over. Originally, testing showed that at least 10 lower bits would be
set to the same value during these bad reads. However, some users still
reported time skips.

Wider testing revealed that on some chips, occasionally only the lowest
9 bits would read as the anomalous value. During these reads (which
still happen only when bit 10), bit 9 would read as the correct value.

Reduce the mask by one bit to cover these cases as well.

Cc: stable@vger.kernel.org
Fixes: 92c95c597200 ("clocksource/drivers/arch_timer: Workaround for Allwinner A64 timer instability")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210515021439.55316-1-samuel@sholland.org
drivers/clocksource/arm_arch_timer.c