Skip to content

Commit b4fd5a0

Browse files
heicarstVasily Gorbik
authored andcommitted
s390/atomic,bitops: mark function(s) __always_inline
Always inline asm inlines with variable operands for "i" constraints, since they won't compile if the compiler would decide to not inline them. Reported-by: Michal Kubecek <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 51ce022 commit b4fd5a0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

arch/s390/include/asm/atomic_ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ __ATOMIC_OPS(__atomic64_xor, long, "laxg")
4141
#undef __ATOMIC_OP
4242

4343
#define __ATOMIC_CONST_OP(op_name, op_type, op_string, op_barrier) \
44-
static inline void op_name(op_type val, op_type *ptr) \
44+
static __always_inline void op_name(op_type val, op_type *ptr) \
4545
{ \
4646
asm volatile( \
4747
op_string " %[ptr],%[val]\n" \

arch/s390/include/asm/bitops.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ __bitops_byte(unsigned long nr, volatile unsigned long *ptr)
5656
return ((unsigned char *)ptr) + ((nr ^ (BITS_PER_LONG - 8)) >> 3);
5757
}
5858

59-
static inline void arch_set_bit(unsigned long nr, volatile unsigned long *ptr)
59+
static __always_inline void arch_set_bit(unsigned long nr, volatile unsigned long *ptr)
6060
{
6161
unsigned long *addr = __bitops_word(nr, ptr);
6262
unsigned long mask;
@@ -77,7 +77,7 @@ static inline void arch_set_bit(unsigned long nr, volatile unsigned long *ptr)
7777
__atomic64_or(mask, (long *)addr);
7878
}
7979

80-
static inline void arch_clear_bit(unsigned long nr, volatile unsigned long *ptr)
80+
static __always_inline void arch_clear_bit(unsigned long nr, volatile unsigned long *ptr)
8181
{
8282
unsigned long *addr = __bitops_word(nr, ptr);
8383
unsigned long mask;
@@ -98,8 +98,8 @@ static inline void arch_clear_bit(unsigned long nr, volatile unsigned long *ptr)
9898
__atomic64_and(mask, (long *)addr);
9999
}
100100

101-
static inline void arch_change_bit(unsigned long nr,
102-
volatile unsigned long *ptr)
101+
static __always_inline void arch_change_bit(unsigned long nr,
102+
volatile unsigned long *ptr)
103103
{
104104
unsigned long *addr = __bitops_word(nr, ptr);
105105
unsigned long mask;

0 commit comments

Comments
 (0)