diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2025-09-25 10:45:17 +0200 |
|---|---|---|
| committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2025-09-29 13:52:08 +0200 |
| commit | f0edc8f113a39d1c9f8cf83e865c32b0668d80e0 (patch) | |
| tree | ba0ee12e70c47836419c182df03c74053c373544 /drivers/s390/cio/ioasm.c | |
| parent | s390: Add -Wno-pointer-sign to KBUILD_CFLAGS_DECOMPRESSOR (diff) | |
| download | linux-f0edc8f113a39d1c9f8cf83e865c32b0668d80e0.tar.gz linux-f0edc8f113a39d1c9f8cf83e865c32b0668d80e0.zip | |
s390/cio/ioasm: Fix __xsch() condition code handling
For the __xsch() inline assembly the conversion to flag output macros is
incomplete. Only the conditional shift of the return value was added, while
the required changes to the inline assembly itself are missing.
If compiled with GCC versions before 14.2 this leads to a double shift of
the cc output operand and therefore the returned value of __xsch() is
incorrectly always zero, instead of the expected condition code.
Fixes: e200565d434b ("s390/cio/ioasm: Convert to use flag output macros")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/cio/ioasm.c')
| -rw-r--r-- | drivers/s390/cio/ioasm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/cio/ioasm.c b/drivers/s390/cio/ioasm.c index a540045b64a6..8b06b234e110 100644 --- a/drivers/s390/cio/ioasm.c +++ b/drivers/s390/cio/ioasm.c @@ -253,11 +253,10 @@ static inline int __xsch(struct subchannel_id schid) asm volatile( " lgr 1,%[r1]\n" " xsch\n" - " ipm %[cc]\n" - " srl %[cc],28\n" - : [cc] "=&d" (ccode) + CC_IPM(cc) + : CC_OUT(cc, ccode) : [r1] "d" (r1) - : "cc", "1"); + : CC_CLOBBER_LIST("1")); return CC_TRANSFORM(ccode); } |
