1. Use the same expression to indicate ptrs_per_pgd. 2. Add VA bits indication. Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@xxxxxxxxxxxxx> --- defs.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/defs.h b/defs.h index 92e8708367d1..2d881344cba6 100644 --- a/defs.h +++ b/defs.h @@ -3269,8 +3269,9 @@ typedef signed int s32; /* * 3-levels / 4K pages + * 39-bit VA */ -#define PTRS_PER_PGD_L3_4K (512) +#define PTRS_PER_PGD_L3_4K ((1UL) << (39 - 30)) #define PTRS_PER_PMD_L3_4K (512) #define PTRS_PER_PTE_L3_4K (512) #define PGDIR_SHIFT_L3_4K (30) @@ -3306,7 +3307,7 @@ typedef signed int s32; * 2-levels / 16K pages * 36-bit VA */ -#define PTRS_PER_PGD_L2_16K (2048) +#define PTRS_PER_PGD_L2_16K ((1UL) << (36 - 25)) #define PTRS_PER_PTE_L2_16K (2048) #define PGDIR_SHIFT_L2_16K (25) #define PGDIR_SIZE_L2_16K ((1UL) << PGDIR_SHIFT_L2_16K) @@ -3330,6 +3331,7 @@ typedef signed int s32; /* * 3-levels / 64K pages + * 48-bit, 52-bit VA */ #define PTRS_PER_PGD_L3_64K (64) #define PTRS_PER_PMD_L3_64K (8192) @@ -3344,8 +3346,9 @@ typedef signed int s32; /* * 2-levels / 64K pages + * 42-bit VA */ -#define PTRS_PER_PGD_L2_64K (8192) +#define PTRS_PER_PGD_L2_64K ((1UL) << (42 - 29)) #define PTRS_PER_PTE_L2_64K (8192) #define PGDIR_SHIFT_L2_64K (29) #define PGDIR_SIZE_L2_64K ((1UL) << PGDIR_SHIFT_L2_64K) -- 2.43.0 -- Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/ Contribution Guidelines: https://github.com/crash-utility/crash/wiki