| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |  | 
 | 10 | #include <linux/kernel.h> | 
 | 11 | #include <linux/mm.h> | 
 | 12 | #include <linux/init.h> | 
 | 13 |  | 
 | 14 | #include <asm/system.h> | 
 | 15 | #include <asm/page.h> | 
 | 16 | #include <asm/pgtable.h> | 
 | 17 | #include <asm/a.out.h> | 
 | 18 | #include <asm/mmu_context.h> | 
 | 19 | #include <asm/oplib.h> | 
 | 20 |  | 
 | 21 | struct ctx_list *ctx_list_pool; | 
 | 22 | struct ctx_list ctx_free; | 
 | 23 | struct ctx_list ctx_used; | 
 | 24 |  | 
 | 25 | unsigned int pg_iobits; | 
 | 26 |  | 
 | 27 | extern void ld_mmu_sun4c(void); | 
 | 28 | extern void ld_mmu_srmmu(void); | 
 | 29 |  | 
 | 30 | void __init load_mmu(void) | 
 | 31 | { | 
 | 32 | 	switch(sparc_cpu_model) { | 
 | 33 | 	case sun4c: | 
 | 34 | 	case sun4: | 
 | 35 | 		ld_mmu_sun4c(); | 
 | 36 | 		break; | 
 | 37 | 	case sun4m: | 
 | 38 | 	case sun4d: | 
 | 39 | 		ld_mmu_srmmu(); | 
 | 40 | 		break; | 
 | 41 | 	default: | 
 | 42 | 		prom_printf("load_mmu: %d unsupported\n", (int)sparc_cpu_model); | 
 | 43 | 		prom_halt(); | 
 | 44 | 	} | 
 | 45 | 	btfixup(); | 
 | 46 | } |