]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390: Move sske_frame() to a header
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Wed, 4 Feb 2026 15:02:33 +0000 (16:02 +0100)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Wed, 4 Feb 2026 16:00:08 +0000 (17:00 +0100)
Move the sske_frame() function to asm/pgtable.h, so it can be used in
other modules too.

Opportunistically convert the .insn opcode specification to the
appropriate mnemonic.

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
arch/s390/include/asm/pgtable.h
arch/s390/mm/pageattr.c

index 8194a2b12ecf8b125037ebd4e25a4a70d777810f..73c30b811b980bebff16d1d579b6102a49a67b42 100644 (file)
@@ -1136,6 +1136,13 @@ static inline pte_t pte_mkhuge(pte_t pte)
 }
 #endif
 
+static inline unsigned long sske_frame(unsigned long addr, unsigned char skey)
+{
+       asm volatile("sske %[skey],%[addr],1"
+                    : [addr] "+a" (addr) : [skey] "d" (skey));
+       return addr;
+}
+
 #define IPTE_GLOBAL    0
 #define        IPTE_LOCAL      1
 
index d3ce04a4b24864bbed62f878f7133ab71063fee9..bb29c38ae6241d1c634e5c81920d0826b4b5b275 100644 (file)
 #include <asm/asm.h>
 #include <asm/set_memory.h>
 
-static inline unsigned long sske_frame(unsigned long addr, unsigned char skey)
-{
-       asm volatile(".insn rrf,0xb22b0000,%[skey],%[addr],1,0"
-                    : [addr] "+a" (addr) : [skey] "d" (skey));
-       return addr;
-}
-
 void __storage_key_init_range(unsigned long start, unsigned long end)
 {
        unsigned long boundary, size;