The atomic operations in asm/atomic.h are really useful from userspace too. Other architectures (i386, x86_64, mips) export these to userspace, but the powerpc versions are guarded by __KERNEL__ for some reason. Can we remove these if there is no good reason to guard them?
Signed-off-by: Brent Cook <bcook at bpointsys.com> Index: linux-2.6-bps/include/asm-powerpc/atomic.h =================================================================== --- linux-2.6-bps/include/asm-powerpc/atomic.h (revision 77) +++ linux-2.6-bps/include/asm-powerpc/atomic.h (working copy) @@ -7,7 +7,6 @@ typedef struct { volatile int counter; } atomic_t; -#ifdef __KERNEL__ #include <linux/compiler.h> #include <asm/synch.h> #include <asm/asm-compat.h> @@ -414,5 +413,4 @@ #endif /* __powerpc64__ */ #include <asm-generic/atomic.h> -#endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_ATOMIC_H_ */