1 #ifndef _S390_CACHEFLUSH_H
2 #define _S390_CACHEFLUSH_H
4 /* Caches aren't brain-dead on the s390. */
5 #include <asm-generic/cacheflush.h>
7 #define SET_MEMORY_RO 1UL
8 #define SET_MEMORY_RW 2UL
9 #define SET_MEMORY_NX 4UL
10 #define SET_MEMORY_X 8UL
12 int __set_memory(unsigned long addr, int numpages, unsigned long flags);
14 static inline int set_memory_ro(unsigned long addr, int numpages)
16 return __set_memory(addr, numpages, SET_MEMORY_RO);
19 static inline int set_memory_rw(unsigned long addr, int numpages)
21 return __set_memory(addr, numpages, SET_MEMORY_RW);
24 static inline int set_memory_nx(unsigned long addr, int numpages)
26 return __set_memory(addr, numpages, SET_MEMORY_NX);
29 static inline int set_memory_x(unsigned long addr, int numpages)
31 return __set_memory(addr, numpages, SET_MEMORY_X);
34 #endif /* _S390_CACHEFLUSH_H */