1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 29858c60cSArnd Bergmann #ifndef __ASM_GENERIC_BITOPS_H 39858c60cSArnd Bergmann #define __ASM_GENERIC_BITOPS_H 41da177e4SLinus Torvalds 51da177e4SLinus Torvalds /* 61da177e4SLinus Torvalds * For the benefit of those who are trying to port Linux to another 7*5d0c9b0eSWill Deacon * architecture, here are some C-language equivalents. They should 8*5d0c9b0eSWill Deacon * generate reasonable code, so take a look at what your compiler spits 9*5d0c9b0eSWill Deacon * out before rolling your own buggy implementation in assembly language. 101da177e4SLinus Torvalds * 111da177e4SLinus Torvalds * C language equivalents written by Theodore Ts'o, 9/26/92 121da177e4SLinus Torvalds */ 131da177e4SLinus Torvalds 149858c60cSArnd Bergmann #include <linux/irqflags.h> 159858c60cSArnd Bergmann #include <linux/compiler.h> 16febdbfe8SPeter Zijlstra #include <asm/barrier.h> 179858c60cSArnd Bergmann 18f51a05c1SAkinobu Mita #include <asm-generic/bitops/__ffs.h> 19f51a05c1SAkinobu Mita #include <asm-generic/bitops/ffz.h> 20f51a05c1SAkinobu Mita #include <asm-generic/bitops/fls.h> 219858c60cSArnd Bergmann #include <asm-generic/bitops/__fls.h> 22f51a05c1SAkinobu Mita #include <asm-generic/bitops/fls64.h> 231da177e4SLinus Torvalds 240624517dSJiri Slaby #ifndef _LINUX_BITOPS_H 250624517dSJiri Slaby #error only <linux/bitops.h> can be included directly 260624517dSJiri Slaby #endif 270624517dSJiri Slaby 28f51a05c1SAkinobu Mita #include <asm-generic/bitops/sched.h> 29f51a05c1SAkinobu Mita #include <asm-generic/bitops/ffs.h> 30f51a05c1SAkinobu Mita #include <asm-generic/bitops/hweight.h> 3126333576SNick Piggin #include <asm-generic/bitops/lock.h> 321da177e4SLinus Torvalds 339858c60cSArnd Bergmann #include <asm-generic/bitops/atomic.h> 349858c60cSArnd Bergmann #include <asm-generic/bitops/non-atomic.h> 35861b5ae7SAkinobu Mita #include <asm-generic/bitops/le.h> 36f51a05c1SAkinobu Mita #include <asm-generic/bitops/ext2-atomic.h> 371da177e4SLinus Torvalds 389858c60cSArnd Bergmann #endif /* __ASM_GENERIC_BITOPS_H */ 39