mmu.h 631 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #else
  8. int switch_pending;
  9. #endif
  10. unsigned int vmalloc_seq;
  11. unsigned long sigpage;
  12. } mm_context_t;
  13. #ifdef CONFIG_CPU_HAS_ASID
  14. #define ASID_BITS 8
  15. #define ASID_MASK ((~0ULL) << ASID_BITS)
  16. #define ASID(mm) ((mm)->context.id.counter & ~ASID_MASK)
  17. #else
  18. #define ASID(mm) (0)
  19. #endif
  20. #else
  21. /*
  22. * From nommu.h:
  23. * Copyright (C) 2002, David McCullough <davidm@snapgear.com>
  24. * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
  25. */
  26. typedef struct {
  27. unsigned long end_brk;
  28. } mm_context_t;
  29. #endif
  30. #endif