Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-next
[sfrench/cifs-2.6.git] / arch / arm / include / asm / set_memory.h
1 /*
2  * Copyright (C) 1999-2002 Russell King
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8
9 #ifndef _ASMARM_SET_MEMORY_H
10 #define _ASMARM_SET_MEMORY_H
11
12 #ifdef CONFIG_MMU
13 int set_memory_ro(unsigned long addr, int numpages);
14 int set_memory_rw(unsigned long addr, int numpages);
15 int set_memory_x(unsigned long addr, int numpages);
16 int set_memory_nx(unsigned long addr, int numpages);
17 #else
18 static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
19 static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
20 static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
21 static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
22 #endif
23
24 #ifdef CONFIG_STRICT_KERNEL_RWX
25 void set_kernel_text_rw(void);
26 void set_kernel_text_ro(void);
27 #else
28 static inline void set_kernel_text_rw(void) { }
29 static inline void set_kernel_text_ro(void) { }
30 #endif
31
32 #endif