bitops.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_GENERIC_BITOPS_H
  3. #define __ASM_GENERIC_BITOPS_H
  4. /*
  5. * For the benefit of those who are trying to port Linux to another
  6. * architecture, here are some C-language equivalents. They should
  7. * generate reasonable code, so take a look at what your compiler spits
  8. * out before rolling your own buggy implementation in assembly language.
  9. *
  10. * C language equivalents written by Theodore Ts'o, 9/26/92
  11. */
  12. #include <linux/irqflags.h>
  13. #include <linux/compiler.h>
  14. #include <asm/barrier.h>
  15. #include <asm-generic/bitops/__ffs.h>
  16. #include <asm-generic/bitops/ffz.h>
  17. #include <asm-generic/bitops/fls.h>
  18. #include <asm-generic/bitops/__fls.h>
  19. #include <asm-generic/bitops/fls64.h>
  20. #include <asm-generic/bitops/find.h>
  21. #ifndef _LINUX_BITOPS_H
  22. #error only <linux/bitops.h> can be included directly
  23. #endif
  24. #include <asm-generic/bitops/sched.h>
  25. #include <asm-generic/bitops/ffs.h>
  26. #include <asm-generic/bitops/hweight.h>
  27. #include <asm-generic/bitops/lock.h>
  28. #include <asm-generic/bitops/atomic.h>
  29. #include <asm-generic/bitops/non-atomic.h>
  30. #include <asm-generic/bitops/le.h>
  31. #include <asm-generic/bitops/ext2-atomic.h>
  32. #endif /* __ASM_GENERIC_BITOPS_H */