riscv: Introduce NAPOT field to PTDUMP
authorYu Chien Peter Lin <peterlin@andestech.com>
Thu, 21 Sep 2023 02:50:22 +0000 (10:50 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sun, 5 Nov 2023 17:41:55 +0000 (09:41 -0800)
This patch introduces the NAPOT field to PTDUMP, allowing it
to display the letter "N" for pages that have the 63rd bit set.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20230921025022.3989723-4-peterlin@andestech.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/ptdump.c

index 13997cf3fe36665256c7f9aa5f4c4b87437748e2..b71f08b91e5319de3f9a5d00482cf08602b06f6e 100644 (file)
@@ -136,6 +136,10 @@ struct prot_bits {
 static const struct prot_bits pte_bits[] = {
        {
 #ifdef CONFIG_64BIT
+               .mask = _PAGE_NAPOT,
+               .set = "N",
+               .clear = ".",
+       }, {
                .mask = _PAGE_MTMASK_SVPBMT,
                .set = "MT(%s)",
                .clear = "  ..  ",