diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-08-16 17:47:00 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 19:32:06 +0100 |
commit | ac351d947390c00b8ece3cde997fe173fc8649ed (patch) | |
tree | 57f5801414b2d66905b2596ce93573f53528a457 | |
parent | d2f755e04f26b9ab4b8da24c025dc4f6112d6bee (diff) |
Add a few simple error checks to tlb dumper.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/lib-32/dump_tlb.c | 25 |
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 9373a774012..46519f4331e 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) if (addr > KSEG0) page_dir = pgd_offset_k(0); - else + else if (t->mm) { page_dir = pgd_offset(t->mm, 0); - printk("page_dir == %08x\n", (unsigned int) page_dir); + printk("page_dir == %08x\n", (unsigned int) page_dir); + } else + printk("Current thread has no mm\n"); if (addr > KSEG0) pgd = pgd_offset_k(addr); - else + else if (t->mm) { pgd = pgd_offset(t->mm, addr); - printk("pgd == %08x, ", (unsigned int) pgd); + printk("pgd == %08x, ", (unsigned int) pgd); + pud = pud_offset(pgd, addr); + printk("pud == %08x, ", (unsigned int) pud); - pud = pud_offset(pgd, addr); - printk("pud == %08x, ", (unsigned int) pud); - - pmd = pmd_offset(pud, addr); - printk("pmd == %08x, ", (unsigned int) pmd); + pmd = pmd_offset(pud, addr); + printk("pmd == %08x, ", (unsigned int) pmd); - pte = pte_offset(pmd, addr); - printk("pte == %08x, ", (unsigned int) pte); + pte = pte_offset(pmd, addr); + printk("pte == %08x, ", (unsigned int) pte); + } else + printk("Current thread has no mm\n"); page = *pte; #ifdef CONFIG_64BIT_PHYS_ADDR |