Re: linux-next: build warning after merge of the akpm-current tree

From: Yu Zhao
Date: Wed Apr 13 2022 - 02:20:18 EST


On Wed, Apr 13, 2022 at 03:15:13PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the akpm-current tree, today's linux-next build (i386
> defconfig) produced this warning:
>
> WARNING: unmet direct dependencies detected for ARCH_HAS_NONLEAF_PMD_YOUNG
> Depends on [n]: PGTABLE_LEVELS [=2]>2
> Selected by [y]:
> - X86 [=y]
>
> Introduced by commit
>
> 7613417c58a8 ("mm: x86: add CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG")

Sorry about the hassle. I'll fix it up in the next version. Meanwhile,
mind applying this so that it doesn't block your progress? Thanks.

diff --git a/arch/Kconfig b/arch/Kconfig
index c626bed3553d..1f0f39262d84 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1380,7 +1380,6 @@ config HAVE_ARCH_NODE_DEV_GROUP

config ARCH_HAS_NONLEAF_PMD_YOUNG
bool
- depends on PGTABLE_LEVELS > 2
help
Architectures that select this option are capable of setting the
accessed bit in non-leaf PMD entries when using them as part of linear
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 42c84e1ad73f..a2110f3c3209 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -86,7 +86,7 @@ config X86
select ARCH_HAS_PMEM_API if X86_64
select ARCH_HAS_PTE_DEVMAP if X86_64
select ARCH_HAS_PTE_SPECIAL
- select ARCH_HAS_NONLEAF_PMD_YOUNG
+ select ARCH_HAS_NONLEAF_PMD_YOUNG if PGTABLE_LEVELS > 2
select ARCH_HAS_UACCESS_FLUSHCACHE if X86_64
select ARCH_HAS_COPY_MC if X86_64
select ARCH_HAS_SET_MEMORY