[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0707241017440.3607@woody.linux-foundation.org>
Date: Tue, 24 Jul 2007 10:20:50 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
cc: Satyam Sharma <ssatyam@....iitk.ac.in>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
David Howells <dhowells@...hat.com>,
Nick Piggin <nickpiggin@...oo.com.au>, Andi Kleen <ak@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/8] i386: bitops: Kill volatile-casting of memory
addresses
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists