Skip to content

Commit

Permalink
blackfin: fix cmpxchg build fails from system.h fallout
Browse files Browse the repository at this point in the history
Commit 3bed8d6 ("Disintegrate asm/system.h for Blackfin [ver #2]")
introduced arch/blackfin/include/asm/cmpxchg.h but has it also including
the asm-generic one which causes this:

  CC      arch/blackfin/kernel/asm-offsets.s
  In file included from arch/blackfin/include/asm/cmpxchg.h:125:0,
                 from arch/blackfin/include/asm/atomic.h:10,
                 from include/linux/atomic.h:4,
                 from include/linux/spinlock.h:384,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:57,
                 from arch/blackfin/kernel/asm-offsets.c:10:
  include/asm-generic/cmpxchg.h:24:15: error: redefinition of '__xchg'
  arch/blackfin/include/asm/cmpxchg.h:82:29: note: previous definition of '__xchg' was here
  make[2]: *** [arch/blackfin/kernel/asm-offsets.s] Error 1

It really only needs two simple defines from asm-generic, so just use
those instead.

Cc: Bob Liu <[email protected]>
Cc: Mike Frysinger <[email protected]>
Signed-off-by: Paul Gortmaker <[email protected]>
Acked-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Paul Gortmaker authored and torvalds committed Apr 2, 2012
1 parent 3d92e05 commit 1512cdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/blackfin/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
(unsigned long)(n), sizeof(*(ptr))))
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))

#include <asm-generic/cmpxchg.h>
#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))

#endif /* !CONFIG_SMP */

Expand Down

0 comments on commit 1512cdc

Please sign in to comment.