Skip to content
/ linux Public

Commit c962bdc

Browse files
hcahcagregkh
authored andcommitted
s390/xor: Fix xor_xc_2() inline assembly constraints
commit f775276 upstream. The inline assembly constraints for xor_xc_2() are incorrect. "bytes", "p1", and "p2" are input operands, while all three of them are modified within the inline assembly. Given that the function consists only of this inline assembly it seems unlikely that this may cause any problems, however fix this in any case. Fixes: 2cfc5f9 ("s390/xor: optimized xor routing using the XC instruction") Cc: stable@vger.kernel.org Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Link: https://lore.kernel.org/r/20260302133500.1560531-2-hca@linux.ibm.com Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6949c35 commit c962bdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/lib/xor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ static void xor_xc_2(unsigned long bytes, unsigned long * __restrict p1,
2929
" j 3f\n"
3030
"2: xc 0(1,%1),0(%2)\n"
3131
"3:\n"
32-
: : "d" (bytes), "a" (p1), "a" (p2)
33-
: "0", "1", "cc", "memory");
32+
: "+d" (bytes), "+a" (p1), "+a" (p2)
33+
: : "0", "1", "cc", "memory");
3434
}
3535

3636
static void xor_xc_3(unsigned long bytes, unsigned long * __restrict p1,

0 commit comments

Comments
 (0)