* Does sfence.vma implicitly cover what fence.i does?
@ 2019-10-09 8:53 Alan Kao
2019-10-16 18:55 ` Paul Walmsley
0 siblings, 1 reply; 2+ messages in thread
From: Alan Kao @ 2019-10-09 8:53 UTC (permalink / raw)
To: paul.walmsley, palmer; +Cc: linux-riscv
Hi Paul, Palmer,
In arch/riscv/include/asm/tlbflush.h, the comment says
> 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
> 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
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Does sfence.vma implicitly cover what fence.i does?
2019-10-09 8:53 Does sfence.vma implicitly cover what fence.i does? Alan Kao
@ 2019-10-16 18:55 ` Paul Walmsley
0 siblings, 0 replies; 2+ messages in thread
From: Paul Walmsley @ 2019-10-16 18:55 UTC (permalink / raw)
To: Alan Kao; +Cc: linux-riscv, palmer
Hi Alan,
On Wed, 9 Oct 2019, Alan Kao wrote:
> In arch/riscv/include/asm/tlbflush.h, the comment says
>
> > 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
>
> > 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/alpine.DEB.2.21.9999.1910141254360.12988@viisi.sifive.com/T/#u
Thanks for bringing this up,
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-16 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 8:53 Does sfence.vma implicitly cover what fence.i does? Alan Kao
2019-10-16 18:55 ` Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).