set_memory.h 645 B

123456789101112131415161718192021
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2024 Loongson Technology Corporation Limited
  4. */
  5. #ifndef _ASM_LOONGARCH_SET_MEMORY_H
  6. #define _ASM_LOONGARCH_SET_MEMORY_H
  7. /*
  8. * Functions to change memory attributes.
  9. */
  10. int set_memory_x(unsigned long addr, int numpages);
  11. int set_memory_nx(unsigned long addr, int numpages);
  12. int set_memory_ro(unsigned long addr, int numpages);
  13. int set_memory_rw(unsigned long addr, int numpages);
  14. bool kernel_page_present(struct page *page);
  15. int set_direct_map_default_noflush(struct page *page);
  16. int set_direct_map_invalid_noflush(struct page *page);
  17. #endif /* _ASM_LOONGARCH_SET_MEMORY_H */