Arnd Bergmann | 9858c60 | 2009-05-13 22:56:32 +0000 | [diff] [blame] | 1 | #ifndef __ASM_GENERIC_BITOPS_H |
| 2 | #define __ASM_GENERIC_BITOPS_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
| 4 | /* |
| 5 | * For the benefit of those who are trying to port Linux to another |
| 6 | * architecture, here are some C-language equivalents. You should |
| 7 | * recode these in the native assembly language, if at all possible. |
Arnd Bergmann | 9858c60 | 2009-05-13 22:56:32 +0000 | [diff] [blame] | 8 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * C language equivalents written by Theodore Ts'o, 9/26/92 |
| 10 | */ |
| 11 | |
Arnd Bergmann | 9858c60 | 2009-05-13 22:56:32 +0000 | [diff] [blame] | 12 | #include <linux/irqflags.h> |
| 13 | #include <linux/compiler.h> |
| 14 | |
| 15 | /* |
| 16 | * clear_bit may not imply a memory barrier |
| 17 | */ |
| 18 | #ifndef smp_mb__before_clear_bit |
| 19 | #define smp_mb__before_clear_bit() smp_mb() |
| 20 | #define smp_mb__after_clear_bit() smp_mb() |
| 21 | #endif |
| 22 | |
Akinobu Mita | f51a05c | 2006-03-26 01:39:50 -0800 | [diff] [blame] | 23 | #include <asm-generic/bitops/__ffs.h> |
| 24 | #include <asm-generic/bitops/ffz.h> |
| 25 | #include <asm-generic/bitops/fls.h> |
Arnd Bergmann | 9858c60 | 2009-05-13 22:56:32 +0000 | [diff] [blame] | 26 | #include <asm-generic/bitops/__fls.h> |
Akinobu Mita | f51a05c | 2006-03-26 01:39:50 -0800 | [diff] [blame] | 27 | #include <asm-generic/bitops/fls64.h> |
| 28 | #include <asm-generic/bitops/find.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Jiri Slaby | 0624517 | 2007-10-18 23:40:26 -0700 | [diff] [blame] | 30 | #ifndef _LINUX_BITOPS_H |
| 31 | #error only <linux/bitops.h> can be included directly |
| 32 | #endif |
| 33 | |
Akinobu Mita | f51a05c | 2006-03-26 01:39:50 -0800 | [diff] [blame] | 34 | #include <asm-generic/bitops/sched.h> |
| 35 | #include <asm-generic/bitops/ffs.h> |
| 36 | #include <asm-generic/bitops/hweight.h> |
Nick Piggin | 2633357 | 2007-10-18 03:06:39 -0700 | [diff] [blame] | 37 | #include <asm-generic/bitops/lock.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | |
Arnd Bergmann | 9858c60 | 2009-05-13 22:56:32 +0000 | [diff] [blame] | 39 | #include <asm-generic/bitops/atomic.h> |
| 40 | #include <asm-generic/bitops/non-atomic.h> |
Akinobu Mita | f51a05c | 2006-03-26 01:39:50 -0800 | [diff] [blame] | 41 | #include <asm-generic/bitops/ext2-non-atomic.h> |
| 42 | #include <asm-generic/bitops/ext2-atomic.h> |
| 43 | #include <asm-generic/bitops/minix.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
Arnd Bergmann | 9858c60 | 2009-05-13 22:56:32 +0000 | [diff] [blame] | 45 | #endif /* __ASM_GENERIC_BITOPS_H */ |