Skip to contentSkip to conversation

RISC-V: Take a third shot at describing sfence.vma

PATCH New Palmer Dabbelt 1 participant 1 message Jun 18, 2019 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RISC-V: Take a third shot at describing sfence.vma

This is the third iteration of this comment. I've had the diff floating around for a while since someone pointed out that the original version didn't make any sense, but I forgot who pointed this out.

---
 arch/riscv/include/asm/tlbflush.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/riscv/include/asm/tlbflush.h +3 -2
index 54fee0cadb1e..8fda8974d8c7 100644
@@ -19,8 +19,9 @@
 #include <asm/smp.h>
 
 /*
- * Flush entire local TLB.  'sfence.vma' implicitly fences with the instruction
- * cache as well, so a 'fence.i' is not necessary.
+ * Flush entire local TLB.  'sfence.vma' enforces that all subsequent memory
+ * accesses, both from the instruction and data streams, respect all previously
+ * installed mappings.  Thus we do not need a fence.i here.
  */
 static inline void local_flush_tlb_all(void)
 {
Signature · 7 lines
2.21.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv