Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / cris / include / asm / bitops.h
blob78f975ad42d9db05b48df65761f3e4e3f5595589
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* asm/bitops.h for Linux/CRIS
4 * TODO: asm versions if speed is needed
6 * All bit operations return 0 if the bit was cleared before the
7 * operation and != 0 if it was not.
9 * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
12 #ifndef _CRIS_BITOPS_H
13 #define _CRIS_BITOPS_H
15 /* Currently this is unsuitable for consumption outside the kernel. */
16 #ifdef __KERNEL__
18 #ifndef _LINUX_BITOPS_H
19 #error only <linux/bitops.h> can be included directly
20 #endif
22 #include <arch/bitops.h>
23 #include <linux/compiler.h>
24 #include <asm/barrier.h>
26 #include <asm-generic/bitops/atomic.h>
27 #include <asm-generic/bitops/non-atomic.h>
30 * Since we define it "external", it collides with the built-in
31 * definition, which doesn't have the same semantics. We don't want to
32 * use -fno-builtin, so just hide the name ffs.
34 #define ffs(x) kernel_ffs(x)
36 #include <asm-generic/bitops/fls.h>
37 #include <asm-generic/bitops/__fls.h>
38 #include <asm-generic/bitops/fls64.h>
39 #include <asm-generic/bitops/hweight.h>
40 #include <asm-generic/bitops/find.h>
41 #include <asm-generic/bitops/lock.h>
43 #include <asm-generic/bitops/le.h>
45 #include <asm-generic/bitops/ext2-atomic-setbit.h>
47 #include <asm-generic/bitops/sched.h>
49 #endif /* __KERNEL__ */
51 #endif /* _CRIS_BITOPS_H */