Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fe43b6c3 authored by James Morse's avatar James Morse Committed by Srinivas Ramana
Browse files

arm64: mm: Workaround Cortex-A77 erratum 1542418 on ASID rollover



On affected Cortex-A77 cores, software relying on the
prefetch-speculation-protection instead of explicit synchronisation may
fetch a stale instruction from a CPU-specific cache. This violates the
ordering rules for instruction fetches.

This can only happen when the CPU correctly predicts the modified branch
based on a previous ASID/VMID. The workaround is to prevent these
predictions by selecting 60 ASIDs before an ASID is reused.

Add this logic as a workaround in the asid-alloctor's per-cpu rollover
path. When the first asid of the new generation is about to be used,
select 60 different ASIDs before we do the TLB maintenance.

Change-Id: If51a1bfc56679161eab3a79c535f92f7a0ab0882
Signed-off-by: default avatarJames Morse <james.morse@arm.com>
[suzuki.poulose@arm.com: Added/modified commentary ]
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Patch-mainline: linux-arm-kernel @ 11/14/19, 14:59
[sramana@codeaurora.org: Resolve merge conflicts. Always return false
on CNP feature check as its not supported yet on this kernel ]
Signed-off-by: default avatarSrinivas Ramana <sramana@codeaurora.org>
parent b4a6b5b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment