diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2021-07-28 21:02:51 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2021-07-30 17:09:01 +0200 |
commit | b3e1a00c8fa41a80aa402e5ca7f8cc78efa4f50b (patch) | |
tree | ff8158a36df838adf6e21e35f9b880d3550762c5 /arch/s390/include/asm | |
parent | kfence, x86: only define helpers if !MODULE (diff) | |
download | linux-b3e1a00c8fa41a80aa402e5ca7f8cc78efa4f50b.tar.xz linux-b3e1a00c8fa41a80aa402e5ca7f8cc78efa4f50b.zip |
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/asm')
-rw-r--r-- | arch/s390/include/asm/set_memory.h | 6 |
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 |