Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
12int __set_memory(unsigned long addr, int numpages, unsigned long flags);
13
14static inline int set_memory_ro(unsigned long addr, int numpages)
15{
16 return __set_memory(addr, numpages, SET_MEMORY_RO);
17}
18
19static inline int set_memory_rw(unsigned long addr, int numpages)
20{
21 return __set_memory(addr, numpages, SET_MEMORY_RW);
22}
23
24static inline int set_memory_nx(unsigned long addr, int numpages)
25{
26 return __set_memory(addr, numpages, SET_MEMORY_NX);
27}
28
29static 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 */