On Tue, 17 Nov 2020 12:00:32 +0900, Wonhyuk Yang said:
> > If you swap them, you get...
> >
> > dc ivac,x1   // invalidate a cache line that's probably OK
> > str w0,[x1   // and now we do a store that leaves a possibly stale cache 
> > line
> >
> > In other words, if you swap them you may leave an un-invalidated
> > stale cache line.
>
> You mean, even if STCLR_EL1.{C, M} is cleared, store doesn't bypass the
> cache?

That's the problem.  The store bypasses the cache line, and the next reference
that uses the cache can get stale data. So you have to flush the cache line
so the next reference has to refresh the cache on the memory read.

Attachment: pgpCkMigPy4aO.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to