Skip to content

Commit

Permalink
arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD
Browse files Browse the repository at this point in the history
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/[email protected]
Reviewed-by: Catalin Marinas <[email protected]>
Reviewed-by: Mark Rutland <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
willdeacon committed Oct 1, 2020
1 parent 6a1bdb1 commit 80d6b46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/kernel/cpufeature.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,7 @@ static inline void __cpu_enable_hw_dbm(void)

write_sysreg(tcr, tcr_el1);
isb();
local_flush_tlb_all();
}

static bool cpu_has_broken_dbm(void)
Expand Down

0 comments on commit 80d6b46

Please sign in to comment.