summaryrefslogtreecommitdiff
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-07-28 21:02:51 +0200
committerHeiko Carstens <hca@linux.ibm.com>2021-07-30 17:09:01 +0200
commitb3e1a00c8fa41a80aa402e5ca7f8cc78efa4f50b (patch)
treeff8158a36df838adf6e21e35f9b880d3550762c5 /arch/s390/include
parent00e67bf030e74a01afab8e0109244b9b0d7e2e43 (diff)
s390/mm: implement set_memory_4k()
Implement set_memory_4k() which will split any present large or huge mapping in the given range to a 4k mapping. Link: https://lore.kernel.org/r/20210728190254.3921642-2-hca@linux.ibm.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/set_memory.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/include/asm/set_memory.h b/arch/s390/include/asm/set_memory.h
index a22a5a81811c..950d87bd997a 100644
--- a/arch/s390/include/asm/set_memory.h
+++ b/arch/s390/include/asm/set_memory.h
@@ -10,6 +10,7 @@ extern struct mutex cpa_mutex;
#define SET_MEMORY_RW 2UL
#define SET_MEMORY_NX 4UL
#define SET_MEMORY_X 8UL
+#define SET_MEMORY_4K 16UL
int __set_memory(unsigned long addr, int numpages, unsigned long flags);
@@ -33,4 +34,9 @@ static inline int set_memory_x(unsigned long addr, int numpages)
return __set_memory(addr, numpages, SET_MEMORY_X);
}
+static inline int set_memory_4k(unsigned long addr, int numpages)
+{
+ return __set_memory(addr, numpages, SET_MEMORY_4K);
+}
+
#endif