diff options
author | Wang Kefeng <wangkefeng.wang@huawei.com> | 2022-09-13 05:25:52 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-10-04 11:09:48 +0100 |
commit | e66372ecb80dc5179c7abb880229c7452e813d15 (patch) | |
tree | d97d680cd8413744ba28fd25b98bdd0aa0ed1198 | |
parent | afd1efa1d80162cd48bacb3b848136249df28c62 (diff) | |
download | linux-e66372ecb80dc5179c7abb880229c7452e813d15.tar.bz2 |
ARM: 9246/1: dump: show page table level name
ARM could have 3 page table level if ARM_LPAE enabled, or only 2 page
table level, let's show the page table level name when dump.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | arch/arm/mm/dump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c index d139392cc514..7ab56520dd09 100644 --- a/arch/arm/mm/dump.c +++ b/arch/arm/mm/dump.c @@ -200,6 +200,7 @@ static const struct prot_bits section_bits[] = { }; struct pg_level { + const char *name; const struct prot_bits *bits; size_t num; u64 mask; @@ -213,9 +214,11 @@ static struct pg_level pg_level[] = { }, { /* p4d */ }, { /* pud */ }, { /* pmd */ + .name = (CONFIG_PGTABLE_LEVELS > 2) ? "PMD" : "PGD", .bits = section_bits, .num = ARRAY_SIZE(section_bits), }, { /* pte */ + .name = "PTE", .bits = pte_bits, .num = ARRAY_SIZE(pte_bits), }, @@ -282,7 +285,8 @@ static void note_page(struct pg_state *st, unsigned long addr, delta >>= 10; unit++; } - pt_dump_seq_printf(st->seq, "%9lu%c", delta, *unit); + pt_dump_seq_printf(st->seq, "%9lu%c %s", delta, *unit, + pg_level[st->level].name); if (st->current_domain) pt_dump_seq_printf(st->seq, " %s", st->current_domain); |