Re: [PATCH v2 1/2] mm/Kconfig: make FLATMEM depend on !NUMA

From: Zi Yan

Date: Tue Aug 04 2026 - 12:03:51 EST


On Tue Aug 4, 2026 at 11:11 AM EDT, Sang-Heon Jeon wrote:
> FLATMEM + NUMA is not supported by any architecture and fails to build.
> The constraint is only implicit in the arch Kconfig files.
>
> So make it explicit in mm/Kconfig.
>
> No functional change.
>
> Suggested-by: Zi Yan <ziy@xxxxxxxxxx>
> Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
> ---
> mm/Kconfig | 2 ++
> 1 file changed, 2 insertions(+)

Hopefully no new arch will try to support it.

Acked-by: Zi Yan <ziy@xxxxxxxxxx>

>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 060190e12bce..331daf7fcfab 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -390,6 +390,7 @@ choice
>
> config FLATMEM_MANUAL
> bool "Flat Memory"
> + depends on !NUMA
> depends on !ARCH_SPARSEMEM_ENABLE || ARCH_FLATMEM_ENABLE
> help
> This option is best suited for non-NUMA systems with
> @@ -424,6 +425,7 @@ config SPARSEMEM
>
> config FLATMEM
> def_bool y
> + depends on !NUMA
> depends on !SPARSEMEM || FLATMEM_MANUAL
>
> #




--
Best Regards,
Yan, Zi