Does sfence.vma implicitly cover what fence.i does?
Hi Paul, Palmer,
In arch/riscv/include/asm/tlbflush.h, the comment says
Quoted 2 lines
Flush entire local TLB. 'sfence.vma' implicitly fences with the instruction cache as well, so a 'fence.i' is not necessary.
and in the privileged spec, it is stated that
Quoted 3 lines
Executing an SFENCE.VMA instruction guarantees that any previous stores already visible to the current RISC-V hart are ordered before all subsequent implicit references from that hart to the memory-management data structures.
So my question is straightforward. Is I-cache a kind of memory-management data structure? am I missing something here?
Thanks for any clarification.
Alan
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Hi Alan,
Quoted 7 lines · Alan Kao
In
arch/riscv/include/asm/tlbflush.h, the comment saysQuoted 2 lines
Flush entire local TLB. 'sfence.vma' implicitly fences with the instruction cache as well, so a 'fence.i' is not necessary.
and in the privileged spec, it is stated that
Quoted 8 lines
Quoted 3 lines
Executing an SFENCE.VMA instruction guarantees that any previous stores already visible to the current RISC-V hart are ordered before all subsequent implicit references from that hart to the memory-management data structures.
So my question is straightforward. Is I-cache a kind of memory-management data structure? am I missing something here?
Thanks for any clarification.
We just had a discussion about this with Andrew. He clarified that SFENCE.VMA does not imply a FENCE.I, and we concluded that the comment in tlbflush.h is more confusing than helpful. So we'll remove it:
https://lore.kernel.org/linux-riscv/[email protected]/T/#u
Thanks for bringing this up,
- Paul
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv