linux-next: build failure after merge of the mm-hotfixes tree
Subsystems (3)
Hi all,
After merging the mm-hotfixes tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:
mm/gup.c: In function 'gup_hugepte':mm/gup.c:474:25: error: implicit declaration of function 'try_grab_folio_fast'; did you mean 'try_grab_folio'? [-Werror=implicit-function-declaration]
474 | folio = try_grab_folio_fast(page, refs, flags);
| ^~~~~~~~~~~~~~~~~~~
| try_grab_foliomm/gup.c:474:23: warning: assignment to 'struct folio *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
474 | folio = try_grab_folio_fast(page, refs, flags);
| ^mm/gup.c: At top level:mm/gup.c:2747:22: error: conflicting types for 'try_grab_folio_fast'; have 'struct folio *(struct page *, int, unsigned int)'
2747 | static struct folio *try_grab_folio_fast(struct page *page, int refs,
| ^~~~~~~~~~~~~~~~~~~
mm/gup.c:474:25: note: previous implicit declaration of 'try_grab_folio_fast' with type 'int()'
474 | folio = try_grab_folio_fast(page, refs, flags);
| ^~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
Caused by commit
5f408bfe0d13 ("mm: gup: stop abusing try_grab_folio")
I have reverted that commit for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 19 lines · On Mon, 1 Jul 2024 10:16:41 +1000 Stephen Rothwell <[email protected]> wrote:
After merging the mm-hotfixes tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
mm/gup.c: In function 'gup_hugepte':mm/gup.c:474:25: error: implicit declaration of function 'try_grab_folio_fast'; did you mean 'try_grab_folio'? [-Werror=implicit-function-declaration]474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~ | try_grab_folio
mm/gup.c:474:23: warning: assignment to 'struct folio *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
474 | folio =try_grab_folio_fast(page, refs, flags);
| ^mm/gup.c: At top level:mm/gup.c:2747:22: error: conflicting types for 'try_grab_folio_fast'; have 'struct folio *(struct page *, int, unsigned int)'
2747 | static struct folio *try_grab_folio_fast(struct page *page, int refs,| ^~~~~~~~~~~~~~~~~~~ mm/gup.c:474:25: note: previous implicit declaration of 'try_grab_folio_fast' with type 'int()' 474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~
Quoted 7 lines
cc1: some warnings being treated as errors
Caused by commit
5f408bfe0d13("mm: gup: stop abusingtry_grab_folio")I have reverted that commit for today.
And I also had to revert commit
52cca85b0ebf ("mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix")
from the mm-unstable branch of the mm tree.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 25 lines · Stephen Rothwell
Hi all,
Quoted 22 lines · On Mon, 1 Jul 2024 10:16:41 +1000 Stephen Rothwell <[email protected]> wrote:
After merging the mm-hotfixes tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
mm/gup.c: In function 'gup_hugepte':mm/gup.c:474:25: error: implicit declaration of function 'try_grab_folio_fast'; did you mean 'try_grab_folio'? [-Werror=implicit-function-declaration]474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~ | try_grab_folio
mm/gup.c:474:23: warning: assignment to 'struct folio *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
474 | folio =try_grab_folio_fast(page, refs, flags);
| ^mm/gup.c: At top level:mm/gup.c:2747:22: error: conflicting types for 'try_grab_folio_fast'; have 'struct folio *(struct page *, int, unsigned int)'
2747 | static struct folio *try_grab_folio_fast(struct page *page, int refs,| ^~~~~~~~~~~~~~~~~~~ mm/gup.c:474:25: note: previous implicit declaration of 'try_grab_folio_fast' with type 'int()' 474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
Caused by commit
Quoted 8 lines
Quoted 3 lines
5f408bfe0d13 ("mm: gup: stop abusing try_grab_folio")I have reverted that commit for today.
And I also had to revert commit
52cca85b0ebf("mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix")from the mm-unstable branch of the mm tree.
The patch attached in this mail should fix the compile error.
https://lore.kernel.org/linux-mm/CAHbLzkowMSso-4Nufc9hcMehQsK9PNz3OSu-+eniU-2Mm-xjhA@mail.gmail.com/
Quoted 1 line
Hi Andrew,
Quoted 31 lines · On Mon, 1 Jul 2024 11:15:17 -0700 Yang Shi <[email protected]> wrote:
Quoted 29 lines · Stephen Rothwell
Quoted 18 lines · On Mon, 1 Jul 2024 10:16:41 +1000 Stephen Rothwell <[email protected]> wrote:
After merging the mm-hotfixes tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
mm/gup.c: In function 'gup_hugepte':mm/gup.c:474:25: error: implicit declaration of function 'try_grab_folio_fast'; did you mean 'try_grab_folio'? [-Werror=implicit-function-declaration]474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~ | try_grab_folio
mm/gup.c:474:23: warning: assignment to 'struct folio *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
474 | folio =try_grab_folio_fast(page, refs, flags);
| ^mm/gup.c: At top level:mm/gup.c:2747:22: error: conflicting types for 'try_grab_folio_fast'; have 'struct folio *(struct page *, int, unsigned int)'
2747 | static struct folio *try_grab_folio_fast(struct page *page, int refs,| ^~~~~~~~~~~~~~~~~~~ mm/gup.c:474:25: note: previous implicit declaration of 'try_grab_folio_fast' with type 'int()' 474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~Quoted 7 lines
cc1: some warnings being treated as errors
Caused by commit
5f408bfe0d13 ("mm: gup: stop abusing try_grab_folio")I have reverted that commit for today.
And I also had to revert commit
Quoted 7 lines
Quoted 3 lines
52cca85b0ebf("mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix")from the mm-unstable branch of the mm tree.
The patch attached in this mail should fix the compile error.
https://lore.kernel.org/linux-mm/CAHbLzkowMSso-4Nufc9hcMehQsK9PNz3OSu-+eniU-2Mm-xjhA@mail.gmail.com/
It looks like that patch has been applied to the mm tree instead of the mm-hotfixes tree - as a fix for commit
50ceb37037f3 ("mm: gup: stop abusing try_grab_folio")
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Andrew,
Quoted 37 lines · On Wed, 3 Jul 2024 08:44:40 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 35 lines · On Mon, 1 Jul 2024 11:15:17 -0700 Yang Shi <[email protected]> wrote:
Quoted 32 lines · Stephen Rothwell
Quoted 18 lines · On Mon, 1 Jul 2024 10:16:41 +1000 Stephen Rothwell <[email protected]> wrote:
After merging the mm-hotfixes tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
mm/gup.c: In function 'gup_hugepte':mm/gup.c:474:25: error: implicit declaration of function 'try_grab_folio_fast'; did you mean 'try_grab_folio'? [-Werror=implicit-function-declaration]474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~ | try_grab_folio
mm/gup.c:474:23: warning: assignment to 'struct folio *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
474 | folio =try_grab_folio_fast(page, refs, flags);
| ^mm/gup.c: At top level:mm/gup.c:2747:22: error: conflicting types for 'try_grab_folio_fast'; have 'struct folio *(struct page *, int, unsigned int)'
2747 | static struct folio *try_grab_folio_fast(struct page *page, int refs,| ^~~~~~~~~~~~~~~~~~~ mm/gup.c:474:25: note: previous implicit declaration of 'try_grab_folio_fast' with type 'int()' 474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~Quoted 7 lines
cc1: some warnings being treated as errors
Caused by commit
5f408bfe0d13 ("mm: gup: stop abusing try_grab_folio")I have reverted that commit for today.
And I also had to revert commit
52cca85b0ebf("mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix")from the mm-unstable branch of the mm tree.
Quoted 8 lines
Quoted 3 lines
The patch attached in this mail should fix the compile error.
https://lore.kernel.org/linux-mm/CAHbLzkowMSso-4Nufc9hcMehQsK9PNz3OSu-+eniU-2Mm-xjhA@mail.gmail.com/
It looks like that patch has been applied to the mm tree instead of the mm-hotfixes tree - as a fix for commit
50ceb37037f3("mm: gup: stop abusingtry_grab_folio")
So for today, I have applied the following patch to the mm-hotfixes tree merge and stopped reverting mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix.
From: Stephen Rothwell <[email protected]>
Date: Wed, 3 Jul 2024 08:52:20 +1000
Subject: [PATCH] fixup for "mm: gup: stop abusing try_grab_folio"
--- mm/gup.c | 3 +++ 1 file changed, 3 insertions(+)
mm/gup.c +3 -0
@@ -437,6 +437,9 @@ static unsigned long hugepte_addr_end(unsigned long addr, unsigned long end,return (__boundary -1 < end -1 ) ? __boundary : end; } +static struct folio *try_grab_folio_fast (struct page *page,int refs, +unsigned int flags); +/* * Returns 1 if succeeded, 0 if failed, -EMLINK if unshare needed. *
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Quoted 38 lines · Stephen Rothwell
Hi Andrew,
Quoted 35 lines · On Wed, 3 Jul 2024 08:44:40 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 34 lines · On Mon, 1 Jul 2024 11:15:17 -0700 Yang Shi <[email protected]> wrote:
Quoted 23 lines · Stephen Rothwell
Quoted 22 lines · On Mon, 1 Jul 2024 10:16:41 +1000 Stephen Rothwell <[email protected]> wrote:
After merging the mm-hotfixes tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
mm/gup.c: In function 'gup_hugepte':mm/gup.c:474:25: error: implicit declaration of function 'try_grab_folio_fast'; did you mean 'try_grab_folio'? [-Werror=implicit-function-declaration]474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~ | try_grab_folio mm/gup.c:474:23: warning: assignment to 'struct folio *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 474 | folio = try_grab_folio_fast(page, refs, flags); | ^ mm/gup.c: At top level: mm/gup.c:2747:22: error: conflicting types for 'try_grab_folio_fast'; have 'struct folio *(struct page *, int, unsigned int)' 2747 | static struct folio *try_grab_folio_fast(struct page *page, int refs, | ^~~~~~~~~~~~~~~~~~~ mm/gup.c:474:25: note: previous implicit declaration of 'try_grab_folio_fast' with type 'int()' 474 | folio = try_grab_folio_fast(page, refs, flags); | ^~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
Caused by commit
Quoted 8 lines
Quoted 3 lines
5f408bfe0d13 ("mm: gup: stop abusing try_grab_folio")I have reverted that commit for today.
And I also had to revert commit
52cca85b0ebf("mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix")from the mm-unstable branch of the mm tree.
The patch attached in this mail should fix the compile error.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
https://lore.kernel.org/linux-mm/CAHbLzkowMSso-4Nufc9hcMehQsK9PNz3OSu-+eniU-2Mm-xjhA@mail.gmail.com/
It looks like that patch has been applied to the mm tree instead of the mm-hotfixes tree - as a fix for commit
50ceb37037f3 ("mm: gup: stop abusing try_grab_folio")So for today, I have applied the following patch to the mm-hotfixes tree merge and stopped reverting mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix.
Thanks, Stephen. I think Andrew may misread what my patch fixed. I emailed him offline. Once he fixed it you should not need this workaround anymore.
Quoted 24 lines
From: Stephen Rothwell <[email protected]>
Date: Wed, 3 Jul 2024 08:52:20 +1000
Subject: [PATCH] fixup for "mm: gup: stop abusingtry_grab_folio"Signed-off-by Stephen Rothwell <[email protected]>--- mm/gup.c | 3 +++ 1 file changed, 3 insertions(+)mm/gup.c +3
-0@@ -437,6 +437,9 @@ static unsigned long hugepte_addr_end(unsigned long addr, unsigned long end,return (__boundary -1 < end -1 ) ? __boundary : end; } +static struct folio *try_grab_folio_fast (struct page *page,int refs, +unsigned int flags); +/* * Returns 1 if succeeded, 0 if failed, -EMLINK if unshare needed. *