diff options
Diffstat (limited to 'tools/perf/util/include/linux')
| -rw-r--r-- | tools/perf/util/include/linux/bitops.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h index 762bb83333c0..71f017dc6230 100644 --- a/tools/perf/util/include/linux/bitops.h +++ b/tools/perf/util/include/linux/bitops.h | |||
| @@ -29,21 +29,7 @@ | |||
| 29 | (bit) < (size); \ | 29 | (bit) < (size); \ |
| 30 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 30 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
| 31 | 31 | ||
| 32 | static inline void set_bit(int nr, unsigned long *addr) | 32 | #include <asm-generic/bitops/atomic.h> |
| 33 | { | ||
| 34 | addr[nr / BITS_PER_LONG] |= 1UL << (nr % BITS_PER_LONG); | ||
| 35 | } | ||
| 36 | |||
| 37 | static inline void clear_bit(int nr, unsigned long *addr) | ||
| 38 | { | ||
| 39 | addr[nr / BITS_PER_LONG] &= ~(1UL << (nr % BITS_PER_LONG)); | ||
| 40 | } | ||
| 41 | |||
| 42 | static __always_inline int test_bit(unsigned int nr, const unsigned long *addr) | ||
| 43 | { | ||
| 44 | return ((1UL << (nr % BITS_PER_LONG)) & | ||
| 45 | (((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0; | ||
| 46 | } | ||
| 47 | 33 | ||
| 48 | static inline unsigned long hweight_long(unsigned long w) | 34 | static inline unsigned long hweight_long(unsigned long w) |
| 49 | { | 35 | { |
