pgtable-bits.h 853 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
  3. #ifndef __ASM_CSKY_PGTABLE_BITS_H
  4. #define __ASM_CSKY_PGTABLE_BITS_H
  5. /* implemented in software */
  6. #define _PAGE_ACCESSED (1<<7)
  7. #define PAGE_ACCESSED_BIT (7)
  8. #define _PAGE_READ (1<<8)
  9. #define _PAGE_WRITE (1<<9)
  10. #define _PAGE_PRESENT (1<<10)
  11. #define _PAGE_MODIFIED (1<<11)
  12. #define PAGE_MODIFIED_BIT (11)
  13. /* implemented in hardware */
  14. #define _PAGE_GLOBAL (1<<0)
  15. #define _PAGE_VALID (1<<1)
  16. #define PAGE_VALID_BIT (1)
  17. #define _PAGE_DIRTY (1<<2)
  18. #define PAGE_DIRTY_BIT (2)
  19. #define _PAGE_SO (1<<5)
  20. #define _PAGE_BUF (1<<6)
  21. #define _PAGE_CACHE (1<<3)
  22. #define _CACHE_MASK _PAGE_CACHE
  23. #define _CACHE_CACHED (_PAGE_VALID | _PAGE_CACHE | _PAGE_BUF)
  24. #define _CACHE_UNCACHED (_PAGE_VALID | _PAGE_SO)
  25. #endif /* __ASM_CSKY_PGTABLE_BITS_H */