loadmmu.c 942 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/page.h>
  13. #include <asm/pgtable.h>
  14. #include <asm/mmu_context.h>
  15. #include <asm/oplib.h>
  16. struct ctx_list *ctx_list_pool;
  17. struct ctx_list ctx_free;
  18. struct ctx_list ctx_used;
  19. extern void ld_mmu_sun4c(void);
  20. extern void ld_mmu_srmmu(void);
  21. void __init load_mmu(void)
  22. {
  23. switch(sparc_cpu_model) {
  24. case sun4c:
  25. case sun4:
  26. ld_mmu_sun4c();
  27. break;
  28. case sun4m:
  29. case sun4d:
  30. case sparc_leon:
  31. ld_mmu_srmmu();
  32. break;
  33. default:
  34. prom_printf("load_mmu: %d unsupported\n", (int)sparc_cpu_model);
  35. prom_halt();
  36. }
  37. btfixup();
  38. }