linux-next: build failure after merge of the mm tree
Subsystems (2)
Hi all,
After merging the mm tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:
In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:32,
from arch/powerpc/include/asm/mmu.h:377,
from arch/powerpc/include/asm/paca.h:18,
from arch/powerpc/include/asm/current.h:13,
from include/linux/thread_info.h:23,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from include/linux/alloc_tag.h:11,
from include/linux/rhashtable-types.h:12,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/compat.h:14,
from arch/powerpc/kernel/asm-offsets.c:12:
arch/powerpc/include/asm/book3s/64/pgtable.h:1364:1: error: expected identifier or '(' before '}' token
1364 | }
| ^arch/powerpc/mm/book3s64/pgtable.c: In function 'pmdp_huge_get_and_clear_full':arch/powerpc/mm/book3s64/pgtable.c:670:33: error: unterminated argument list invoking macro "VM_BUG_ON"
670 | EXPORT_SYMBOL(vm_get_page_prot);
| ^arch/powerpc/mm/book3s64/pgtable.c:207:9: error: 'VM_BUG_ON' undeclared (first use in this function)
207 | VM_BUG_ON((pmd_present(*pmdp) && !pmd_trans_huge(*pmdp) &&
| ^~~~~~~~~
arch/powerpc/mm/book3s64/pgtable.c:207:9: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/mm/book3s64/pgtable.c:207:18: error: expected ';' at end of input
207 | VM_BUG_ON((pmd_present(*pmdp) && !pmd_trans_huge(*pmdp) &&
| ^
| ;
......
arch/powerpc/mm/book3s64/pgtable.c:207:9: error: expected declaration or statement at end of input
207 | VM_BUG_ON((pmd_present(*pmdp) && !pmd_trans_huge(*pmdp) &&
| ^~~~~~~~~arch/powerpc/mm/book3s64/pgtable.c:205:15: error: unused variable 'pmd' [-Werror=unused-variable]
205 | pmd_t pmd;
| ^~~arch/powerpc/mm/book3s64/pgtable.c:671: error: control reaches end of non-void function [-Werror=return-type]
cc1: all warnings being treated as errorsarch/powerpc/mm/book3s64/hash_hugepage.c: In function '__hash_page_thp':arch/powerpc/mm/book3s64/hash_hugepage.c:57:44: error: '_PAGE_DEVMAP' undeclared (first use in this function)
57 | if (!(old_pmd & (H_PAGE_THP_HUGE | _PAGE_DEVMAP)))
| ^~~~~~~~~~~~arch/powerpc/mm/book3s64/hash_hugepage.c:57:44: note: each undeclared identifier is reported only once for each function it appears in arch/powerpc/mm/book3s64/hugetlbpage.c: In function '__hash_page_huge':arch/powerpc/mm/book3s64/hugetlbpage.c:77:42: error: '_PAGE_DEVMAP' undeclared (first use in this function)
77 | if (old_pte & (H_PAGE_THP_HUGE | _PAGE_DEVMAP))
| ^~~~~~~~~~~~arch/powerpc/mm/book3s64/hugetlbpage.c:77:42: note: each undeclared identifier is reported only once for each function it appears in
Caused by commits
c0c3319917db ("mm: remove devmap related functions and page table bits") f9a01843d366 ("mm: remove pXX_devmap callers")
from the mm-unstable branch of the mm tree.
I have applied the following patch for today.
From: Stephen Rothwell <[email protected]>
Date: Thu, 9 Jan 2025 09:33:31 +1100
Subject: [PATCH] fix up for "mm: remove devmap related functions and page
table bits"
and "mm: remove pXX_devmap callers"
--- arch/powerpc/include/asm/book3s/64/pgtable.h | 1 - arch/powerpc/mm/book3s64/hash_hugepage.c | 2 +- arch/powerpc/mm/book3s64/hugetlbpage.c | 2 +- arch/powerpc/mm/book3s64/pgtable.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/book3s/64/pgtable.h +0 -1
@@ -1361,7 +1361,6 @@ static inline bool arch_needs_pgtable_deposit(void) }extern void serialize_against_pte_lookup (struct mm_struct *mm); -}#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #define __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION
arch/powerpc/mm/book3s64/hash_hugepage.c +1 -1
@@ -54,7 +54,7 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,/* * Make sure this is thp or devmap entry */ -if (!(old_pmd & (H_PAGE_THP_HUGE | _PAGE_DEVMAP))) +if (!(old_pmd &H_PAGE_THP_HUGE ))return 0 ; rflags =htab_convert_pte_flags (new_pmd, flags);
arch/powerpc/mm/book3s64/hugetlbpage.c +1 -1
@@ -74,7 +74,7 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, }while (!pte_xchg (ptep,__pte (old_pte),__pte (new_pte)));/* Make sure this is a hugetlb entry */ -if (old_pte & (H_PAGE_THP_HUGE | _PAGE_DEVMAP)) +if (old_pte &H_PAGE_THP_HUGE )return 0 ; rflags =htab_convert_pte_flags (new_pte, flags);
arch/powerpc/mm/book3s64/pgtable.c +1 -1
@@ -204,7 +204,7 @@ pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma, {pmd_t pmd;VM_BUG_ON (addr & ~HPAGE_PMD_MASK ); -VM_BUG_ON ((pmd_present (*pmdp) && !pmd_trans_huge (*pmdp) && +VM_BUG_ON ((pmd_present (*pmdp) && !pmd_trans_huge (*pmdp)) || !pmd_present (*pmdp)); pmd =pmdp_huge_get_and_clear (vma->vm_mm, addr, pmdp);/*
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Quoted 8 lines · Stephen Rothwell
Caused by commits
c0c3319917db("mm: remove devmap related functions and page table bits")f9a01843d366("mm: removepXX_devmapcallers")from the mm-unstable branch of the mm tree.
I have applied the following patch for today.
Argh. Thanks Stephen. I recall this was caught during review, but I must have accidentally dropped the fix up change when I rebased. Will respin with this fixed.
Quoted 72 lines
From: Stephen Rothwell <[email protected]>
Date: Thu, 9 Jan 2025 09:33:31 +1100
Subject: [PATCH] fix up for "mm: remove devmap related functions and page
table bits"and "mm: remove
pXX_devmapcallers"Signed-off-by Stephen Rothwell <[email protected]>--- arch/powerpc/include/asm/book3s/64/pgtable.h | 1 - arch/powerpc/mm/book3s64/hash_hugepage.c | 2 +- arch/powerpc/mm/book3s64/hugetlbpage.c | 2 +- arch/powerpc/mm/book3s64/pgtable.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-)arch/powerpc/include/asm/book3s/64/pgtable.h +0
-1@@ -1361,7 +1361,6 @@ static inline bool arch_needs_pgtable_deposit(void) }extern void serialize_against_pte_lookup (struct mm_struct *mm); -}#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #define __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTIONarch/powerpc/mm/book3s64/hash_hugepage.c +1
-1@@ -54,7 +54,7 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,/* * Make sure this is thp or devmap entry */ -if (!(old_pmd & (H_PAGE_THP_HUGE | _PAGE_DEVMAP))) +if (!(old_pmd &H_PAGE_THP_HUGE ))return 0 ; rflags =htab_convert_pte_flags (new_pmd, flags);arch/powerpc/mm/book3s64/hugetlbpage.c +1
-1@@ -74,7 +74,7 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid, }while (!pte_xchg (ptep,__pte (old_pte),__pte (new_pte)));/* Make sure this is a hugetlb entry */ -if (old_pte & (H_PAGE_THP_HUGE | _PAGE_DEVMAP)) +if (old_pte &H_PAGE_THP_HUGE )return 0 ; rflags =htab_convert_pte_flags (new_pte, flags);arch/powerpc/mm/book3s64/pgtable.c +1
-1@@ -204,7 +204,7 @@ pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma, {pmd_t pmd;VM_BUG_ON (addr & ~HPAGE_PMD_MASK ); -VM_BUG_ON ((pmd_present (*pmdp) && !pmd_trans_huge (*pmdp) && +VM_BUG_ON ((pmd_present (*pmdp) && !pmd_trans_huge (*pmdp)) || !pmd_present (*pmdp)); pmd =pmdp_huge_get_and_clear (vma->vm_mm, addr, pmdp);/* Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell