arm64: Restrict ARM64_ERRATUM_1188873 mitigation to AArch32
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 15 Apr 2019 12:03:51 +0000 (13:03 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 30 Apr 2019 13:45:53 +0000 (14:45 +0100)
commit0f80cad3124f986d0e46c14d46b8da06d87a2bf4
tree23b6c711f1bf624708c45a7dc54d464b8687400e
parent79a3aaa7b82e3106be97842dedfd8429248896e6
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>
arch/arm64/kernel/entry.S
drivers/clocksource/arm_arch_timer.c