On Mon, 2008-09-01 at 14:51 +0200, Nick Piggin wrote:
> Hi,
> 
> This is a sweep of the tree to remove volatile qualifier from bitops, and I
> have then tried to fix the resulting fallout. This will be split up as
> individual patches before submission, but for now I include the entire thing
> in one.
> 
> The benefit of this is to relieve the compiler of the constraints demanded
> by volatile, we get a smaller icache footprint, generally due to fewer loads
> and stores. It saves over 20k of text on an allyesconfig on x86-64. (BTW. gcc
> really does some idiotic things when inline is nooped: it out of lines things
> like constant_test_bit...)
> 
> The downside is that we can no longer use bitops on volatile data types, but
> there are very few users of this, and it would be nice to convert them away
> from volatile anyway. I have attempted to do that here:

> drm:  Made wrapped and context_state non volatile. Remember set_bit and
>       clear_bit can't be used to open and close a critical section (is
>       wrapped OK here?).

Our ioctls rely on a lock being held around all the code, which is
guaranteed by using .ioctl instead of .unlocked_ioctl as I understand.
Removing the volatile from both of these should be safe.

-- 
Eric Anholt
[EMAIL PROTECTED]                         [EMAIL PROTECTED]


Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to