mmu.h 756 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. raw_spinlock_t id_lock;
  8. #endif
  9. unsigned int kvm_seq;
  10. unsigned long sigpage;
  11. } mm_context_t;
  12. #ifdef CONFIG_CPU_HAS_ASID
  13. #define ASID(mm) ((mm)->context.id & 255)
  14. /* init_mm.context.id_lock should be initialized. */
  15. #define INIT_MM_CONTEXT(name) \
  16. .context.id_lock = __RAW_SPIN_LOCK_UNLOCKED(name.context.id_lock),
  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