aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/arm_arch_timer.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2019-04-15 08:03:51 -0400
committerWill Deacon <will.deacon@arm.com>2019-04-30 09:45:53 -0400
commit0f80cad3124f986d0e46c14d46b8da06d87a2bf4 (patch)
tree23b6c711f1bf624708c45a7dc54d464b8687400e /drivers/clocksource/arm_arch_timer.c
parent79a3aaa7b82e3106be97842dedfd8429248896e6 (diff)
arm64: Restrict ARM64_ERRATUM_1188873 mitigation to AArch32
We currently deal with ARM64_ERRATUM_1188873 by always trapping EL0 accesses for both instruction sets. Although nothing wrong comes out of that, people trying to squeeze the last drop of performance from buggy HW find this over the top. Oh well. Let's change the mitigation by flipping the counter enable bit on return to userspace. Non-broken HW gets an extra branch on the fast path, which is hopefully not the end of the world. The arch timer workaround is also removed. Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
-rw-r--r--drivers/clocksource/arm_arch_timer.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index aa4ec53281ce..da11a9508b77 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -319,13 +319,6 @@ static u64 notrace arm64_858921_read_cntvct_el0(void)
319} 319}
320#endif 320#endif
321 321
322#ifdef CONFIG_ARM64_ERRATUM_1188873
323static u64 notrace arm64_1188873_read_cntvct_el0(void)
324{
325 return read_sysreg(cntvct_el0);
326}
327#endif
328
329#ifdef CONFIG_SUN50I_ERRATUM_UNKNOWN1 322#ifdef CONFIG_SUN50I_ERRATUM_UNKNOWN1
330/* 323/*
331 * The low bits of the counter registers are indeterminate while bit 10 or 324 * The low bits of the counter registers are indeterminate while bit 10 or
@@ -457,14 +450,6 @@ static const struct arch_timer_erratum_workaround ool_workarounds[] = {
457 .read_cntvct_el0 = arm64_858921_read_cntvct_el0, 450 .read_cntvct_el0 = arm64_858921_read_cntvct_el0,
458 }, 451 },
459#endif 452#endif
460#ifdef CONFIG_ARM64_ERRATUM_1188873
461 {
462 .match_type = ate_match_local_cap_id,
463 .id = (void *)ARM64_WORKAROUND_1188873,
464 .desc = "ARM erratum 1188873",
465 .read_cntvct_el0 = arm64_1188873_read_cntvct_el0,
466 },
467#endif
468#ifdef CONFIG_SUN50I_ERRATUM_UNKNOWN1 453#ifdef CONFIG_SUN50I_ERRATUM_UNKNOWN1
469 { 454 {
470 .match_type = ate_match_dt, 455 .match_type = ate_match_dt,