Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / include / asm / set_memory.h
bloba1ceff4295d3c01dab906f51e04388ebf8a75887
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 1999-2002 Russell King
4 */
6 #ifndef _ASMARM_SET_MEMORY_H
7 #define _ASMARM_SET_MEMORY_H
9 #ifdef CONFIG_MMU
10 int set_memory_ro(unsigned long addr, int numpages);
11 int set_memory_rw(unsigned long addr, int numpages);
12 int set_memory_x(unsigned long addr, int numpages);
13 int set_memory_nx(unsigned long addr, int numpages);
14 #else
15 static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
16 static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
17 static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
18 static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
19 #endif
21 #ifdef CONFIG_STRICT_KERNEL_RWX
22 void set_kernel_text_rw(void);
23 void set_kernel_text_ro(void);
24 #else
25 static inline void set_kernel_text_rw(void) { }
26 static inline void set_kernel_text_ro(void) { }
27 #endif
29 #endif