mmu.h 694 B

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