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

index aec9eb16b6f7beb4b09b4d4682e8835a60ba2bd2..4a0f422cfeb64b4b141c9d4301fb7fab2603a08c 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/pgalloc.h>
 #include <asm/kfence.h>
 #include <asm/page.h>
+#include <asm/asm.h>
 #include <asm/set_memory.h>
 
 static inline unsigned long sske_frame(unsigned long addr, unsigned char skey)
@@ -414,11 +415,11 @@ bool kernel_page_present(struct page *page)
        addr = (unsigned long)page_address(page);
        asm volatile(
                "       lra     %[addr],0(%[addr])\n"
-               "       ipm     %[cc]\n"
-               : [cc] "=d" (cc), [addr] "+a" (addr)
+               CC_IPM(cc)
+               : CC_OUT(cc, cc), [addr] "+a" (addr)
                :
-               : "cc");
-       return (cc >> 28) == 0;
+               : CC_CLOBBER);
+       return CC_TRANSFORM(cc) == 0;
 }
 
 #if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)