34484277b1
Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h as all arch files that #include the former also #include the latter. See: grep -rl asm-generic/cmpxchg-local[.]h arch/ | sort > b grep -rl asm-generic/cmpxchg[.]h arch/ | sort > a comm a b This simplifies the disintegration of asm-generic/system.h for arches that don't have their own. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
25 lines
577 B
C
25 lines
577 B
C
#ifndef __ASM_GENERIC_CMPXCHG_H
|
|
#define __ASM_GENERIC_CMPXCHG_H
|
|
|
|
/*
|
|
* Generic cmpxchg
|
|
*
|
|
* Uses the local cmpxchg. Does not support SMP.
|
|
*/
|
|
#ifdef CONFIG_SMP
|
|
#error "Cannot use generic cmpxchg on SMP"
|
|
#endif
|
|
|
|
#include <asm-generic/cmpxchg-local.h>
|
|
|
|
/*
|
|
* Atomic compare and exchange.
|
|
*
|
|
* Do not define __HAVE_ARCH_CMPXCHG because we want to use it to check whether
|
|
* a cmpxchg primitive faster than repeated local irq save/restore exists.
|
|
*/
|
|
#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
|
|
#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))
|
|
|
|
#endif
|