loadmmu.c 966 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * loadmmu.c: This code loads up all the mm function pointers once the
  3. * machine type has been determined. It also sets the static
  4. * mmu values such as PAGE_NONE, etc.
  5. *
  6. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  7. * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  8. */
  9. #include <linux/kernel.h>
  10. #include <linux/mm.h>
  11. #include <linux/init.h>
  12. #include <asm/system.h>
  13. #include <asm/page.h>
  14. #include <asm/pgtable.h>
  15. #include <asm/mmu_context.h>
  16. #include <asm/oplib.h>
  17. struct ctx_list *ctx_list_pool;
  18. struct ctx_list ctx_free;
  19. struct ctx_list ctx_used;
  20. extern void ld_mmu_sun4c(void);
  21. extern void ld_mmu_srmmu(void);
  22. void __init load_mmu(void)
  23. {
  24. switch(sparc_cpu_model) {
  25. case sun4c:
  26. case sun4:
  27. ld_mmu_sun4c();
  28. break;
  29. case sun4m:
  30. case sun4d:
  31. case sparc_leon:
  32. ld_mmu_srmmu();
  33. break;
  34. default:
  35. prom_printf("load_mmu: %d unsupported\n", (int)sparc_cpu_model);
  36. prom_halt();
  37. }
  38. btfixup();
  39. }