arm64: ptdump: Fix format output during pagetable parsing
Fix an issue where the output range printed to debugfs was no showing
out correctly. Cosmetic fixes on a separate line.
Change-Id: I5c04d207159c127ee82a5e1e2b1291b2c71248d0
Signed-off-by: Sebastian Ene <sebastianene@google.com>
diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
index c820ca0..81d927b 100644
--- a/arch/arm64/mm/ptdump.c
+++ b/arch/arm64/mm/ptdump.c
@@ -399,6 +399,9 @@ static void note_page(struct ptdump_state *pt_st, unsigned long addr, int level,
const char *unit = units;
unsigned long delta;
+ if (st->start_address > addr)
+ return;
+
if (st->current_prot) {
note_prot_uxn(st, addr);
note_prot_wx(st, addr);
@@ -421,7 +424,8 @@ static void note_page(struct ptdump_state *pt_st, unsigned long addr, int level,
if (addr >= st->marker[1].start_address) {
st->marker++;
- pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name);
+ pt_dump_seq_printf(st->seq, "---[ %s ]---\n",
+ st->marker->name);
}
st->start_address = addr;