mmu.h 579 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __ARM_MMU_H
  2. #define __ARM_MMU_H
  3. #ifdef CONFIG_MMU
  4. typedef struct {
  5. #ifdef CONFIG_CPU_HAS_ASID
  6. atomic64_t id;
  7. #endif
  8. unsigned int vmalloc_seq;
  9. } mm_context_t;
  10. #ifdef CONFIG_CPU_HAS_ASID
  11. #define ASID_BITS 8
  12. #define ASID_MASK ((~0ULL) << ASID_BITS)
  13. #define ASID(mm) ((mm)->context.id.counter & ~ASID_MASK)
  14. #else
  15. #define ASID(mm) (0)
  16. #endif
  17. #else
  18. /*
  19. * From nommu.h:
  20. * Copyright (C) 2002, David McCullough <davidm@snapgear.com>
  21. * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
  22. */
  23. typedef struct {
  24. unsigned long end_brk;
  25. } mm_context_t;
  26. #endif
  27. #endif