Neil Leeder | f06ab97 | 2011-10-25 17:57:26 -0400 | [diff] [blame] | 1 | /* |
Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 2 | * Copyright (c) 2011, The Linux Foundation. All rights reserved. |
Neil Leeder | f06ab97 | 2011-10-25 17:57:26 -0400 | [diff] [blame] | 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 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | */ |
| 14 | #ifndef _MMU_WRITEABLE_H |
| 15 | #define _MMU_WRITEABLE_H |
| 16 | |
| 17 | #ifdef CONFIG_STRICT_MEMORY_RWX |
| 18 | void mem_text_writeable_spinlock(unsigned long *flags); |
| 19 | void mem_text_address_writeable(unsigned long); |
| 20 | void mem_text_address_restore(void); |
| 21 | void mem_text_writeable_spinunlock(unsigned long *flags); |
| 22 | #else |
| 23 | static inline void mem_text_writeable_spinlock(unsigned long *flags) {}; |
| 24 | static inline void mem_text_address_writeable(unsigned long addr) {}; |
| 25 | static inline void mem_text_address_restore(void) {}; |
| 26 | static inline void mem_text_writeable_spinunlock(unsigned long *flags) {}; |
| 27 | #endif |
| 28 | |
Neil Leeder | 3294275 | 2011-11-07 10:56:46 -0500 | [diff] [blame] | 29 | void mem_text_write_kernel_word(unsigned long *addr, unsigned long word); |
| 30 | |
Neil Leeder | f06ab97 | 2011-10-25 17:57:26 -0400 | [diff] [blame] | 31 | #endif |