Merge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5514', 'asoc...
[sfrench/cifs-2.6.git] / arch / s390 / include / asm / cacheflush.h
1 #ifndef _S390_CACHEFLUSH_H
2 #define _S390_CACHEFLUSH_H
3
4 /* Caches aren't brain-dead on the s390. */
5 #include <asm-generic/cacheflush.h>
6
7 #define SET_MEMORY_RO   1UL
8 #define SET_MEMORY_RW   2UL
9 #define SET_MEMORY_NX   4UL
10 #define SET_MEMORY_X    8UL
11
12 int __set_memory(unsigned long addr, int numpages, unsigned long flags);
13
14 static inline int set_memory_ro(unsigned long addr, int numpages)
15 {
16         return __set_memory(addr, numpages, SET_MEMORY_RO);
17 }
18
19 static inline int set_memory_rw(unsigned long addr, int numpages)
20 {
21         return __set_memory(addr, numpages, SET_MEMORY_RW);
22 }
23
24 static inline int set_memory_nx(unsigned long addr, int numpages)
25 {
26         return __set_memory(addr, numpages, SET_MEMORY_NX);
27 }
28
29 static inline int set_memory_x(unsigned long addr, int numpages)
30 {
31         return __set_memory(addr, numpages, SET_MEMORY_X);
32 }
33
34 #endif /* _S390_CACHEFLUSH_H */