Commit ac351d94 authored by Ralf Baechle's avatar Ralf Baechle

Add a few simple error checks to tlb dumper.

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent d2f755e0
...@@ -160,16 +160,17 @@ void dump_list_process(struct task_struct *t, void *address) ...@@ -160,16 +160,17 @@ void dump_list_process(struct task_struct *t, void *address)
if (addr > KSEG0) if (addr > KSEG0)
page_dir = pgd_offset_k(0); page_dir = pgd_offset_k(0);
else else if (t->mm) {
page_dir = pgd_offset(t->mm, 0); 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) if (addr > KSEG0)
pgd = pgd_offset_k(addr); pgd = pgd_offset_k(addr);
else else if (t->mm) {
pgd = pgd_offset(t->mm, addr); pgd = pgd_offset(t->mm, addr);
printk("pgd == %08x, ", (unsigned int) pgd); printk("pgd == %08x, ", (unsigned int) pgd);
pud = pud_offset(pgd, addr); pud = pud_offset(pgd, addr);
printk("pud == %08x, ", (unsigned int) pud); printk("pud == %08x, ", (unsigned int) pud);
...@@ -178,6 +179,8 @@ void dump_list_process(struct task_struct *t, void *address) ...@@ -178,6 +179,8 @@ void dump_list_process(struct task_struct *t, void *address)
pte = pte_offset(pmd, addr); pte = pte_offset(pmd, addr);
printk("pte == %08x, ", (unsigned int) pte); printk("pte == %08x, ", (unsigned int) pte);
} else
printk("Current thread has no mm\n");
page = *pte; page = *pte;
#ifdef CONFIG_64BIT_PHYS_ADDR #ifdef CONFIG_64BIT_PHYS_ADDR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment