Re: [PATCH] mm: ptdump: Reduce level numbers by 1 in note_page()

From: Catalin Marinas
Date: Thu Oct 31 2019 - 10:36:07 EST


On Thu, Oct 31, 2019 at 01:33:22PM +0000, Steven Price wrote:
> Rather than having to increment the 'depth' number by 1 in
> ptdump_hole(), let's change the meaning of 'level' in note_page() since
> that makes the code simplier.
>
> Note that for x86, the level numbers were previously increased by 1 in
> commit 45dcd2091363 ("x86/mm/dump_pagetables: Fix printout of p4d level")
> and the comment "Bit 7 has a different meaning" was not updated, so this
> change also makes the code match the comment again.
>
> Signed-off-by: Steven Price <steven.price@xxxxxxx>
> ---
> arch/arm64/mm/dump.c | 6 +++---
> arch/x86/mm/dump_pagetables.c | 19 ++++++++++---------
> include/linux/ptdump.h | 1 +
> mm/ptdump.c | 16 ++++++++--------

For the arm64 part:

Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>