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

Catalin Marinas
2019-10-31T14:36:08Z

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@arm.com>
> ---
> 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@arm.com>