All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD
@ 2020-10-01  9:39 Will Deacon
  2020-10-01  9:52 ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2020-10-01  9:39 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Catalin Marinas, Will Deacon

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.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
---
 arch/arm64/kernel/cpufeature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 6424584be01e..29de76046977 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -1442,7 +1442,7 @@ static inline void __cpu_enable_hw_dbm(void)
 	u64 tcr = read_sysreg(tcr_el1) | TCR_HD;
 
 	write_sysreg(tcr, tcr_el1);
-	isb();
+	local_flush_tlb_all();
 }
 
 static bool cpu_has_broken_dbm(void)
-- 
2.28.0.709.gb0816b6eb0-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-01 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01  9:39 [PATCH] arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD Will Deacon
2020-10-01  9:52 ` Catalin Marinas
2020-10-01 10:32   ` Will Deacon
2020-10-01 10:33   ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.