aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lib-32
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-02-10 07:19:59 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:31 -0400
commitc6e8b587718c486b55c2ebecc6de231a30beba35 (patch)
tree7c6162d449c69fb6425bd27ba341e2d874fb0a1b /arch/mips/lib-32
parent57f0060b8a2bb2a70a4cce1a37d5e0158cea92a6 (diff)
Update MIPS to use the 4-level pagetable code thereby getting rid of
the compacrapability headers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lib-32')
-rw-r--r--arch/mips/lib-32/dump_tlb.c10
-rw-r--r--arch/mips/lib-32/r3k_dump_tlb.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/arch/mips/lib-32/dump_tlb.c b/arch/mips/lib-32/dump_tlb.c
index 019ac8f005d7..f6d134feb12a 100644
--- a/arch/mips/lib-32/dump_tlb.c
+++ b/arch/mips/lib-32/dump_tlb.c
@@ -139,6 +139,7 @@ void dump_tlb_nonwired(void)
139void dump_list_process(struct task_struct *t, void *address) 139void dump_list_process(struct task_struct *t, void *address)
140{ 140{
141 pgd_t *page_dir, *pgd; 141 pgd_t *page_dir, *pgd;
142 pud_t *pud;
142 pmd_t *pmd; 143 pmd_t *pmd;
143 pte_t *pte, page; 144 pte_t *pte, page;
144 unsigned long addr, val; 145 unsigned long addr, val;
@@ -162,7 +163,10 @@ void dump_list_process(struct task_struct *t, void *address)
162 pgd = pgd_offset(t->mm, addr); 163 pgd = pgd_offset(t->mm, addr);
163 printk("pgd == %08x, ", (unsigned int) pgd); 164 printk("pgd == %08x, ", (unsigned int) pgd);
164 165
165 pmd = pmd_offset(pgd, addr); 166 pud = pud_offset(pgd, addr);
167 printk("pud == %08x, ", (unsigned int) pud);
168
169 pmd = pmd_offset(pud, addr);
166 printk("pmd == %08x, ", (unsigned int) pmd); 170 printk("pmd == %08x, ", (unsigned int) pmd);
167 171
168 pte = pte_offset(pmd, addr); 172 pte = pte_offset(pmd, addr);
@@ -195,13 +199,15 @@ void dump_list_current(void *address)
195unsigned int vtop(void *address) 199unsigned int vtop(void *address)
196{ 200{
197 pgd_t *pgd; 201 pgd_t *pgd;
202 pud_t *pud;
198 pmd_t *pmd; 203 pmd_t *pmd;
199 pte_t *pte; 204 pte_t *pte;
200 unsigned int addr, paddr; 205 unsigned int addr, paddr;
201 206
202 addr = (unsigned long) address; 207 addr = (unsigned long) address;
203 pgd = pgd_offset(current->mm, addr); 208 pgd = pgd_offset(current->mm, addr);
204 pmd = pmd_offset(pgd, addr); 209 pud = pud_offset(pgd, addr);
210 pmd = pmd_offset(pud, addr);
205 pte = pte_offset(pmd, addr); 211 pte = pte_offset(pmd, addr);
206 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK; 212 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
207 paddr |= (addr & ~PAGE_MASK); 213 paddr |= (addr & ~PAGE_MASK);
diff --git a/arch/mips/lib-32/r3k_dump_tlb.c b/arch/mips/lib-32/r3k_dump_tlb.c
index a878224004e5..4f2cb74f0766 100644
--- a/arch/mips/lib-32/r3k_dump_tlb.c
+++ b/arch/mips/lib-32/r3k_dump_tlb.c
@@ -105,6 +105,7 @@ void dump_tlb_nonwired(void)
105void dump_list_process(struct task_struct *t, void *address) 105void dump_list_process(struct task_struct *t, void *address)
106{ 106{
107 pgd_t *page_dir, *pgd; 107 pgd_t *page_dir, *pgd;
108 pud_t *pud;
108 pmd_t *pmd; 109 pmd_t *pmd;
109 pte_t *pte, page; 110 pte_t *pte, page;
110 unsigned int addr; 111 unsigned int addr;
@@ -121,7 +122,10 @@ void dump_list_process(struct task_struct *t, void *address)
121 pgd = pgd_offset(t->mm, addr); 122 pgd = pgd_offset(t->mm, addr);
122 printk("pgd == %08x, ", (unsigned int) pgd); 123 printk("pgd == %08x, ", (unsigned int) pgd);
123 124
124 pmd = pmd_offset(pgd, addr); 125 pud = pud_offset(pgd, addr);
126 printk("pud == %08x, ", (unsigned int) pud);
127
128 pmd = pmd_offset(pud, addr);
125 printk("pmd == %08x, ", (unsigned int) pmd); 129 printk("pmd == %08x, ", (unsigned int) pmd);
126 130
127 pte = pte_offset(pmd, addr); 131 pte = pte_offset(pmd, addr);
@@ -149,13 +153,15 @@ void dump_list_current(void *address)
149unsigned int vtop(void *address) 153unsigned int vtop(void *address)
150{ 154{
151 pgd_t *pgd; 155 pgd_t *pgd;
156 pud_t *pud;
152 pmd_t *pmd; 157 pmd_t *pmd;
153 pte_t *pte; 158 pte_t *pte;
154 unsigned int addr, paddr; 159 unsigned int addr, paddr;
155 160
156 addr = (unsigned long) address; 161 addr = (unsigned long) address;
157 pgd = pgd_offset(current->mm, addr); 162 pgd = pgd_offset(current->mm, addr);
158 pmd = pmd_offset(pgd, addr); 163 pud = pud_offset(pgd, addr);
164 pmd = pmd_offset(pud, addr);
159 pte = pte_offset(pmd, addr); 165 pte = pte_offset(pmd, addr);
160 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK; 166 paddr = (KSEG1 | (unsigned int) pte_val(*pte)) & PAGE_MASK;
161 paddr |= (addr & ~PAGE_MASK); 167 paddr |= (addr & ~PAGE_MASK);