1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef __ASM_CSKY_BITOPS_H
4 #define __ASM_CSKY_BITOPS_H
6 #include <linux/compiler.h>
7 #include <asm/barrier.h>
10 * asm-generic/bitops/ffs.h
12 static inline int ffs(int x)
27 * asm-generic/bitops/__ffs.h
29 static __always_inline unsigned long __ffs(unsigned long x)
40 * asm-generic/bitops/fls.h
42 static __always_inline int fls(unsigned int x)
53 * asm-generic/bitops/__fls.h
55 static __always_inline unsigned long __fls(unsigned long x)
60 #include <asm-generic/bitops/ffz.h>
61 #include <asm-generic/bitops/fls64.h>
62 #include <asm-generic/bitops/find.h>
64 #ifndef _LINUX_BITOPS_H
65 #error only <linux/bitops.h> can be included directly
68 #include <asm-generic/bitops/sched.h>
69 #include <asm-generic/bitops/hweight.h>
70 #include <asm-generic/bitops/lock.h>
71 #include <asm-generic/bitops/atomic.h>
74 * bug fix, why only could use atomic!!!!
76 #include <asm-generic/bitops/non-atomic.h>
77 #define __clear_bit(nr, vaddr) clear_bit(nr, vaddr)
79 #include <asm-generic/bitops/le.h>
80 #include <asm-generic/bitops/ext2-atomic.h>
81 #endif /* __ASM_CSKY_BITOPS_H */