Skip to contentSkip to conversation

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

PATCH Stephen Rothwell 2 participants 4 messages Nov 20, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc64 allnoconfig) failed like this:

In file included from arch/powerpc/include/asm/book3s/64/mmu -hash.h:24:0,

                 from arch/powerpc/include/asm/book3s/64/mmu.h:30,
                 from arch/powerpc/include/asm/mmu.h:305,
                 from arch/powerpc/include/asm/lppaca.h:36,
                 from arch/powerpc/include/asm/paca.h:21,
                 from arch/powerpc/include/asm/current.h:16,
                 from include/linux/sched.h:12,
                 from arch/powerpc/kernel/asm-offsets.c:17:
arch/powerpc/include/asm/book3s/64/pgtable.h:844:35: error: expected declaration specifiers or '...' before 'pud_pte'
 #define pud_write(pud)  pte_write(pud_pte(pud))
                                   ^
include/asm-generic/pgtable.h:817:19: note: in expansion of macro 'pud_write'
 static inline int pud_write(pud_t pud)
                   ^

Caused by commit

5292abe86ee6 ("mm: fix device-dax pud write-faults triggered by get_user_pages()")

grep is your friend ... there may be more fixes needed.

I added the following fix patch:

From: Stephen Rothwell <[email protected]>
Date: Mon, 20 Nov 2017 12:52:24 +1100
Subject: [PATCH] mm: fix device-dax pud write-faults triggered by
get_user_pages() fix

---
 arch/powerpc/include/asm/book3s/64/pgtable.h | 1 +
 arch/powerpc/include/asm/nohash/64/pgtable.h | 1 +
 2 files changed, 2 insertions(+)
arch/powerpc/include/asm/book3s/64/pgtable.h +1 -0
index 9a677cd5997f..700b26cbd867 100644
@@ -841,6 +841,7 @@ static inline pud_t pte_pud(pte_t pte)
 {
 	return __pud_raw(pte_raw(pte));
 }
+#define __HAVE_ARCH_PUD_WRITE
 #define pud_write(pud)		pte_write(pud_pte(pud))
 
 static inline int pud_bad(pud_t pud)
arch/powerpc/include/asm/nohash/64/pgtable.h +1 -0
index abddf5830ad5..424053fdf8d2 100644
@@ -144,6 +144,7 @@ static inline pud_t pte_pud(pte_t pte)
 {
 	return __pud(pte_val(pte));
 }
+#define __HAVE_ARCH_PUD_WRITE
 #define pud_write(pud)		pte_write(pud_pte(pud))
 #define pgd_write(pgd)		pte_write(pgd_pte(pgd))
 
Signature · 5 lines
2.15.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 21 lines · Stephen Rothwell

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc64 allnoconfig) failed like this:

In file included from arch/powerpc/include/asm/book3s/64/mmu -hash.h:24:0,

                 from arch/powerpc/include/asm/book3s/64/mmu.h:30,
                 from arch/powerpc/include/asm/mmu.h:305,
                 from arch/powerpc/include/asm/lppaca.h:36,
                 from arch/powerpc/include/asm/paca.h:21,
                 from arch/powerpc/include/asm/current.h:16,
                 from include/linux/sched.h:12,
                 from arch/powerpc/kernel/asm-offsets.c:17:
arch/powerpc/include/asm/book3s/64/pgtable.h:844:35: error: expected declaration specifiers or '...' before 'pud_pte'
 #define pud_write(pud)  pte_write(pud_pte(pud))
                                   ^
include/asm-generic/pgtable.h:817:19: note: in expansion of macro 'pud_write'
 static inline int pud_write(pud_t pud)
                   ^
Quoted 5 lines

Caused by commit

5292abe86ee6 ("mm: fix device-dax pud write-faults triggered by get_user_pages()")

grep is your friend ... there may be more fixes needed.

Ugh, yes. Looks correct. I might have confused my build success notifications from 0day. I'll spin out a new branch to make sure this is the last of it.

#2 lore raw

Hi Dan,

Quoted 4 lines · On Sun, 19 Nov 2017 20:25:18 -0800 Dan Williams <[email protected]>…

Ugh, yes. Looks correct. I might have confused my build success notifications from 0day. I'll spin out a new branch to make sure this is the last of it.

Thanks.

While I have your attention ... did you consider using the other paradigm:

In arch include files:
#define pud_write pud_write
static inline int pud_write(pud_t pud)
.....

Then in include/asm-generic/pgtable.h:

#ifndef pud_write
tatic inline int pud_write(pud_t pud)

{
	....
}

#endif

If you had, then the powerpc code would have worked ... ;-) and many of the other interfaces in include/asm-generic/pgtable.h are protected that way ...

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 22 lines · Stephen Rothwell

Hi Dan,

Quoted 4 lines · On Sun, 19 Nov 2017 20:25:18 -0800 Dan Williams <[email protected]>…

Ugh, yes. Looks correct. I might have confused my build success notifications from 0day. I'll spin out a new branch to make sure this is the last of it.

Thanks.

While I have your attention ... did you consider using the other paradigm:

In arch include files:
#define pud_write pud_write
static inline int pud_write(pud_t pud)
.....

Then in include/asm-generic/pgtable.h:

#ifndef pud_write
tatic inline int pud_write(pud_t pud)

Quoted 8 lines
{
        ....
}

#endif

If you had, then the powerpc code would have worked ... ;-) and many of the other interfaces in include/asm-generic/pgtable.h are protected that way ...

I like that better. I simply cargo-culted the way pmd_write() was defined, and should have given it a bit more thought. Andrew, I'll respin these with Stephen's suggestion.