If we use 2-level page table translation, we won't use
the pmd table. Mark pmd as 'not used' when we use 2-level
page table translation.
Signed-off-by: Kuan-Ying Lee <kuan-ying.lee(a)canonical.com>
---
arm64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arm64.c b/arm64.c
index 002cc0078dad..2386c9901f83 100644
--- a/arm64.c
+++ b/arm64.c
@@ -1181,7 +1181,7 @@ arm64_dump_machdep_table(ulong arg)
else
fprintf(fp, "%lx\n", machdep->last_pud_read);
fprintf(fp, " last_pmd_read: ");
- if (PAGESIZE() == 65536)
+ if ((machdep->flags & VM_L2_64K) || (machdep->flags & VM_L2_16K))
fprintf(fp, "(not used)\n");
else
fprintf(fp, "%lx\n", machdep->last_pmd_read);
--
2.34.1