Skip to content

Commit 80d6b46

Browse files
committed
arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD
TCR_EL1.HD is permitted to be cached in a TLB, so invalidate the local TLB after setting the bit when detected support for the feature. Although this isn't strictly necessary, since we can happily operate with the bit effectively clear, the current code uses an ISB in a half-hearted attempt to make the change effective, so let's just fix that up. Link: https://lore.kernel.org/r/20201001110405.18617-1-will@kernel.org Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 6a1bdb1 commit 80d6b46

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/arm64/kernel/cpufeature.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,7 @@ static inline void __cpu_enable_hw_dbm(void)
14431443

14441444
write_sysreg(tcr, tcr_el1);
14451445
isb();
1446+
local_flush_tlb_all();
14461447
}
14471448

14481449
static bool cpu_has_broken_dbm(void)

0 commit comments

Comments
 (0)