loadmmu.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* $Id: loadmmu.c,v 1.56 2000/02/08 20:24:21 davem Exp $
  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/a.out.h>
  16. #include <asm/mmu_context.h>
  17. #include <asm/oplib.h>
  18. struct ctx_list *ctx_list_pool;
  19. struct ctx_list ctx_free;
  20. struct ctx_list ctx_used;
  21. unsigned int pg_iobits;
  22. extern void ld_mmu_sun4c(void);
  23. extern void ld_mmu_srmmu(void);
  24. void __init load_mmu(void)
  25. {
  26. switch(sparc_cpu_model) {
  27. case sun4c:
  28. case sun4:
  29. ld_mmu_sun4c();
  30. break;
  31. case sun4m:
  32. case sun4d:
  33. ld_mmu_srmmu();
  34. break;
  35. default:
  36. prom_printf("load_mmu: %d unsupported\n", (int)sparc_cpu_model);
  37. prom_halt();
  38. }
  39. btfixup();
  40. }