mmu_writeable.h 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2011, The Linux Foundation. All rights reserved.
  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. #ifdef CONFIG_STRICT_MEMORY_RWX
  17. void mem_text_writeable_spinlock(unsigned long *flags);
  18. void mem_text_address_writeable(unsigned long);
  19. void mem_text_address_restore(void);
  20. void mem_text_writeable_spinunlock(unsigned long *flags);
  21. #else
  22. static inline void mem_text_writeable_spinlock(unsigned long *flags) {};
  23. static inline void mem_text_address_writeable(unsigned long addr) {};
  24. static inline void mem_text_address_restore(void) {};
  25. static inline void mem_text_writeable_spinunlock(unsigned long *flags) {};
  26. #endif
  27. void mem_text_write_kernel_word(unsigned long *addr, unsigned long word);
  28. #endif