Skip to content

Commit 0a89123

Browse files
hcahcaAlexander Gordeev
authored andcommitted
s390/bitops: Use correct constraint for arch_test_bit() inline assembly
Use the "Q" instead of "R" constraint to correctly reflect the instruction format of the tm instruction: the first operand is a memory reference without index register and short displacement. The "R" constraint indicates a memory reference with index register instead. This may lead to compile errors like: arch/s390/include/asm/bitops.h: Assembler messages: arch/s390/include/asm/bitops.h:60: Error: operand 1: syntax error; missing ')' after base register arch/s390/include/asm/bitops.h:60: Error: operand 2: syntax error; ')' not allowed here arch/s390/include/asm/bitops.h:60: Error: junk at end of line: `,4' Reported-by: Nathan Chancellor <nathan@kernel.org> Closes: https://lore.kernel.org/r/20250122-s390-fix-std-for-gcc-15-v1-1-8b00cadee083@kernel.org Fixes: b2bc1b1 ("s390/bitops: Provide optimized arch_test_bit()") Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
1 parent dc287e4 commit 0a89123

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/include/asm/bitops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static __always_inline bool arch_test_bit(unsigned long nr, const volatile unsig
6060
asm volatile(
6161
" tm %[addr],%[mask]\n"
6262
: "=@cc" (cc)
63-
: [addr] "R" (*addr), [mask] "I" (mask)
63+
: [addr] "Q" (*addr), [mask] "I" (mask)
6464
);
6565
return cc == 3;
6666
}

0 commit comments

Comments
 (0)