blob: 82ec8f666036bdcc45e6e3b92511a2833e57530c [file] [log] [blame]
Adrian Bunk88278ca2008-05-19 16:53:02 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * 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>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <asm/mmu_context.h>
18#include <asm/oplib.h>
19
20struct ctx_list *ctx_list_pool;
21struct ctx_list ctx_free;
22struct ctx_list ctx_used;
23
Linus Torvalds1da177e2005-04-16 15:20:36 -070024extern void ld_mmu_sun4c(void);
25extern void ld_mmu_srmmu(void);
26
27void __init load_mmu(void)
28{
29 switch(sparc_cpu_model) {
30 case sun4c:
31 case sun4:
32 ld_mmu_sun4c();
33 break;
34 case sun4m:
35 case sun4d:
Konrad Eisele0fd7ef12009-08-17 00:13:31 +000036 case sparc_leon:
Linus Torvalds1da177e2005-04-16 15:20:36 -070037 ld_mmu_srmmu();
38 break;
39 default:
40 prom_printf("load_mmu: %d unsupported\n", (int)sparc_cpu_model);
41 prom_halt();
42 }
43 btfixup();
44}