Files
kernel-tenderloin-3.0/arch/arm/include/asm/mmu_writeable.h
Neil Leeder 32942757bd mm: add wrapper function for writing word to kernel text space
Adds a function to encapsulate the locking, removal of write-protection,
word write, cache flush and invalidate and restoration
of write protection. This is a convenience function for callers
needing to update a word in kernel text space.

Change-Id: I9832f0ff659ddc62c55819af5318c94b70f5c11c
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
2011-11-30 10:38:39 -05:00

32 lines
1.2 KiB
C

/*
* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _MMU_WRITEABLE_H
#define _MMU_WRITEABLE_H
#ifdef CONFIG_STRICT_MEMORY_RWX
void mem_text_writeable_spinlock(unsigned long *flags);
void mem_text_address_writeable(unsigned long);
void mem_text_address_restore(void);
void mem_text_writeable_spinunlock(unsigned long *flags);
#else
static inline void mem_text_writeable_spinlock(unsigned long *flags) {};
static inline void mem_text_address_writeable(unsigned long addr) {};
static inline void mem_text_address_restore(void) {};
static inline void mem_text_writeable_spinunlock(unsigned long *flags) {};
#endif
void mem_text_write_kernel_word(unsigned long *addr, unsigned long word);
#endif