diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-04-02 20:55:17 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2023-04-13 17:36:26 +0200 |
commit | f0a2a7c527849bf1b112a43f0b8d0658a7b4e6ec (patch) | |
tree | 5adaa7cfdf5b05b7165a9e90416d384f5c9696f2 /arch | |
parent | 22e99fa56443f19b96e2e888854bfc202dd97069 (diff) | |
download | linux-stable-f0a2a7c527849bf1b112a43f0b8d0658a7b4e6ec.tar.gz linux-stable-f0a2a7c527849bf1b112a43f0b8d0658a7b4e6ec.tar.bz2 linux-stable-f0a2a7c527849bf1b112a43f0b8d0658a7b4e6ec.zip |
s390/mm: implement set_memory_rwnx()
Given that set_memory_rox() is implemented, provide also set_memory_rwnx().
This allows to get rid of all open coded __set_memory() usages in s390
architecture code.
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')
-rw-r--r-- | arch/s390/include/asm/set_memory.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/set_memory.h b/arch/s390/include/asm/set_memory.h index f4362ce1e17a..25f2464dbb7e 100644 --- a/arch/s390/include/asm/set_memory.h +++ b/arch/s390/include/asm/set_memory.h @@ -40,6 +40,11 @@ static inline int set_memory_rox(unsigned long addr, int numpages) return __set_memory(addr, numpages, SET_MEMORY_RO | SET_MEMORY_X); } +static inline int set_memory_rwnx(unsigned long addr, int numpages) +{ + return __set_memory(addr, numpages, SET_MEMORY_RW | SET_MEMORY_NX); +} + static inline int set_memory_4k(unsigned long addr, int numpages) { return __set_memory(addr, numpages, SET_MEMORY_4K); |