/arch/arm/include/asm/mmu.h

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase · C++ Header · 37 lines · 23 code · 8 blank · 6 comment · 0 complexity · 0fdf0d4b9ba90ca3e8e1d89ec9afd381 MD5 · raw file

  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