2222 * region of memory concurrently, the effect may be that only one operation
2323 * succeeds.
2424 */
25- static inline void __set_bit (long nr , volatile unsigned long * addr )
25+ static __always_inline void __set_bit (long nr , volatile unsigned long * addr )
2626{
2727 instrument_write (addr + BIT_WORD (nr ), sizeof (long ));
2828 arch___set_bit (nr , addr );
@@ -37,7 +37,7 @@ static inline void __set_bit(long nr, volatile unsigned long *addr)
3737 * region of memory concurrently, the effect may be that only one operation
3838 * succeeds.
3939 */
40- static inline void __clear_bit (long nr , volatile unsigned long * addr )
40+ static __always_inline void __clear_bit (long nr , volatile unsigned long * addr )
4141{
4242 instrument_write (addr + BIT_WORD (nr ), sizeof (long ));
4343 arch___clear_bit (nr , addr );
@@ -52,13 +52,13 @@ static inline void __clear_bit(long nr, volatile unsigned long *addr)
5252 * region of memory concurrently, the effect may be that only one operation
5353 * succeeds.
5454 */
55- static inline void __change_bit (long nr , volatile unsigned long * addr )
55+ static __always_inline void __change_bit (long nr , volatile unsigned long * addr )
5656{
5757 instrument_write (addr + BIT_WORD (nr ), sizeof (long ));
5858 arch___change_bit (nr , addr );
5959}
6060
61- static inline void __instrument_read_write_bitop (long nr , volatile unsigned long * addr )
61+ static __always_inline void __instrument_read_write_bitop (long nr , volatile unsigned long * addr )
6262{
6363 if (IS_ENABLED (CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC )) {
6464 /*
@@ -90,7 +90,7 @@ static inline void __instrument_read_write_bitop(long nr, volatile unsigned long
9090 * This operation is non-atomic. If two instances of this operation race, one
9191 * can appear to succeed but actually fail.
9292 */
93- static inline bool __test_and_set_bit (long nr , volatile unsigned long * addr )
93+ static __always_inline bool __test_and_set_bit (long nr , volatile unsigned long * addr )
9494{
9595 __instrument_read_write_bitop (nr , addr );
9696 return arch___test_and_set_bit (nr , addr );
@@ -104,7 +104,7 @@ static inline bool __test_and_set_bit(long nr, volatile unsigned long *addr)
104104 * This operation is non-atomic. If two instances of this operation race, one
105105 * can appear to succeed but actually fail.
106106 */
107- static inline bool __test_and_clear_bit (long nr , volatile unsigned long * addr )
107+ static __always_inline bool __test_and_clear_bit (long nr , volatile unsigned long * addr )
108108{
109109 __instrument_read_write_bitop (nr , addr );
110110 return arch___test_and_clear_bit (nr , addr );
@@ -118,7 +118,7 @@ static inline bool __test_and_clear_bit(long nr, volatile unsigned long *addr)
118118 * This operation is non-atomic. If two instances of this operation race, one
119119 * can appear to succeed but actually fail.
120120 */
121- static inline bool __test_and_change_bit (long nr , volatile unsigned long * addr )
121+ static __always_inline bool __test_and_change_bit (long nr , volatile unsigned long * addr )
122122{
123123 __instrument_read_write_bitop (nr , addr );
124124 return arch___test_and_change_bit (nr , addr );
@@ -129,7 +129,7 @@ static inline bool __test_and_change_bit(long nr, volatile unsigned long *addr)
129129 * @nr: bit number to test
130130 * @addr: Address to start counting from
131131 */
132- static inline bool test_bit (long nr , const volatile unsigned long * addr )
132+ static __always_inline bool test_bit (long nr , const volatile unsigned long * addr )
133133{
134134 instrument_atomic_read (addr + BIT_WORD (nr ), sizeof (long ));
135135 return arch_test_bit (nr , addr );
0 commit comments