]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/mm: Convert to use flag output macros
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 7 Nov 2024 15:11:39 +0000 (16:11 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 13 Nov 2024 13:31:32 +0000 (14:31 +0100)
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>
arch/s390/include/asm/page.h

index 73e1e03317b433d4a737926706998781a0cc5003..4405084d55a4e7cb86800047036350a5e9b79f8f 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/const.h>
 #include <asm/types.h>
+#include <asm/asm.h>
 
 #define _PAGE_SHIFT    CONFIG_PAGE_SHIFT
 #define _PAGE_SIZE     (_AC(1, UL) << _PAGE_SHIFT)
@@ -148,11 +149,12 @@ static inline int page_reset_referenced(unsigned long addr)
        int cc;
 
        asm volatile(
-               "       rrbe    0,%1\n"
-               "       ipm     %0\n"
-               "       srl     %0,28\n"
-               : "=d" (cc) : "a" (addr) : "cc");
-       return cc;
+               "       rrbe    0,%[addr]\n"
+               CC_IPM(cc)
+               : CC_OUT(cc, cc)
+               : [addr] "a" (addr)
+               : CC_CLOBBER);
+       return CC_TRANSFORM(cc);
 }
 
 /* Bits int the storage key */