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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/13/25 13:08, Christophe Leroy wrote:
> 
> 
> Le 13/02/2025 à 05:09, Anshuman Khandual a écrit :
>> 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.
> 
> For me GENERIC_PTDUMP is more explicit and similar to GENERIC_IOMAP or GENERIC_IOREMAP or GENERIC_GETTIMEOFDAY: The arch provides the necessary helpers to use the generic implementation.

I do realize that GENERIC_ is another method for achieving shared
feature across multiple platforms via providing necessary helpers.
But I guess there might be a difference - it might not have other
similar but separate dependent configs ?

> 
> For me ARCH_HAS_PTDUMP just mean't that an architecture implements PTDUMP, it doesn't mean it does it by using the generic infrastructure.

ARCH_HAS_XXX indicates that an architecture subscribes to a generic
feature XXX, by implementing all necessary helpers. But the feature
in itself is a generic and a shared one.

If the platform were to implement a feature on its own without any
generic component, it could do that via a separate platform specific
config without requiring ARCH_HAS_XXX based subscription indication.

> 
> For instance, arm32 implements PTDUMP but without using the generic one so I would say that arm32 has PTDUMP and expect it to select ARCH_HAS_PTDUMP

Actually it does not need to select ARCH_HAS_PTDUMP, as it does not
subscribe into generic PTDUMP. Let's see PTDUMP configs on arm (32)

ARM_PTDUMP_CORE
ARM_PTDUMP_DEBUGFS	--> select ARM_PTDUMP_CORE
ARM_DEBUG_WX 		--> select ARM_PTDUMP_CORE

The platform has a self contained PTDUMP implementation which does
not depend on generic PTDUMP at all. Hence all these ptdump configs
are marked as ARM_ etc as they are platform specific.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux