This source file includes following definitions.
- load_mmu
1
2
3
4
5
6
7
8
9 #include <linux/kernel.h>
10
11 #include <asm/system.h>
12 #include <asm/page.h>
13 #include <asm/pgtable.h>
14
15 struct ctx_list *ctx_list_pool;
16 struct ctx_list ctx_free;
17 struct ctx_list ctx_used;
18
19 unsigned long (*alloc_kernel_stack)(struct task_struct *tsk);
20 void (*free_kernel_stack)(unsigned long stack);
21 struct task_struct *(*alloc_task_struct)(void);
22 void (*free_task_struct)(struct task_struct *tsk);
23
24 void (*quick_kernel_fault)(unsigned long);
25
26 void (*mmu_exit_hook)(void);
27 void (*mmu_flush_hook)(void);
28
29 char *(*mmu_lockarea)(char *, unsigned long);
30 void (*mmu_unlockarea)(char *, unsigned long);
31 char *(*mmu_get_scsi_buffer)(char *, unsigned long, struct linux_sbus *sbus);
32 void (*mmu_release_scsi_buffer)(char *, unsigned long, struct linux_sbus *sbus);
33
34
35 void (*update_mmu_cache)(struct vm_area_struct *vma, unsigned long address, pte_t pte);
36
37 void (*invalidate_all)(void);
38 void (*invalidate_mm)(struct mm_struct *);
39 void (*invalidate_range)(struct mm_struct *, unsigned long start, unsigned long end);
40 void (*invalidate_page)(struct vm_area_struct *, unsigned long address);
41
42 void (*set_pte)(pte_t *pteptr, pte_t pteval);
43
44 unsigned int pmd_shift, pmd_size, pmd_mask;
45 unsigned int (*pmd_align)(unsigned int);
46 unsigned int pgdir_shift, pgdir_size, pgdir_mask;
47 unsigned int (*pgdir_align)(unsigned int);
48 unsigned int ptrs_per_pte, ptrs_per_pmd, ptrs_per_pgd;
49 unsigned int pg_iobits;
50
51 pgprot_t page_none, page_shared, page_copy, page_readonly, page_kernel;
52
53 unsigned long (*pte_page)(pte_t);
54 unsigned long (*pmd_page)(pmd_t);
55 unsigned long (*pgd_page)(pgd_t);
56
57 void (*sparc_update_rootmmu_dir)(struct task_struct *, pgd_t *pgdir);
58 unsigned long (*(vmalloc_start))(void);
59 void (*switch_to_context)(struct task_struct *tsk);
60
61 int (*pte_none)(pte_t);
62 int (*pte_present)(pte_t);
63 int (*pte_inuse)(pte_t *);
64 void (*pte_clear)(pte_t *);
65 void (*pte_reuse)(pte_t *);
66
67 int (*pmd_none)(pmd_t);
68 int (*pmd_bad)(pmd_t);
69 int (*pmd_present)(pmd_t);
70 int (*pmd_inuse)(pmd_t *);
71 void (*pmd_clear)(pmd_t *);
72 void (*pmd_reuse)(pmd_t *);
73
74 int (*pgd_none)(pgd_t);
75 int (*pgd_bad)(pgd_t);
76 int (*pgd_present)(pgd_t);
77 int (*pgd_inuse)(pgd_t *);
78 void (*pgd_clear)(pgd_t *);
79 void (*pgd_reuse)(pgd_t *);
80
81 pte_t (*mk_pte)(unsigned long, pgprot_t);
82 pte_t (*mk_pte_io)(unsigned long, pgprot_t);
83 void (*pgd_set)(pgd_t *, pmd_t *);
84 pte_t (*pte_modify)(pte_t, pgprot_t);
85 pgd_t * (*pgd_offset)(struct mm_struct *, unsigned long);
86 pmd_t * (*pmd_offset)(pgd_t *, unsigned long);
87 pte_t * (*pte_offset)(pmd_t *, unsigned long);
88 void (*pte_free_kernel)(pte_t *);
89 pte_t * (*pte_alloc_kernel)(pmd_t *, unsigned long);
90
91 void (*pmd_free_kernel)(pmd_t *);
92 pmd_t * (*pmd_alloc_kernel)(pgd_t *, unsigned long);
93 void (*pte_free)(pte_t *);
94 pte_t * (*pte_alloc)(pmd_t *, unsigned long);
95
96 void (*pmd_free)(pmd_t *);
97 pmd_t * (*pmd_alloc)(pgd_t *, unsigned long);
98 void (*pgd_free)(pgd_t *);
99
100 pgd_t * (*pgd_alloc)(void);
101
102 int (*pte_write)(pte_t);
103 int (*pte_dirty)(pte_t);
104 int (*pte_young)(pte_t);
105
106 pte_t (*pte_wrprotect)(pte_t);
107 pte_t (*pte_mkclean)(pte_t);
108 pte_t (*pte_mkold)(pte_t);
109 pte_t (*pte_mkwrite)(pte_t);
110 pte_t (*pte_mkdirty)(pte_t);
111 pte_t (*pte_mkyoung)(pte_t);
112
113 char *(*mmu_info)(void);
114
115 extern void ld_mmu_sun4c(void);
116 extern void ld_mmu_srmmu(void);
117
118 void
119 load_mmu(void)
120 {
121 switch(sparc_cpu_model) {
122 case sun4c:
123 ld_mmu_sun4c();
124 break;
125 case sun4m:
126 case sun4d:
127 case sun4e:
128 ld_mmu_srmmu();
129 break;
130 default:
131 printk("load_mmu:MMU support not available for this architecture\n");
132 printk("load_mmu:sparc_cpu_model = %d\n", (int) sparc_cpu_model);
133 printk("load_mmu:Halting...\n");
134 panic("load_mmu()");
135 };
136 }