Skip to contentSkip to conversation

linux-next: build failure after merge of the mm-hotfixes tree

DISCUSSION Stephen Rothwell 3 participants 4 messages Nov 25, 2022

Subsystems (9)
x86 Linux-next tree MIPS MM core +5 more subsystems
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the mm-hotfixes tree, today's linux-next build (arm allmodconfig) failed like this:

mm/vmscan.c:4090:9: error: implicit declaration of function ‘pmd_young’; did you mean ‘pte_young’? [-Werror=implicit-function-declaration]

Caused by commit

3f85e711d5af ("mm: introduce arch_has_hw_nonleaf_pmd_young()")

This error was found by the kernel.ci bot and so is still int today's tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
Acked-by Yu Zhao
#1 lore raw
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the mm-hotfixes tree, today's linux-next build (arm allmodconfig) failed like this:

mm/vmscan.c:4090:9: error: implicit declaration of function ‘pmd_young’; did you mean ‘pte_young’? [-Werror=implicit-function-declaration]

Caused by commit

   3f85e711d5af ("mm: introduce arch_has_hw_nonleaf_pmd_young()")

A patch fixing this is available already (see attached mail).

Juergen

The patch titled
Subject: mm: add dummy pmd_young() for architectures not having it
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-add-dummy-pmd_young-for-architectures-not-having-it.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-add-dummy-pmd_young-for-architectures-not-having-it.patch

This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Juergen Gross <[email protected]>
Subject: mm: add dummy pmd_young() for architectures not having it

In order to avoid #ifdeffery add a dummy pmd_young() implementation as a fallback. This is required for the later patch "mm: introduce arch_has_hw_nonleaf_pmd_young()".

Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Sander Eikelenboom <[email protected]>
Cc Thomas Gleixner <[email protected]>

---

 arch/loongarch/include/asm/pgtable.h |    1 +
 arch/mips/include/asm/pgtable.h      |    1 +
 arch/riscv/include/asm/pgtable.h     |    1 +
 arch/s390/include/asm/pgtable.h      |    1 +
 arch/sparc/include/asm/pgtable_64.h  |    1 +
 arch/x86/include/asm/pgtable.h       |    1 +
 include/linux/pgtable.h              |    7 +++++++
 7 files changed, 13 insertions(+)
arch/loongarch/include/asm/pgtable.h renamed from arch/loongarch/include/asm/pgtable.h~mm-add-dummy-pmd_young-for-architectures-not-having-it +1 -0
@@ -482,6 +482,7 @@ static inline pmd_t pmd_mkdirty(pmd_t pm
 	return pmd;
 }
 
