Skip to content

Commit 4c8eb19

Browse files
riscv: tlbflush: remove confusing comment on local_flush_tlb_all()
Remove a confusing comment on our local_flush_tlb_all() implementation. Per an internal discussion with Andrew, while it's true that the fence.i is not necessary, it's not the case that an sfence.vma implies a fence.i. We also drop the section about "flush[ing] the entire local TLB" to better align with the language in section 4.2.1 "Supervisor Memory-Management Fence Instruction" of the RISC-V Privileged Specification v20190608. Fixes: c901e45 ("RISC-V: `sfence.vma` orderes the instruction cache") Reported-by: Alan Kao <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Andrew Waterman <[email protected]> Signed-off-by: Paul Walmsley <[email protected]>
1 parent 2993c9b commit 4c8eb19

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/riscv/include/asm/tlbflush.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#include <linux/mm_types.h>
1111
#include <asm/smp.h>
1212

13-
/*
14-
* Flush entire local TLB. 'sfence.vma' implicitly fences with the instruction
15-
* cache as well, so a 'fence.i' is not necessary.
16-
*/
1713
static inline void local_flush_tlb_all(void)
1814
{
1915
__asm__ __volatile__ ("sfence.vma" : : : "memory");

0 commit comments

Comments
 (0)