Skip to contentSkip to conversation

include/linux/atomic.h: include asm-generic/atomic-long.h after asm-generic/atomic64.h

PATCH New Darius Rad 1 participant 1 message Aug 25, 2014 Atomic infrastructure

lore
Share & tools
lore

Darius Rad

author
#0 lore raw

PATCH 1/1 include/linux/atomic.h: include asm-generic/atomic-long.h after asm-generic/atomic64.h

Move the include of asm-generic/atomic-long.h to after the conditional include of asm-generic/atomic64.h. This is necessary if CONFIG_GENERIC_ATOMIC64 is y and BITS_PER_LONG == 64, because atomic-long.h uses functions declared in atomic64.h.

---
It does not appear that this is relevant to architectures that are in the kernel tree (i.e., no architectures use GENERIC_ATOMIC64 on 64-bit). It is relevant, however, to certain combinations of options for the RISC-V architecture currently in development.

Patch generated against 3.17-rc1.

 include/linux/atomic.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/atomic.h +1 -1
@@ -160,8 +160,8 @@ static inline void atomic_or(int i, atom
 }
 #endif /* #ifndef CONFIG_ARCH_HAS_ATOMIC_OR */
 
-#include <asm-generic/atomic-long.h>
 #ifdef CONFIG_GENERIC_ATOMIC64
 #include <asm-generic/atomic64.h>
 #endif
+#include <asm-generic/atomic-long.h>
 #endif /* _LINUX_ATOMIC_H */