diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2024-11-07 16:11:46 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2024-11-13 14:31:33 +0100 |
commit | 0b7265ae169ac64bdc3ac3de536c32e38ec249af (patch) | |
tree | 65b238d22e957d417c7f97f0de3a9dd33fd82e25 /arch | |
parent | 0caf91f6d695dac811b7959c98625238390ad075 (diff) | |
download | linux-0b7265ae169ac64bdc3ac3de536c32e38ec249af.tar.gz linux-0b7265ae169ac64bdc3ac3de536c32e38ec249af.tar.bz2 linux-0b7265ae169ac64bdc3ac3de536c32e38ec249af.zip |
s390/extmem: Convert to use flag output macros
Use flag output macros in inline asm to allow for better code generation if
the compiler has support for the flag output constraint.
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/mm/extmem.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c index 282fefe107a2..4692136c0af1 100644 --- a/arch/s390/mm/extmem.c +++ b/arch/s390/mm/extmem.c @@ -28,6 +28,7 @@ #include <asm/extmem.h> #include <asm/cpcmd.h> #include <asm/setup.h> +#include <asm/asm.h> #define DCSS_PURGESEG 0x08 #define DCSS_LOADSHRX 0x20 @@ -134,20 +135,21 @@ dcss_diag(int *func, void *parameter, unsigned long *ret1, unsigned long *ret2) { unsigned long rx, ry; - int rc; + int cc; rx = virt_to_phys(parameter); ry = (unsigned long) *func; diag_stat_inc(DIAG_STAT_X064); asm volatile( - " diag %0,%1,0x64\n" - " ipm %2\n" - " srl %2,28\n" - : "+d" (rx), "+d" (ry), "=d" (rc) : : "cc"); + " diag %[rx],%[ry],0x64\n" + CC_IPM(cc) + : CC_OUT(cc, cc), [rx] "+d" (rx), [ry] "+d" (ry) + : + : CC_CLOBBER); *ret1 = rx; *ret2 = ry; - return rc; + return CC_TRANSFORM(cc); } static inline int |