+#define pmd_young pmd_young
 static inline int pmd_young(pmd_t pmd)
 {
 	return !!(pmd_val(pmd) & _PAGE_ACCESSED);
arch/mips/include/asm/pgtable.h renamed from arch/mips/include/asm/pgtable.h~mm-add-dummy-pmd_young-for-architectures-not-having-it +1 -0
@@ -622,6 +622,7 @@ static inline pmd_t pmd_mkdirty(pmd_t pm
 	return pmd;
 }
 
+#define pmd_young pmd_young
 static inline int pmd_young(pmd_t pmd)
 {
 	return !!(pmd_val(pmd) & _PAGE_ACCESSED);
arch/riscv/include/asm/pgtable.h renamed from arch/riscv/include/asm/pgtable.h~mm-add-dummy-pmd_young-for-architectures-not-having-it +1 -0
@@ -600,6 +600,7 @@ static inline int pmd_dirty(pmd_t pmd)
 	return pte_dirty(pmd_pte(pmd));
 }
 
+#define pmd_young pmd_young
 static inline int pmd_young(pmd_t pmd)
 {
 	return pte_young(pmd_pte(pmd));
arch/s390/include/asm/pgtable.h renamed from arch/s390/include/asm/pgtable.h~mm-add-dummy-pmd_young-for-architectures-not-having-it +1 -0
@@ -763,6 +763,7 @@ static inline int pmd_dirty(pmd_t pmd)
 	return (pmd_val(pmd) & _SEGMENT_ENTRY_DIRTY) != 0;
 }
 
+#define pmd_young pmd_young
 static inline int pmd_young(pmd_t pmd)
 {
 	return (pmd_val(pmd) & _SEGMENT_ENTRY_YOUNG) != 0;
arch/sparc/include/asm/pgtable_64.h renamed from arch/sparc/include/asm/pgtable_64.h~mm-add-dummy-pmd_young-for-architectures-not-having-it +1 -0
@@ -693,6 +693,7 @@ static inline unsigned long pmd_dirty(pm
 	return pte_dirty(pte);
 }
 
+#define pmd_young pmd_young
 static inline unsigned long pmd_young(pmd_t pmd)
 {
 	pte_t pte = __pte(pmd_val(pmd));
arch/x86/include/asm/pgtable.h renamed from arch/x86/include/asm/pgtable.h~mm-add-dummy-pmd_young-for-architectures-not-having-it +1 -0
@@ -139,6 +139,7 @@ static inline int pmd_dirty(pmd_t pmd)
 	return pmd_flags(pmd) & _PAGE_DIRTY;
 }
 
+#define pmd_young pmd_young
 static inline int pmd_young(pmd_t pmd)
 {
 	return pmd_flags(pmd) & _PAGE_ACCESSED;
include/linux/pgtable.h renamed from include/linux/pgtable.h~mm-add-dummy-pmd_young-for-architectures-not-having-it +7 -0
@@ -165,6 +165,13 @@ static inline pte_t *virt_to_kpte(unsign
 	return pmd_none(*pmd) ? NULL : pte_offset_kernel(pmd, vaddr);
 }
 
+#ifndef pmd_young
+static inline int pmd_young(pmd_t pmd)
+{
+	return 0;
+}
+#endif
+
 #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
 extern int ptep_set_access_flags(struct vm_area_struct *vma,
 				 unsigned long address, pte_t *ptep,

_

Patches currently in -mm which might be from [email protected] are

mm-add-dummy-pmd_young-for-architectures-not-having-it.patch mm-introduce-arch_has_hw_nonleaf_pmd_young.patch

maintainer
#2 lore raw
In reply to Stephen Rothwell
Quoted 5 lines · On Fri, 25 Nov 2022 12:10:51 +1100 Stephen Rothwell <[email protected]>…

Hi all,

After merging the mm-hotfixes tree, today's linux-next build (arm allmodconfig) failed like this:

Quoted 8 lines

mm/vmscan.c:4090:9: error: implicit declaration of function ‘pmd_young’; did you mean ‘pte_young’? [-Werror=implicit-function-declaration]

Caused by commit

3f85e711d5af ("mm: introduce arch_has_hw_nonleaf_pmd_young()")

This error was found by the kernel.ci bot and so is still int today's tree.

Thanks. Did that tree include "mm: add dummy pmd_young() for architectures not having it"?

#3 lore raw

Hi Andrew,

Quoted 12 lines · On Thu, 24 Nov 2022 21:24:57 -0800 Andrew Morton <[email protected]>…
Quoted 9 lines · On Fri, 25 Nov 2022 12:10:51 +1100 Stephen Rothwell <[email protected]>…

Hi all,

After merging the mm-hotfixes tree, today's linux-next build (arm allmodconfig) failed like this:

mm/vmscan.c:4090:9: error: implicit declaration of function ‘pmd_young’; did you mean ‘pte_young’? [-Werror=implicit-function-declaration]

Caused by commit

Quoted 7 lines
Quoted 4 lines

3f85e711d5af ("mm: introduce arch_has_hw_nonleaf_pmd_young()")

This error was found by the kernel.ci bot and so is still int today's tree.

Thanks. Did that tree include "mm: add dummy pmd_young() for architectures not having it"?

It did not when I merged the mm-hotfixes branch, but then I refetched your trees during the day and so that patch appeared when I merged the mm tree (which is now based on a later version of the mm-hotfixes branch). So next-20221125 as a whole will not have the build failure.

After I merge all the "fixes" branches, I upload a "pending-updates" branch that feeds into the various bots independently of the full next tree.

Signature · 2 lines
Cheers,
Stephen Rothwell