*/
static inline void __set_bit(long nr, volatile unsigned long *addr)
{
- if (!__is_defined(arch___set_bit_uses_plain_access))
- instrument_write(addr + BIT_WORD(nr), sizeof(long));
+ instrument_write(addr + BIT_WORD(nr), sizeof(long));
arch___set_bit(nr, addr);
}
*/
static inline void __clear_bit(long nr, volatile unsigned long *addr)
{
- if (!__is_defined(arch___clear_bit_uses_plain_access))
- instrument_write(addr + BIT_WORD(nr), sizeof(long));
+ instrument_write(addr + BIT_WORD(nr), sizeof(long));
arch___clear_bit(nr, addr);
}
*/
static inline void __change_bit(long nr, volatile unsigned long *addr)
{
- if (!__is_defined(arch___change_bit_uses_plain_access))
- instrument_write(addr + BIT_WORD(nr), sizeof(long));
+ instrument_write(addr + BIT_WORD(nr), sizeof(long));
arch___change_bit(nr, addr);
}
*/
static inline bool __test_and_set_bit(long nr, volatile unsigned long *addr)
{
- if (!__is_defined(arch___test_and_set_bit_uses_plain_access))
- __instrument_read_write_bitop(nr, addr);
+ __instrument_read_write_bitop(nr, addr);
return arch___test_and_set_bit(nr, addr);
}
*/
static inline bool __test_and_clear_bit(long nr, volatile unsigned long *addr)
{
- if (!__is_defined(arch___test_and_clear_bit_uses_plain_access))
- __instrument_read_write_bitop(nr, addr);
+ __instrument_read_write_bitop(nr, addr);
return arch___test_and_clear_bit(nr, addr);
}
*/
static inline bool __test_and_change_bit(long nr, volatile unsigned long *addr)
{
- if (!__is_defined(arch___test_and_change_bit_uses_plain_access))
- __instrument_read_write_bitop(nr, addr);
+ __instrument_read_write_bitop(nr, addr);
return arch___test_and_change_bit(nr, addr);
}
*/
static inline bool test_bit(long nr, const volatile unsigned long *addr)
{
- if (!__is_defined(arch_test_bit_uses_plain_access))
- instrument_atomic_read(addr + BIT_WORD(nr), sizeof(long));
+ instrument_atomic_read(addr + BIT_WORD(nr), sizeof(long));
return arch_test_bit(nr, addr);
}
*p |= mask;
}
-#define arch___set_bit_uses_plain_access
+#define __set_bit arch___set_bit
static __always_inline void
arch___clear_bit(int nr, volatile unsigned long *addr)
*p &= ~mask;
}
-#define arch___clear_bit_uses_plain_access
+#define __clear_bit arch___clear_bit
/**
* arch___change_bit - Toggle a bit in memory
*p ^= mask;
}
-#define arch___change_bit_uses_plain_access
+#define __change_bit arch___change_bit
/**
* arch___test_and_set_bit - Set a bit and return its old value
*p = old | mask;
return (old & mask) != 0;
}
-#define arch___test_and_set_bit_uses_plain_access
+#define __test_and_set_bit arch___test_and_set_bit
/**
* arch___test_and_clear_bit - Clear a bit and return its old value
*p = old & ~mask;
return (old & mask) != 0;
}
-#define arch___test_and_clear_bit_uses_plain_access
+#define __test_and_clear_bit arch___test_and_clear_bit
/* WARNING: non atomic and it can be reordered! */
static __always_inline int
*p = old ^ mask;
return (old & mask) != 0;
}
-#define arch___test_and_change_bit_uses_plain_access
+#define __test_and_change_bit arch___test_and_change_bit
/**
* arch_test_bit - Determine whether a bit is set
{
return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
}
-#define arch_test_bit_uses_plain_access
-
-#include <asm-generic/bitops/instrumented-non-atomic.h>
+#define test_bit arch_test_bit
#endif /* _ASM_GENERIC_BITOPS_NON_ATOMIC_H_ */