On Tue, 24 Jul 2007, Benjamin Herrenschmidt wrote:
>
> - This "volatile" will allow to pass pointers to volatile data to the
> bitops.
>
> - Most users of "volatile" in the kenrel (except maybe jiffies) are
> bogus
>
> - Thus let's remove it -as a type safety thing- to catch more of those
> stupid volatile that shouldn't be ? :-)
Quite frankly, I'd really really rather kill the "volatile" data
structures independently. Once that is done, it doesn't really matter any
more.
> Besides, as Nick pointed out, it prevents some valid optimizations.
No it doesn't. Not the ones on the functions that just do an inline asm.
The only valid optimization it might break is for "constant_test_bit()",
which isn't even using inline asm.
And before we remove that "volatile", we'd better make damn sure that
there isn't any driver that does
/* Wait for the command queue to be cleared by DMA */
while (test_bit(...))
;
or similar.
Yes, it's annoying, but this is a scary and subtle area. And we sadly
_have_ had code that does things like that.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]