xref: /openbmc/linux/arch/s390/include/asm/set_memory.h (revision b78412b8)
1 #ifndef _ASMS390_SET_MEMORY_H
2 #define _ASMS390_SET_MEMORY_H
3 
4 #define SET_MEMORY_RO	1UL
5 #define SET_MEMORY_RW	2UL
6 #define SET_MEMORY_NX	4UL
7 #define SET_MEMORY_X	8UL
8 
9 int __set_memory(unsigned long addr, int numpages, unsigned long flags);
10 
11 static inline int set_memory_ro(unsigned long addr, int numpages)
12 {
13 	return __set_memory(addr, numpages, SET_MEMORY_RO);
14 }
15 
16 static inline int set_memory_rw(unsigned long addr, int numpages)
17 {
18 	return __set_memory(addr, numpages, SET_MEMORY_RW);
19 }
20 
21 static inline int set_memory_nx(unsigned long addr, int numpages)
22 {
23 	return __set_memory(addr, numpages, SET_MEMORY_NX);
24 }
25 
26 static inline int set_memory_x(unsigned long addr, int numpages)
27 {
28 	return __set_memory(addr, numpages, SET_MEMORY_X);
29 }
30 
31 #endif
32