linux-next: build failure after merge of the tip tree

Stephen Rothwell posted 1 patch 8 months, 3 weeks ago
arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
linux-next: build failure after merge of the tip tree
Posted by Stephen Rothwell 8 months, 3 weeks ago
Hi all,

After merging the tip 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:396,
                 from arch/powerpc/include/asm/lppaca.h:46,
                 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/spinlock.h:56,
                 from include/linux/mmzone.h:8,
                 from include/linux/gfp.h:7,
                 from include/linux/mm.h:7,
                 from mm/huge_memory.c:8:
mm/huge_memory.c: In function 'maybe_pud_mkwrite':
arch/powerpc/include/asm/book3s/64/pgtable.h:934:41: error: too few arguments to function 'pte_mkwrite'
  934 | #define pud_mkwrite(pud)        pte_pud(pte_mkwrite(pud_pte(pud)))
      |                                         ^~~~~~~~~~~
mm/huge_memory.c:935:23: note: in expansion of macro 'pud_mkwrite'
  935 |                 pud = pud_mkwrite(pud);
      |                       ^~~~~~~~~~~
In file included from include/linux/mm.h:29:
include/linux/pgtable.h:593:21: note: declared here
  593 | static inline pte_t pte_mkwrite(pte_t pte, struct vm_area_struct *vma)
      |                     ^~~~~~~~~~~

Caused by commit

  161e393c0f63 ("mm: Make pte_mkwrite() take a VMA")

interacting with commit

  6440c7b067ef ("powerpc/book3s64/mm: enable transparent pud hugepage")

from the mm-stable tree.

I have applied the following patch for today (hopefully it makes sense):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 15 Aug 2023 15:15:23 +1000
Subject: [PATCH] fix up for "mm: Make pte_mkwrite() take a VMA"

interacting with commit

  6440c7b067ef ("powerpc/book3s64/mm: enable transparent pud hugepage")

from the mm-stable tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/book3s/64/pgtable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index 136232a89739..5c497c862d75 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -931,7 +931,7 @@ static inline pte_t *pudp_ptep(pud_t *pud)
 #define pud_mkdirty(pud)	pte_pud(pte_mkdirty(pud_pte(pud)))
 #define pud_mkclean(pud)	pte_pud(pte_mkclean(pud_pte(pud)))
 #define pud_mkyoung(pud)	pte_pud(pte_mkyoung(pud_pte(pud)))
-#define pud_mkwrite(pud)	pte_pud(pte_mkwrite(pud_pte(pud)))
+#define pud_mkwrite(pud)	pte_pud(pte_mkwrite_novma(pud_pte(pud)))
 #define pud_write(pud)		pte_write(pud_pte(pud))
 
 #ifdef CONFIG_HAVE_ARCH_SOFT_DIRTY
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the tip tree
Posted by Edgecombe, Rick P 8 months, 3 weeks ago
On Tue, 2023-08-15 at 15:29 +1000, Stephen Rothwell wrote:
> Caused by commit
> 
>   161e393c0f63 ("mm: Make pte_mkwrite() take a VMA")
> 
> interacting with commit
> 
>   6440c7b067ef ("powerpc/book3s64/mm: enable transparent pud
> hugepage")
> 
> from the mm-stable tree.
> 
> I have applied the following patch for today (hopefully it makes
> sense):

Thanks. Seems reasonable to me.