Skip to content

Commit 34c4812

Browse files
committed
s390/pageattr: 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 <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent eade39c commit 34c4812

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/s390/mm/pageattr.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <asm/pgalloc.h>
1313
#include <asm/kfence.h>
1414
#include <asm/page.h>
15+
#include <asm/asm.h>
1516
#include <asm/set_memory.h>
1617

1718
static inline unsigned long sske_frame(unsigned long addr, unsigned char skey)
@@ -414,11 +415,11 @@ bool kernel_page_present(struct page *page)
414415
addr = (unsigned long)page_address(page);
415416
asm volatile(
416417
" lra %[addr],0(%[addr])\n"
417-
" ipm %[cc]\n"
418-
: [cc] "=d" (cc), [addr] "+a" (addr)
418+
CC_IPM(cc)
419+
: CC_OUT(cc, cc), [addr] "+a" (addr)
419420
:
420-
: "cc");
421-
return (cc >> 28) == 0;
421+
: CC_CLOBBER);
422+
return CC_TRANSFORM(cc) == 0;
422423
}
423424

424425
#if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)

0 commit comments

Comments
 (0)