init-mm.c 617 B

1234567891011121314151617181920212223242526
  1. #include <linux/mm_types.h>
  2. #include <linux/rbtree.h>
  3. #include <linux/rwsem.h>
  4. #include <linux/spinlock.h>
  5. #include <linux/list.h>
  6. #include <linux/cpumask.h>
  7. #include <asm/atomic.h>
  8. #include <asm/pgtable.h>
  9. #include <asm/mmu.h>
  10. #ifndef INIT_MM_CONTEXT
  11. #define INIT_MM_CONTEXT(name)
  12. #endif
  13. struct mm_struct init_mm = {
  14. .mm_rb = RB_ROOT,
  15. .pgd = swapper_pg_dir,
  16. .mm_users = ATOMIC_INIT(2),
  17. .mm_count = ATOMIC_INIT(1),
  18. .mmap_sem = __RWSEM_INITIALIZER(init_mm.mmap_sem),
  19. .page_table_lock = __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
  20. .mmlist = LIST_HEAD_INIT(init_mm.mmlist),
  21. INIT_MM_CONTEXT(init_mm)
  22. };