diff options
Diffstat (limited to 'tools/perf/util/include/linux')
| -rw-r--r-- | tools/perf/util/include/linux/bitops.h | 6 | ||||
| -rw-r--r-- | tools/perf/util/include/linux/linkage.h | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h index bb4ac2e05385..305c8484f200 100644 --- a/tools/perf/util/include/linux/bitops.h +++ b/tools/perf/util/include/linux/bitops.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _PERF_LINUX_BITOPS_H_ | 2 | #define _PERF_LINUX_BITOPS_H_ |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
| 5 | #include <linux/compiler.h> | ||
| 5 | #include <asm/hweight.h> | 6 | #include <asm/hweight.h> |
| 6 | 7 | ||
| 7 | #define BITS_PER_LONG __WORDSIZE | 8 | #define BITS_PER_LONG __WORDSIZE |
| @@ -13,6 +14,11 @@ static inline void set_bit(int nr, unsigned long *addr) | |||
| 13 | addr[nr / BITS_PER_LONG] |= 1UL << (nr % BITS_PER_LONG); | 14 | addr[nr / BITS_PER_LONG] |= 1UL << (nr % BITS_PER_LONG); |
| 14 | } | 15 | } |
| 15 | 16 | ||
| 17 | static inline void clear_bit(int nr, unsigned long *addr) | ||
| 18 | { | ||
| 19 | addr[nr / BITS_PER_LONG] &= ~(1UL << (nr % BITS_PER_LONG)); | ||
| 20 | } | ||
| 21 | |||
| 16 | static __always_inline int test_bit(unsigned int nr, const unsigned long *addr) | 22 | static __always_inline int test_bit(unsigned int nr, const unsigned long *addr) |
| 17 | { | 23 | { |
| 18 | return ((1UL << (nr % BITS_PER_LONG)) & | 24 | return ((1UL << (nr % BITS_PER_LONG)) & |
diff --git a/tools/perf/util/include/linux/linkage.h b/tools/perf/util/include/linux/linkage.h new file mode 100644 index 000000000000..06387cffe125 --- /dev/null +++ b/tools/perf/util/include/linux/linkage.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | |||
| 2 | #ifndef PERF_LINUX_LINKAGE_H_ | ||
| 3 | #define PERF_LINUX_LINKAGE_H_ | ||
| 4 | |||
| 5 | /* linkage.h ... for including arch/x86/lib/memcpy_64.S */ | ||
| 6 | |||
| 7 | #define ENTRY(name) \ | ||
| 8 | .globl name; \ | ||
| 9 | name: | ||
| 10 | |||
| 11 | #define ENDPROC(name) | ||
| 12 | |||
| 13 | #endif /* PERF_LINUX_LINKAGE_H_ */ | ||
