]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
1da177e4 LT |
2 | /* asm/bitops.h for Linux/CRIS |
3 | * | |
4 | * TODO: asm versions if speed is needed | |
5 | * | |
6 | * All bit operations return 0 if the bit was cleared before the | |
7 | * operation and != 0 if it was not. | |
8 | * | |
9 | * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). | |
10 | */ | |
11 | ||
12 | #ifndef _CRIS_BITOPS_H | |
13 | #define _CRIS_BITOPS_H | |
14 | ||
15 | /* Currently this is unsuitable for consumption outside the kernel. */ | |
16 | #ifdef __KERNEL__ | |
17 | ||
0624517d JS |
18 | #ifndef _LINUX_BITOPS_H |
19 | #error only <linux/bitops.h> can be included directly | |
20 | #endif | |
21 | ||
556dcee7 | 22 | #include <arch/bitops.h> |
1da177e4 | 23 | #include <linux/compiler.h> |
17b40213 | 24 | #include <asm/barrier.h> |
1da177e4 | 25 | |
f6475111 | 26 | #include <asm-generic/bitops/atomic.h> |
e9f26df1 | 27 | #include <asm-generic/bitops/non-atomic.h> |
1da177e4 LT |
28 | |
29 | /* | |
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. | |
33 | */ | |
0eb808eb | 34 | #define ffs(x) kernel_ffs(x) |
1da177e4 | 35 | |
e9f26df1 | 36 | #include <asm-generic/bitops/fls.h> |
0999769e | 37 | #include <asm-generic/bitops/__fls.h> |
e9f26df1 AM |
38 | #include <asm-generic/bitops/fls64.h> |
39 | #include <asm-generic/bitops/hweight.h> | |
40 | #include <asm-generic/bitops/find.h> | |
26333576 | 41 | #include <asm-generic/bitops/lock.h> |
1da177e4 | 42 | |
861b5ae7 | 43 | #include <asm-generic/bitops/le.h> |
1da177e4 | 44 | |
148817ba | 45 | #include <asm-generic/bitops/ext2-atomic-setbit.h> |
1da177e4 | 46 | |
e9f26df1 | 47 | #include <asm-generic/bitops/sched.h> |
1da177e4 LT |
48 | |
49 | #endif /* __KERNEL__ */ | |
50 | ||
51 | #endif /* _CRIS_BITOPS_H */ |