Re: [PATCH/RFC] m68k/bitops: Make bitmap data pointer of atomic ops volatile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 07, 2011 at 01:22:29PM +0200, Arnd Bergmann wrote:
> On Tuesday 07 June 2011, Geert Uytterhoeven wrote:
> > You mean the host_busy variable in the IDE code?
> > That would also apply to context_flag in the DRM code:
> > 
> > drivers/gpu/drm/drm_context.c:233: warning: passing argument 2 of
> > â__constant_test_and_set_bitâ discards qualifiers from pointer target
> > type
> > drivers/gpu/drm/drm_context.c:233: warning: passing argument 2 of
> > â__generic_test_and_set_bitâ discards qualifiers from pointer target
> > type
> 
> Yes, that fits the same category.
> 
> > > is wrong, though. It probably doesn't hurt to do both.
> > 
> > asm-generic/bitops/atomic.h has the volatiles everywhere. That's why
> > I'm wondering.
> 
> I guess what happened is that some variables are traditionally marked
> as volatile although they shouldn't be, and most architectures have
> adapted their bitops to make the warnings go away. If you see more
> warnings of that kind, it's probably fine to just do the same on m68k.
> The volatile modifier doesn't really hurt in this case.
 
These operations are required to be atomic and therefore they
must be suitable for use with volatile-qualified variables.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux