linux-next: build failure after merge of the akpm-current tree
Subsystems (2)
Hi all,
After merging the akpm-current tree, today's linux-next build (x86_64 allnoconfig) failed like this:
In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:56,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/mm.h: In function 'is_pinnable_page':
include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
64 | int __sec = page_to_section(__pg); \
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/mm.h:1134:15: note: in expansion of macro 'page_to_pfn'
1134 | is_zero_pfn(page_to_pfn(page));
| ^~~~~~~~~~~
In file included from include/linux/kallsyms.h:12,
from include/linux/bpf.h:21,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/mm.h: At top level:
include/linux/mm.h:1505:29: error: conflicting types for 'page_to_section'
1505 | static inline unsigned long page_to_section(const struct page *page)
| ^~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:56,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/asm-generic/memory_model.h:64:14: note: previous implicit declaration of 'page_to_section' was here
64 | int __sec = page_to_section(__pg); \
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/mm.h:1134:15: note: in expansion of macro 'page_to_pfn'
1134 | is_zero_pfn(page_to_pfn(page));
| ^~~~~~~~~~~This build has CONFIG_SPARSEMEM set and CONFIG_SPARSEMEM_VMEMMAP not set.
Caused by commit
983cb10d3f90 ("mm/gup: do not migrate zero page")
I have applied the following patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 19:49:00 +1100
Subject: [PATCH] make is_pinnable_page a macro
As it is currently defined before page_to_section() which it needs.
--- include/linux/mm.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
include/linux/mm.h +3 -5
@@ -1128,11 +1128,9 @@ static inline bool is_zone_movable_page(const struct page *page) }/* MIGRATE_CMA and ZONE_MOVABLE do not allow pin pages */ -static inline bool is_pinnable_page (struct page *page) -{ -return !(is_zone_movable_page (page) ||is_migrate_cma_page (page)) || -is_zero_pfn (page_to_pfn (page)); -} +#define is_pinnable_page (page) \ + (!(is_zone_movable_page(page) || is_migrate_cma_page(page)) || \ + is_zero_pfn(page_to_pfn(page)))#ifdef CONFIG_DEV_PAGEMAP_OPS void free_devmap_managed_page (struct page *page);
Signature · 5 lines
2.29.2 -- Cheers, Stephen Rothwell
Quoted 16 lines · Stephen Rothwell
After merging the akpm-current tree, today's linux-next build (
x86_64allnoconfig) failed like this:In file included from
arch/x86/include/asm/page.h:76,from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:56, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9:
include/linux/mm.h: In function 'is_pinnable_page':include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
Quoted 8 lines
64 | int __sec = page_to_section(__pg); \
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/mm.h:1134:15: note: in expansion of macro 'page_to_pfn'
1134 | is_zero_pfn(page_to_pfn(page));
| ^~~~~~~~~~~In addition, [email protected] reports for m68k/m5272c3_defconfig:
include/linux/mm.h:1133:3: error: implicit declaration of function
'is_zero_pfn'; did you mean 'is_zero_ino'? [-Werror=implicit-function-declaration]
is_zero_pfn() is only defined if CONFIG_MMU=y.
Hence using it in mm/gup.c in commit 3f509f6aef4bb868 ("mm/gup: migrate pinned pages out of movable zone") breaks compilation of gup.c, too.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert,
The fix is here:
https://lore.kernel.org/linux-mm/CA+CK2bBjC8=cRsL5VhWkcevPsqSXWhsANVjsFNMERLT8vWtiQw@mail.gmail.com/
Thank you,
Pasha
Quoted 49 lines · Geert Uytterhoeven
Quoted 16 lines · Stephen Rothwell
After merging the akpm-current tree, today's linux-next build (
x86_64allnoconfig) failed like this:In file included from
arch/x86/include/asm/page.h:76,from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:56, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9:
include/linux/mm.h: In function 'is_pinnable_page':include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]Quoted 8 lines
64 | int __sec = page_to_section(__pg); \ | ^~~~~~~~~~~~~~~ include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn' 81 | #define page_to_pfn __page_to_pfn | ^~~~~~~~~~~~~ include/linux/mm.h:1134:15: note: in expansion of macro 'page_to_pfn' 1134 | is_zero_pfn(page_to_pfn(page)); | ^~~~~~~~~~~In addition, [email protected] reports for m68k/m5272c3_defconfig:
include/linux/mm.h:1133:3: error: implicit declaration of function
'is_zero_pfn'; did you mean 'is_zero_ino'? [-Werror=implicit-function-declaration]
is_zero_pfn()is only defined ifCONFIG_MMU=y.Hence using it in
mm/gup.cin commit3f509f6aef4bb868("mm/gup: migrate pinned pages out of movable zone") breaks compilation ofgup.c, too.Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Pavel,
Quoted 2 lines · Pavel Tatashin
The fix is here:
https://lore.kernel.org/linux-mm/CA+CK2bBjC8=cRsL5VhWkcevPsqSXWhsANVjsFNMERLT8vWtiQw@mail.gmail.com/
Thanks, that fixed the m68k/m5272c3_defconfig build.
Quoted 29 lines · Geert Uytterhoeven
Quoted 28 lines · Stephen Rothwell
Quoted 16 lines
After merging the akpm-current tree, today's linux-next build (
x86_64allnoconfig) failed like this:In file included from
arch/x86/include/asm/page.h:76,from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:56, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9:
include/linux/mm.h: In function 'is_pinnable_page':include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]Quoted 8 lines
64 | int __sec = page_to_section(__pg); \ | ^~~~~~~~~~~~~~~ include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn' 81 | #define page_to_pfn __page_to_pfn | ^~~~~~~~~~~~~ include/linux/mm.h:1134:15: note: in expansion of macro 'page_to_pfn' 1134 | is_zero_pfn(page_to_pfn(page)); | ^~~~~~~~~~~In addition, [email protected] reports for m68k/m5272c3_defconfig:
Quoted 8 lines
Quoted 8 lines
include/linux/mm.h:1133:3: error: implicit declaration of function
'is_zero_pfn'; did you mean 'is_zero_ino'? [-Werror=implicit-function-declaration]
is_zero_pfn()is only defined ifCONFIG_MMU=y.Hence using it in
mm/gup.cin commit3f509f6aef4bb868("mm/gup: migrate pinned pages out of movable zone") breaks compilation ofgup.c, too.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 5 lines · Stephen Rothwell
983cb10d3f90("mm/gup: do not migrate zero page")I have applied the following patch for today:
Quoted 7 lines
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 19:49:00 +1100
Subject: [PATCH] makeis_pinnable_pagea macroAs it is currently defined before
page_to_section()which it needs.Signed-off-by Stephen Rothwell <[email protected]>
I still see the same problem in next-20210203, and your patch below fixes it for me.
Did you drop it from the latest build?
Arnd
Quoted 19 lines
include/linux/mm.h +3
-5@@ -1128,11 +1128,9 @@ static inline bool is_zone_movable_page(const struct page *page) }/* MIGRATE_CMA and ZONE_MOVABLE do not allow pin pages */ -static inline bool is_pinnable_page (struct page *page) -{ -return !(is_zone_movable_page (page) ||is_migrate_cma_page (page)) || -is_zero_pfn (page_to_pfn (page)); -} +#define is_pinnable_page (page) \ + (!(is_zone_movable_page(page) || is_migrate_cma_page(page)) || \ + is_zero_pfn(page_to_pfn(page)))#ifdef CONFIG_DEV_PAGEMAP_OPS void free_devmap_managed_page (struct page *page);
Quoted 13 lines · Arnd Bergmann
Quoted 11 lines · Stephen Rothwell
983cb10d3f90("mm/gup: do not migrate zero page")I have applied the following patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 19:49:00 +1100
Subject: [PATCH] makeis_pinnable_pagea macroAs it is currently defined before
page_to_section()which it needs.
Quoted 7 lines
Quoted 1 line
Signed-off-by Stephen Rothwell <[email protected]>I still see the same problem in next-20210203, and your patch below fixes it for me.
Did you drop it from the latest build?Arnd
After the most recent build errors, I tried to apply Pavel's patch
https://lore.kernel.org/linux-mm/CA+CK2bBjC8=cRsL5VhWkcevPsqSXWhsANVjsFNMERLT8vWtiQw@mail.gmail.com/
but patch said that it was already applied (by Andrew I think), so I bailed out (gave up).
Quoted 19 lines
Quoted 19 lines
include/linux/mm.h +3
-5@@ -1128,11 +1128,9 @@ static inline bool is_zone_movable_page(const struct page *page) }/* MIGRATE_CMA and ZONE_MOVABLE do not allow pin pages */ -static inline bool is_pinnable_page (struct page *page) -{ -return !(is_zone_movable_page (page) ||is_migrate_cma_page (page)) || -is_zero_pfn (page_to_pfn (page)); -} +#define is_pinnable_page (page) \ + (!(is_zone_movable_page(page) || is_migrate_cma_page(page)) || \ + is_zero_pfn(page_to_pfn(page)))#ifdef CONFIG_DEV_PAGEMAP_OPS void free_devmap_managed_page (struct page *page);
Signature · 1 line
~Randy
Quoted 22 lines · Randy Dunlap
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · Stephen Rothwell
983cb10d3f90("mm/gup: do not migrate zero page")I have applied the following patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 19:49:00 +1100
Subject: [PATCH] makeis_pinnable_pagea macroQuoted 8 lines
Quoted 3 lines
As it is currently defined before
page_to_section()which it needs.Signed-off-by Stephen Rothwell <[email protected]>I still see the same problem in next-20210203, and your patch below fixes it for me.
Did you drop it from the latest build?
Quoted 4 lines
After the most recent build errors, I tried to apply Pavel's patch
https://lore.kernel.org/linux-mm/CA+CK2bBjC8=cRsL5VhWkcevPsqSXWhsANVjsFNMERLT8vWtiQw@mail.gmail.com/
but patch said that it was already applied (by Andrew I think), so I bailed out (gave up).
As far as I can tell, there are two different bugs that got mixed up, and we need both Pavel's patch (which is now in -next) and Stephen's (which got dropped again).
Arnd
Quoted 8 lines
Quoted 4 lines
After the most recent build errors, I tried to apply Pavel's patch
https://lore.kernel.org/linux-mm/CA+CK2bBjC8=cRsL5VhWkcevPsqSXWhsANVjsFNMERLT8vWtiQw@mail.gmail.com/
but patch said that it was already applied (by Andrew I think), so I bailed out (gave up).As far as I can tell, there are two different bugs that got mixed up, and we need both Pavel's patch (which is now in -next) and Stephen's (which got dropped again).
Stephen's patch looks OK to me. I should have used define instead of inline to begin with.
Thank you,
Pasha
Quoted 2 lines
Arnd
Stephen, do you want to send a new patch based on the current linux-next, or do you want me to send an updated version?
Thank you,
Pasha
Quoted 18 lines · Pavel Tatashin
Quoted 9 lines
Quoted 5 lines
After the most recent build errors, I tried to apply Pavel's patch
https://lore.kernel.org/linux-mm/CA+CK2bBjC8=cRsL5VhWkcevPsqSXWhsANVjsFNMERLT8vWtiQw@mail.gmail.com/
but patch said that it was already applied (by Andrew I think), so I bailed out (gave up).As far as I can tell, there are two different bugs that got mixed up, and we need both Pavel's patch (which is now in -next) and Stephen's (which got dropped again).
Stephen's patch looks OK to me. I should have used define instead of inline to begin with.
Thank you,
PashaQuoted 2 lines
Arnd
Hi Pavel,
Quoted 3 lines · On Wed, 3 Feb 2021 18:21:07 -0500 Pavel Tatashin <[email protected]>…
Stephen, do you want to send a new patch based on the current linux-next, or do you want me to send an updated version?
I'll send another one and include it in linux-next today.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 5 lines
Quoted 3 lines
Stephen, do you want to send a new patch based on the current linux-next, or do you want me to send an updated version?
I'll send another one and include it in linux-next today.
I appreciate it.
Pasha
Quoted 23 lines · Arnd Bergmann
Quoted 22 lines · Randy Dunlap
Quoted 19 lines · Arnd Bergmann
Quoted 5 lines · Stephen Rothwell
983cb10d3f90("mm/gup: do not migrate zero page")I have applied the following patch for today:
Quoted 7 lines
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 19:49:00 +1100
Subject: [PATCH] makeis_pinnable_pagea macroAs it is currently defined before
page_to_section()which it needs.Signed-off-by Stephen Rothwell <[email protected]>I still see the same problem in next-20210203, and your patch below fixes it for me.
Did you drop it from the latest build?
Quoted 8 lines
Quoted 4 lines
After the most recent build errors, I tried to apply Pavel's patch
https://lore.kernel.org/linux-mm/CA+CK2bBjC8=cRsL5VhWkcevPsqSXWhsANVjsFNMERLT8vWtiQw@mail.gmail.com/
but patch said that it was already applied (by Andrew I think), so I bailed out (gave up).As far as I can tell, there are two different bugs that got mixed up, and we need both Pavel's patch (which is now in -next) and Stephen's (which got dropped again).
Thanks. Having both patches makes my builds happy again. :)
Signature · 1 line
~Randy
Hi all,
Quoted 99 lines · On Tue, 2 Feb 2021 20:03:24 +1100 Stephen Rothwell <[email protected]> wrote:
After merging the akpm-current tree, today's linux-next build (
x86_64allnoconfig) failed like this:In file included from
arch/x86/include/asm/page.h:76,from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:56, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9: include/linux/mm.h: In function 'is_pinnable_page': include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration] 64 | int __sec = page_to_section(__pg); \ | ^~~~~~~~~~~~~~~ include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn' 81 | #define page_to_pfn __page_to_pfn | ^~~~~~~~~~~~~ include/linux/mm.h:1134:15: note: in expansion of macro 'page_to_pfn' 1134 | is_zero_pfn(page_to_pfn(page)); | ^~~~~~~~~~~ In file included from include/linux/kallsyms.h:12, from include/linux/bpf.h:21, from include/linux/bpf-cgroup.h:5, from include/linux/cgroup-defs.h:22, from include/linux/cgroup.h:28, from include/linux/memcontrol.h:13, from include/linux/swap.h:9, from include/linux/suspend.h:5, from arch/x86/kernel/asm-offsets.c:13: include/linux/mm.h: At top level: include/linux/mm.h:1505:29: error: conflicting types for 'page_to_section' 1505 | static inline unsigned long page_to_section(const struct page *page) | ^~~~~~~~~~~~~~~ In file included from arch/x86/include/asm/page.h:76, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:56, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/mmzone.h:8, from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9: include/asm-generic/memory_model.h:64:14: note: previous implicit declaration of 'page_to_section' was here 64 | int __sec = page_to_section(__pg); \ | ^~~~~~~~~~~~~~~ include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn' 81 | #define page_to_pfn __page_to_pfn | ^~~~~~~~~~~~~ include/linux/mm.h:1134:15: note: in expansion of macro 'page_to_pfn' 1134 | is_zero_pfn(page_to_pfn(page)); | ^~~~~~~~~~~This build has
CONFIG_SPARSEMEMset andCONFIG_SPARSEMEM_VMEMMAPnot set.Caused by commit
983cb10d3f90("mm/gup: do not migrate zero page")I have applied the following patch for today:
From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 19:49:00 +1100
Subject: [PATCH] makeis_pinnable_pagea macroAs it is currently defined before
page_to_section()which it needs.Signed-off-by Stephen Rothwell <[email protected]>--- include/linux/mm.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)include/linux/mm.h +3
-5@@ -1128,11 +1128,9 @@ static inline bool is_zone_movable_page(const struct page *page) }/* MIGRATE_CMA and ZONE_MOVABLE do not allow pin pages */ -static inline bool is_pinnable_page (struct page *page) -{ -return !(is_zone_movable_page (page) ||is_migrate_cma_page (page)) || -is_zero_pfn (page_to_pfn (page)); -} +#define is_pinnable_page (page) \ + (!(is_zone_movable_page(page) || is_migrate_cma_page(page)) || \ + is_zero_pfn(page_to_pfn(page)))#ifdef CONFIG_DEV_PAGEMAP_OPS void free_devmap_managed_page (struct page *page);Signature · 1 line
2.29.2
OK, so today I will add the following to linux-next as it is still needed.
From: Stephen Rothwell <[email protected]>
Date: Thu, 4 Feb 2021 12:05:57 +1100
Subject: [PATCH] make is_pinnable_page a macro
As it is currently defined before page_to_section() which it needs.
--- include/linux/mm.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
include/linux/mm.h +4 -9
@@ -1123,16 +1123,11 @@ static inline bool is_zone_movable_page(const struct page *page)#ifdef CONFIG_MIGRATION /* MIGRATE_CMA and ZONE_MOVABLE do not allow pin pages */ -static inline bool is_pinnable_page (struct page *page) -{ -return !(is_zone_movable_page (page) ||is_migrate_cma_page (page)) || -is_zero_pfn (page_to_pfn (page)); -} +#define is_pinnable_page (page) \ + (!(is_zone_movable_page(page) || is_migrate_cma_page(page)) || \ + is_zero_pfn(page_to_pfn(page)))#else -static inline bool is_pinnable_page (struct page *page) -{ -return true; -} +#define is_pinnable_page (page) true#endif #ifdef CONFIG_DEV_PAGEMAP_OPS
Signature · 5 lines
2.30.0 -- Cheers, Stephen Rothwell