Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 2 participants 3 messages Jun 26, 2019 – Jun 27, 2019

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

Hi all,

After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:

In file included from arch/sparc/include/asm/page_64.h:130:0,

                 from arch/sparc/include/asm/page.h:8,
                 from arch/sparc/include/asm/thread_info_64.h:27,
                 from arch/sparc/include/asm/thread_info.h:5,
                 from include/linux/thread_info.h:38,
                 from include/asm-generic/preempt.h:5,
                 from ./arch/sparc/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:78,
                 from include/linux/spinlock.h:51,
                 from mm/gup.c:5:
mm/gup.c: In function 'gup_huge_pgd':
arch/sparc/include/asm/pgtable_64.h:864:37: error: implicit declaration of function 'pgd_pfn'; did you mean 'pud_pfn'? [-Werror=implicit-function-declaration]
 #define pgd_page(pgd)   pfn_to_page(pgd_pfn(pgd))
                                     ^
include/asm-generic/memory_model.h:54:40: note: in definition of macro '__pfn_to_page'
 #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                        ^~~
mm/gup.c:2147:9: note: in expansion of macro 'pgd_page'
  page = pgd_page(orig) + ((addr & ~PGDIR_MASK) >> PAGE_SHIFT);
         ^~~~~~~~

Caused by commit

51bbf54b3f26 ("sparc64: add the missing pgd_page definition")

I don't see a simple way to fix this, so sparc64 is broken for today :-(

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

As that function is in code only there to provide compile coverage something like this should fix the problem:

arch/sparc/include/asm/pgtable_64.h +3 -1
index 547ff96fb228..1599de730532 100644
@@ -861,10 +861,12 @@ static inline unsigned long pud_page_vaddr(pud_t pud)
 #define pud_clear(pudp)			(pud_val(*(pudp)) = 0UL)
 #define pgd_page_vaddr(pgd)		\
 	((unsigned long) __va(pgd_val(pgd)))
-#define pgd_page(pgd)			pfn_to_page(pgd_pfn(pgd))
 #define pgd_present(pgd)		(pgd_val(pgd) != 0U)
 #define pgd_clear(pgdp)			(pgd_val(*(pgdp)) = 0UL)
 
+/* only used by the stubbed out hugetlb gup code, should never be called */
+#define pgd_page(pgd)			NULL
+
 static inline unsigned long pud_large(pud_t pud)
 {
 	pte_t pte = __pte(pud_val(pud));
#2 lore raw

Hi Christoph,

Quoted 13 lines · On Wed, 26 Jun 2019 15:13:18 +0200 Christoph Hellwig <[email protected]> wrote:

As that function is in code only there to provide compile coverage something like this should fix the problem:

arch/sparc/include/asm/pgtable_64.h +0 -0
index 547ff96fb228..1599de730532 100644
@@ -861,10 +861,12 @@ static inline unsigned long pud_page_vaddr(pud_t pud)
 #define pud_clear(pudp)			(pud_val(*(pudp)) = 0UL)
 #define pgd_page_vaddr(pgd)		\
 	((unsigned long) __va(pgd_val(pgd)))

arch/sparc/include/asm/pgtable_64.h static inline unsigned long pud_page_vaddr(pud_t pud) · line 872

Quoted 10 lines
arch/sparc/include/asm/pgtable_64.h +3 -1
-#define pgd_page(pgd)			pfn_to_page(pgd_pfn(pgd))
 #define pgd_present(pgd)		(pgd_val(pgd) != 0U)
 #define pgd_clear(pgdp)			(pgd_val(*(pgdp)) = 0UL)
 
+/* only used by the stubbed out hugetlb gup code, should never be called */
+#define pgd_page(pgd)			NULL
+
 static inline unsigned long pud_large(pud_t pud)
 {
 	pte_t pte = __pte(pud_val(pud));

Thanks.

Signature · 2 lines
Cheers,
Stephen Rothwell