Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 2 participants 3 messages Jul 26, 2023

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

Hi all,

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

In file included from arch/powerpc/include/asm/book3s/64/pgtable.h:285,

                 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/ipc.h:5,
                 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/radix.h:367:30: error: static declaration of 'vmemmap_can_optimize' follows non-static declaration
  367 | #define vmemmap_can_optimize vmemmap_can_optimize
      |                              ^~~~~~~~~~~~~~~~~~~~
include/linux/mm.h:3695:20: note: in expansion of macro 'vmemmap_can_optimize'
 3695 | static inline bool vmemmap_can_optimize(struct vmem_altmap *altmap,
      |                    ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/book3s/64/radix.h:367:30: note: previous declaration of 'vmemmap_can_optimize' with type 'bool(struct vmem_altmap *, struct dev_pagemap *)' {aka '_Bool(struct vmem_altmap *, struct dev_pagemap *)'}
  367 | #define vmemmap_can_optimize vmemmap_can_optimize
      |                              ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/book3s/64/radix.h:368:6: note: in expansion of macro 'vmemmap_can_optimize'
  368 | bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
      |      ^~~~~~~~~~~~~~~~~~~~

Presumably caused by commit

f684ffc3ac9f ("powerpc/book3s64/radix: add support for vmemmap optimization for radix")

I have reverted that commit (and the following 2) for today.

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

Hi Stephen,

Quoted 35 lines · Stephen Rothwell

Hi all,

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

In file included from arch/powerpc/include/asm/book3s/64/pgtable.h:285,

                 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/ipc.h:5,
                 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/radix.h:367:30: error: static declaration of 'vmemmap_can_optimize' follows non-static declaration
  367 | #define vmemmap_can_optimize vmemmap_can_optimize
      |                              ^~~~~~~~~~~~~~~~~~~~
include/linux/mm.h:3695:20: note: in expansion of macro 'vmemmap_can_optimize'
 3695 | static inline bool vmemmap_can_optimize(struct vmem_altmap *altmap,
      |                    ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/book3s/64/radix.h:367:30: note: previous declaration of 'vmemmap_can_optimize' with type 'bool(struct vmem_altmap *, struct dev_pagemap *)' {aka '_Bool(struct vmem_altmap *, struct dev_pagemap *)'}
  367 | #define vmemmap_can_optimize vmemmap_can_optimize
      |                              ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/book3s/64/radix.h:368:6: note: in expansion of macro 'vmemmap_can_optimize'
  368 | bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
      |      ^~~~~~~~~~~~~~~~~~~~
Quoted 5 lines

Presumably caused by commit

f684ffc3ac9f ("powerpc/book3s64/radix: add support for vmemmap optimization for radix")

I have reverted that commit (and the following 2) for today.

Thanks for the report. Can you add the below diff. We should look at ppc64 not including radix headers if CONFIG_PPC_RADIX_MMU is disabled. But for now we can keep the below diff?

arch/powerpc/include/asm/book3s/64/radix.h +2 -0
index 3195f268ed7f..357e23a403d3 100644
@@ -364,8 +364,10 @@ int radix__remove_section_mapping(unsigned long start, unsigned long end);
 
 void radix__kernel_map_pages(struct page *page, int numpages, int enable);
 
+#ifdef CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
 #define vmemmap_can_optimize vmemmap_can_optimize
 bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
+#endif
 
 #define vmemmap_populate_compound_pages vmemmap_populate_compound_pages
 int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,
#2 lore raw

Hi Aneesh,

Quoted 10 lines · On Wed, 26 Jul 2023 10:52:33 +0530 "Aneesh Kumar K.V"…

Thanks for the report. Can you add the below diff. We should look at ppc64 not including radix headers if CONFIG_PPC_RADIX_MMU is disabled. But for now we can keep the below diff?

arch/powerpc/include/asm/book3s/64/radix.h +0 -0
index 3195f268ed7f..357e23a403d3 100644

arch/powerpc/include/asm/book3s/64/radix.h int radix__remove_section_mapping(unsigned long start, unsigned long end); · line 373

Quoted 10 lines
arch/powerpc/include/asm/book3s/64/radix.h +2 -0
@@ -364,8 +364,10 @@ int radix__remove_section_mapping(unsigned long start, unsigned long end);
 
 void radix__kernel_map_pages(struct page *page, int numpages, int enable);
 
+#ifdef CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
 #define vmemmap_can_optimize vmemmap_can_optimize
 bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap);
+#endif
 
 #define vmemmap_populate_compound_pages vmemmap_populate_compound_pages
 int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn,

That fixes the powerpc64 allnoconfig build for me

Signature · 2 lines
Cheers,
Stephen Rothwell