aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/include/linux/bitops.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/include/linux/bitops.h')
-rw-r--r--tools/perf/util/include/linux/bitops.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/include/linux/bitops.h b/tools/perf/util/include/linux/bitops.h
index 45cf10a562bd..dadfa7e54287 100644
--- a/tools/perf/util/include/linux/bitops.h
+++ b/tools/perf/util/include/linux/bitops.h
@@ -87,13 +87,15 @@ static __always_inline unsigned long __ffs(unsigned long word)
87 return num; 87 return num;
88} 88}
89 89
90typedef const unsigned long __attribute__((__may_alias__)) long_alias_t;
91
90/* 92/*
91 * Find the first set bit in a memory region. 93 * Find the first set bit in a memory region.
92 */ 94 */
93static inline unsigned long 95static inline unsigned long
94find_first_bit(const unsigned long *addr, unsigned long size) 96find_first_bit(const unsigned long *addr, unsigned long size)
95{ 97{
96 const unsigned long *p = addr; 98 long_alias_t *p = (long_alias_t *) addr;
97 unsigned long result = 0; 99 unsigned long result = 0;
98 unsigned long tmp; 100 unsigned long tmp;
99 101