Thread (3 messages) 3 messages, 3 authors, 2016-11-28

Re: powerpc: Fix __cmpxchg() to take a volatile ptr again

From: Michael Ellerman <hidden>
Date: 2016-11-28 12:15:18

On Fri, 2016-11-25 at 03:07:09 UTC, Michael Ellerman wrote:
In commit d0563a1297e2 ("powerpc: Implement {cmp}xchg for u8 and u16")
we removed the volatile from __cmpxchg().

This is leading to warnings such as:

  drivers/gpu/drm/drm_lock.c: In function ���drm_lock_take���:
  arch/powerpc/include/asm/cmpxchg.h:484:37: warning: passing argument 1
  of ���__cmpxchg��� discards ���volatile��� qualifier from pointer target
     (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,   \

There doesn't seem to be consensus across architectures whether the
argument is volatile or not, so at least for now put the volatile back.

Fixes: d0563a1297e2 ("powerpc: Implement {cmp}xchg for u8 and u16")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.

https://git.kernel.org/powerpc/c/da58b23cb976ab83a80d358102e139

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