[PATCH 4/4] mm: Rename GENERIC_PTDUMP and PTDUMP_CORE

Steven Price steven.price at arm.com
Thu Feb 13 22:23:10 AEDT 2025


On 13/02/2025 04:09, Anshuman Khandual wrote:
> Platforms subscribe into generic ptdump implementation via GENERIC_PTDUMP.
> But generic ptdump gets enabled via PTDUMP_CORE. These configs combination
> is confusing as they sound very similar and does not differentiate between
> platform's feature subscription and feature enablement for ptdump. Rename
> the configs as ARCH_HAS_PTDUMP and PTDUMP making it more clear and improve
> readability.

I'm not going to bikeshed over the naming, but a few points below.

> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Jonathan Corbet <corbet at lwn.net>
> Cc: Marc Zyngier <maz at kernel.org>
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> Cc: Nicholas Piggin <npiggin at gmail.com>
> Cc: Paul Walmsley <paul.walmsley at sifive.com>
> Cc: Palmer Dabbelt <palmer at dabbelt.com>
> Cc: Heiko Carstens <hca at linux.ibm.com>
> Cc: Vasily Gorbik <gor at linux.ibm.com>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Ingo Molnar <mingo at redhat.com>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-doc at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org
> Cc: kvmarm at lists.linux.dev
> Cc: linuxppc-dev at lists.ozlabs.org
> Cc: linux-riscv at lists.infradead.org
> Cc: linux-s390 at vger.kernel.org
> Cc: linux-mm at kvack.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual at arm.com>
> ---
>  Documentation/arch/arm64/ptdump.rst       |  4 ++--
>  arch/arm64/Kconfig                        |  2 +-
>  arch/arm64/include/asm/ptdump.h           |  4 ++--
>  arch/arm64/kvm/Kconfig                    |  4 ++--
>  arch/arm64/mm/Makefile                    |  2 +-
>  arch/powerpc/Kconfig                      |  2 +-
>  arch/powerpc/configs/mpc885_ads_defconfig |  2 +-
>  arch/powerpc/mm/Makefile                  |  2 +-
>  arch/riscv/Kconfig                        |  2 +-
>  arch/riscv/mm/Makefile                    |  2 +-
>  arch/s390/Kconfig                         |  2 +-
>  arch/s390/mm/Makefile                     |  2 +-
>  arch/x86/Kconfig                          |  2 +-
>  arch/x86/Kconfig.debug                    |  2 +-
>  arch/x86/mm/Makefile                      |  2 +-
>  mm/Kconfig.debug                          | 12 ++++++------
>  mm/Makefile                               |  2 +-
>  17 files changed, 25 insertions(+), 25 deletions(-)
> 
> diff --git a/Documentation/arch/arm64/ptdump.rst b/Documentation/arch/arm64/ptdump.rst
> index 5dcfc5d7cddf..a2e527377da3 100644
> --- a/Documentation/arch/arm64/ptdump.rst
> +++ b/Documentation/arch/arm64/ptdump.rst
> @@ -22,8 +22,8 @@ offlining of memory being accessed by the ptdump code.
>  In order to dump the kernel page tables, enable the following
>  configurations and mount debugfs::
>  
> - CONFIG_GENERIC_PTDUMP=y
> - CONFIG_PTDUMP_CORE=y
> + CONFIG_ARCH_HAS_PTDUMP=y
> + CONFIG_PTDUMP=y
>   CONFIG_PTDUMP_DEBUGFS=y

I think we should drop CONFIG_GENERIC_PTDUMP/CONFIG_ARCH_HAS_PTDUMP from
this list. It's not a user-selectable symbol so there's no need to be
documenting it here.

>  
>   mount -t debugfs nodev /sys/kernel/debug
[...]
> diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
> index 77306be62e9e..db005618690b 100644
> --- a/arch/powerpc/configs/mpc885_ads_defconfig
> +++ b/arch/powerpc/configs/mpc885_ads_defconfig
> @@ -78,4 +78,4 @@ CONFIG_DEBUG_VM_PGTABLE=y
>  CONFIG_DETECT_HUNG_TASK=y
>  CONFIG_BDI_SWITCH=y
>  CONFIG_PPC_EARLY_DEBUG=y
> -CONFIG_GENERIC_PTDUMP=y
> +CONFIG_PTDUMP=y

I'd suggest dropp this from the defconfig too, just like patch 1 dropped
it from debug.config.

Steve



More information about the Linuxppc-dev mailing list