]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: arch_timer: Work around QorIQ Erratum A-008585
authorScott Wood <oss@buserror.net>
Thu, 22 Sep 2016 08:35:17 +0000 (03:35 -0500)
committerWill Deacon <will.deacon@arm.com>
Fri, 23 Sep 2016 16:19:25 +0000 (17:19 +0100)
commit7a95c724f24052a45503ae6e09beb9e90764dd0f
treeb8b7e96634c2df9b8de85b5bb80923c2b6aeae97
parent15fc33168d9afc5e2977c7b355e664ed9cb31b1e
arm64: arch_timer: Work around QorIQ Erratum A-008585

Erratum A-008585 says that the ARM generic timer counter "has the
potential to contain an erroneous value for a small number of core
clock cycles every time the timer value changes".  Accesses to TVAL
(both read and write) are also affected due to the implicit counter
read.  Accesses to CVAL are not affected.

The workaround is to reread TVAL and count registers until successive
reads return the same value.  Writes to TVAL are replaced with an
equivalent write to CVAL.

The workaround is to reread TVAL and count registers until successive reads
return the same value, and when writing TVAL to retry until counter
reads before and after the write return the same value.

The workaround is enabled if the fsl,erratum-a008585 property is found in
the timer node in the device tree.  This can be overridden with the
clocksource.arm_arch_timer.fsl-a008585 boot parameter, which allows KVM
users to enable the workaround until a mechanism is implemented to
automatically communicate this information.

This erratum can be found on LS1043A and LS2080A.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Scott Wood <oss@buserror.net>
[will: renamed read macro to reflect that it's not usually unstable]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Documentation/arm64/silicon-errata.txt
Documentation/kernel-parameters.txt
arch/arm64/include/asm/arch_timer.h
drivers/clocksource/Kconfig
drivers/clocksource/arm_arch_timer.c