summaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-04-14 14:30:44 +0200
committerVasily Gorbik <gor@linux.ibm.com>2023-04-20 11:36:29 +0200
commit0490d6d7ba0a479fdd805da54ae25220ce5b514d (patch)
treeea909a411bcdc09f10a4070b3a0d1a9d15f37907 /arch/s390/include
parent17c51b1ba9c2d4b497349ac1622aafe67be16103 (diff)
downloadlinux-stable-0490d6d7ba0a479fdd805da54ae25220ce5b514d.tar.gz
linux-stable-0490d6d7ba0a479fdd805da54ae25220ce5b514d.tar.bz2
linux-stable-0490d6d7ba0a479fdd805da54ae25220ce5b514d.zip
s390/mm: enable ARCH_HAS_SET_DIRECT_MAP
Implement the set_direct_map_*() API, which allows to invalidate and set default permissions to pages within the direct mapping. Note that kernel_page_present(), which is also supposed to be part of this API, is intentionally not implemented. The reason for this is that kernel_page_present() is only used (and currently only makes sense) for suspend/resume, which isn't supported on s390. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/set_memory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/include/asm/set_memory.h b/arch/s390/include/asm/set_memory.h
index ec3f44c602eb..7a3eefd7a242 100644
--- a/arch/s390/include/asm/set_memory.h
+++ b/arch/s390/include/asm/set_memory.h
@@ -12,6 +12,8 @@ enum {
_SET_MEMORY_NX_BIT,
_SET_MEMORY_X_BIT,
_SET_MEMORY_4K_BIT,
+ _SET_MEMORY_INV_BIT,
+ _SET_MEMORY_DEF_BIT,
};
#define SET_MEMORY_RO BIT(_SET_MEMORY_RO_BIT)
@@ -19,6 +21,8 @@ enum {
#define SET_MEMORY_NX BIT(_SET_MEMORY_NX_BIT)
#define SET_MEMORY_X BIT(_SET_MEMORY_X_BIT)
#define SET_MEMORY_4K BIT(_SET_MEMORY_4K_BIT)
+#define SET_MEMORY_INV BIT(_SET_MEMORY_INV_BIT)
+#define SET_MEMORY_DEF BIT(_SET_MEMORY_DEF_BIT)
int __set_memory(unsigned long addr, int numpages, unsigned long flags);
@@ -58,4 +62,7 @@ static inline int set_memory_4k(unsigned long addr, int numpages)
return __set_memory(addr, numpages, SET_MEMORY_4K);
}
+int set_direct_map_invalid_noflush(struct page *page);
+int set_direct_map_default_noflush(struct page *page);
+
#endif