Loading...
Note: File does not exist in v3.1.
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
13int set_memory_ro(unsigned long addr, int numpages);
14int set_memory_rw(unsigned long addr, int numpages);
15int set_memory_x(unsigned long addr, int numpages);
16int set_memory_nx(unsigned long addr, int numpages);
17#else
18static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
19static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
20static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
21static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
22#endif
23
24#ifdef CONFIG_STRICT_KERNEL_RWX
25void set_kernel_text_rw(void);
26void set_kernel_text_ro(void);
27#else
28static inline void set_kernel_text_rw(void) { }
29static inline void set_kernel_text_ro(void) { }
30#endif
31
32#endif