powerpc/mm: On PPC32, display 32 bits addresses in page table dump
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 13 Apr 2017 12:41:40 +0000 (14:41 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 27 Apr 2017 12:20:28 +0000 (22:20 +1000)
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/dump_linuxpagetables.c

index ec490699472695bfaa01144fc49d19c607448a91..a5b8c16c3d690fbdd5fbb9b06998ad1eebc97777 100644 (file)
@@ -295,8 +295,13 @@ static void dump_addr(struct pg_state *st, unsigned long addr)
        const char *unit = units;
        unsigned long delta;
 
+#ifdef CONFIG_PPC64
        seq_printf(st->seq, "0x%016lx-0x%016lx ", st->start_address, addr-1);
        seq_printf(st->seq, "0x%016lx ", st->start_pa);
+#else
+       seq_printf(st->seq, "0x%08lx-0x%08lx ", st->start_address, addr - 1);
+       seq_printf(st->seq, "0x%08lx ", st->start_pa);
+#endif
 
        delta = (addr - st->start_address) >> 10;
        /* Work out what appropriate unit to use */