mmu.h 724 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. unsigned int id;
  7. spinlock_t id_lock;
  8. #endif
  9. unsigned int kvm_seq;
  10. } mm_context_t;
  11. #ifdef CONFIG_CPU_HAS_ASID
  12. #define ASID(mm) ((mm)->context.id & 255)
  13. /* init_mm.context.id_lock should be initialized. */
  14. #define INIT_MM_CONTEXT(name) \
  15. .context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock),
  16. #else
  17. #define ASID(mm) (0)
  18. #endif
  19. #else
  20. /*
  21. * From nommu.h:
  22. * Copyright (C) 2002, David McCullough <davidm@snapgear.com>
  23. * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
  24. */
  25. typedef struct {
  26. unsigned long end_brk;
  27. } mm_context_t;
  28. #endif
  29. #endif