2023-07-26 06:08:36

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the mm tree

Hi all,

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

scripts/gdb/linux/constants.py.in:26:10: fatal error: asm/memory.h: No such file or directory
26 | #include <asm/memory.h>
| ^~~~~~~~~~~~~~

Caused by commit

dc7e66b9c82a ("scripts/gdb/aarch64: add aarch64 page operation helper commands and configs")

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

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-07-26 06:17:27

by Aneesh Kumar K.V

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the mm tree

Hi Stephen,

Stephen Rothwell <[email protected]> writes:

> 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.

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?

diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h
index 3195f268ed7f..357e23a403d3 100644
--- a/arch/powerpc/include/asm/book3s/64/radix.h
+++ b/arch/powerpc/include/asm/book3s/64/radix.h
@@ -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,

2023-07-26 07:18:09

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the mm tree

Hi Aneesh,

On Wed, 26 Jul 2023 10:52:33 +0530 "Aneesh Kumar K.V" <[email protected]> wrote:
>
> 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?
>
> diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h
> index 3195f268ed7f..357e23a403d3 100644
> --- a/arch/powerpc/include/asm/book3s/64/radix.h
> +++ b/arch/powerpc/include/asm/book3s/64/radix.h
> @@ -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

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature
Subject: Re: linux-next: build failure after merge of the mm tree

On Wed, 2023-07-26 at 15:14 +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the mm tree, today's linux-next build (s390 defconfig)
> failed like this:
>
> scripts/gdb/linux/constants.py.in:26:10: fatal error: asm/memory.h:
> No such file or directory
> 26 | #include <asm/memory.h>
> | ^~~~~~~~~~~~~~
>
> Caused by commit
>
> dc7e66b9c82a ("scripts/gdb/aarch64: add aarch64 page operation
> helper commands and configs")
>
> I have reverted that commit (and the following 4) for today.
>
Hi Stephen,

Thanks for the report.

Andrew, could you help to drop these GDB changes?

I will try to fix it in v2.

Thanks,
Kuan-Ying Lee