s390/mm: implement set_memory_rwnx()
authorHeiko Carstens <hca@linux.ibm.com>
Sun, 2 Apr 2023 18:55:17 +0000 (20:55 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 13 Apr 2023 15:36:26 +0000 (17:36 +0200)
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>
arch/s390/include/asm/set_memory.h

index f4362ce1e17a6546ddabaafd1e7b2c124a529b01..25f2464dbb7e831534cf0569bf8c04bd10b864e4 100644 (file)
@@ -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);