aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-08-16 13:47:00 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:06 -0400
commitac351d947390c00b8ece3cde997fe173fc8649ed (patch)
tree57f5801414b2d66905b2596ce93573f53528a457 /arch/mips
parentd2f755e04f26b9ab4b8da24c025dc4f6112d6bee (diff)
Add a few simple error checks to tlb dumper.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/lib-32/dump_tlb.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/mips/lib-32/dump_tlb.c b/arch/mips/lib-32/dump_tlb.c
index 9373a7740125..46519f4331eb 100644
--- a/arch/mips/lib-32/dump_tlb.c
+++ b/arch/mips/lib-32/dump_tlb.c
@@ -160,24 +160,27 @@ void dump_list_process(struct task_struct *t, void *address)
160 160
161 if (addr > KSEG0) 161 if (addr > KSEG0)
162 page_dir = pgd_offset_k(0); 162 page_dir = pgd_offset_k(0);
163 else 163 else if (t->mm) {
164 page_dir = pgd_offset(t->mm, 0); 164 page_dir = pgd_offset(t->mm, 0);
165 printk("page_dir == %08x\n", (unsigned int) page_dir); 165 printk("page_dir == %08x\n", (unsigned int) page_dir);
166 } else
167 printk("Current thread has no mm\n");
166 168
167 if (addr > KSEG0) 169 if (addr > KSEG0)
168 pgd = pgd_offset_k(addr); 170 pgd = pgd_offset_k(addr);
169 else 171 else if (t->mm) {
170 pgd = pgd_offset(t->mm, addr); 172 pgd = pgd_offset(t->mm, addr);
171 printk("pgd == %08x, ", (unsigned int) pgd); 173 printk("pgd == %08x, ", (unsigned int) pgd);
174 pud = pud_offset(pgd, addr);
175 printk("pud == %08x, ", (unsigned int) pud);
172 176
173 pud = pud_offset(pgd, addr); 177 pmd = pmd_offset(pud, addr);
174 printk("pud == %08x, ", (unsigned int) pud); 178 printk("pmd == %08x, ", (unsigned int) pmd);
175
176 pmd = pmd_offset(pud, addr);
177 printk("pmd == %08x, ", (unsigned int) pmd);
178 179
179 pte = pte_offset(pmd, addr); 180 pte = pte_offset(pmd, addr);
180 printk("pte == %08x, ", (unsigned int) pte); 181 printk("pte == %08x, ", (unsigned int) pte);
182 } else
183 printk("Current thread has no mm\n");
181 184
182 page = *pte; 185 page = *pte;
183#ifdef CONFIG_64BIT_PHYS_ADDR 186#ifdef CONFIG_64BIT_PHYS_ADDR