blob: 8c64b7fac60d2cbbc49de33cf3019a238e63311e [file] [log] [blame]
Neil Leederf06ab972011-10-25 17:57:26 -04001/*
Duy Truong790f06d2013-02-13 16:38:12 -08002 * Copyright (c) 2011, The Linux Foundation. All rights reserved.
Neil Leederf06ab972011-10-25 17:57:26 -04003 *
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
18void mem_text_writeable_spinlock(unsigned long *flags);
19void mem_text_address_writeable(unsigned long);
20void mem_text_address_restore(void);
21void mem_text_writeable_spinunlock(unsigned long *flags);
22#else
23static inline void mem_text_writeable_spinlock(unsigned long *flags) {};
24static inline void mem_text_address_writeable(unsigned long addr) {};
25static inline void mem_text_address_restore(void) {};
26static inline void mem_text_writeable_spinunlock(unsigned long *flags) {};
27#endif
28
Neil Leeder32942752011-11-07 10:56:46 -050029void mem_text_write_kernel_word(unsigned long *addr, unsigned long word);
30
Neil Leederf06ab972011-10-25 17:57:26 -040031#endif