Thread (121 messages) 121 messages, 13 authors, 2021-09-24

Re: [RFC] LKMM: Add volatile_if()

From: Segher Boessenkool <hidden>
Date: 2021-06-07 22:59:02
Also in: linux-toolchains, lkml

On Mon, Jun 07, 2021 at 01:31:24PM -0700, Linus Torvalds wrote:
quoted
Is it useful in general for the kernel to have separate "read" and
"write" clobbers in asm expressions?  And for other applications?
See above. It's actually not all that uncommon that you have a "this
doesn't modify memory, but you can't move writes around it". It's
usually very much about cache handling or memory ordering operations,
and that bit test example was probably a bad example exactly because
it made it look like it's about some controlled range.

The "write memory barroer" is likely the best and simplest example,
but it's in not the only one.
Thanks for the examples!  I opened <https://gcc.gnu.org/PR100953> so
that we can easily track it.


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help