linux-next: build failure after merge of the akpm tree
Hi all,
After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:
mm/memory.c: In function 'insert_pages':mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given
remaining_pages_total, PTRS_PER_PTE - pte_index(addr));
^Caused by commit
366142f0b000 ("mm/memory.c: add vm_insert_pages()")
This is the first use of pte_index() outside arch specific code and the sparc64 version of pte_index() nas an extra argument.
I have reverted these commits for today:
219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix") cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy") 72c684430b94 ("add missing page_count() check to vm_insert_pages().") dbd9553775f3 ("mm-add-vm_insert_pages-fix")
366142f0b000 ("mm/memory.c: add vm_insert_pages()")
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 11 lines · Stephen Rothwell
Hi all,
After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:
mm/memory.c: In function 'insert_pages':mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 givenremaining_pages_total, PTRS_PER_PTE - pte_index(addr)); ^
Quoted 7 lines
Caused by commit
366142f0b000("mm/memory.c: addvm_insert_pages()")This is the first use of
pte_index()outside arch specific code and the sparc64 version ofpte_index()nas an extra argument.
Looks like this happens for sparc, and also metag. Other platforms just take the addr parameter based on a quick search.
Quoted 8 lines
I have reverted these commits for today:
219ae14a9686("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")cb912fdf96bf("net-zerocopy: usevm_insert_pages()for tcp rcv zerocopy")72c684430b94("add missingpage_count()check tovm_insert_pages().")dbd9553775f3("mm-add-vm_insert_pages-fix")
366142f0b000("mm/memory.c: addvm_insert_pages()")
In terms of fixing this; passing in an appropriate dir parameter is not really a problem, but what is concerning that it seems messy to have a per-platform ifdef to pass it either two arguments or one in this case. But it seems like either that would be one way to fix it, or having some arch method across all arches that takes two arguments (and ignores one of them for most arches).
Is there a general preference for the right way forward, in this case?
Thanks,
-Arjun
Quoted 3 lines
--
Cheers,
Stephen Rothwell
Quoted 15 lines · Arjun Roy
Quoted 13 lines · Stephen Rothwell
Hi all,
After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:
mm/memory.c: In function 'insert_pages':mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 givenremaining_pages_total, PTRS_PER_PTE - pte_index(addr)); ^Caused by commit
Quoted 9 lines
Quoted 5 lines
366142f0b000("mm/memory.c: addvm_insert_pages()")This is the first use of
pte_index()outside arch specific code and the sparc64 version ofpte_index()nas an extra argument.Looks like this happens for sparc, and also metag. Other platforms just take the addr parameter based on a quick search.
And actually I guess there's no metag anyways now.
Looking further, then, it looks like in every non-sparc pte_index() is an actual numerical index, while on sparc it goes a step further to yield a pte_t *.
As far as I can tell, the sparc incarnation of this is only used by the pte_offset_(kernel/map) macros.
So I think a possibly sane way to fix this would be:
1. Define pte_index() to be a numerical index, like the other architectures,
2. Define something like pte_entry() that uses pte_index(), and
3. Have pte_offset_(kernel/map) be defined as pte_entry() instead.
Then pte_index would be operating on just an address for all platforms, and the reverted patchset would work without any changes.
If this sounds acceptable, I can send a patch.
Thanks!
Quoted 24 lines
Quoted 8 lines
I have reverted these commits for today:
219ae14a9686("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")cb912fdf96bf("net-zerocopy: usevm_insert_pages()for tcp rcv zerocopy")72c684430b94("add missingpage_count()check tovm_insert_pages().")dbd9553775f3("mm-add-vm_insert_pages-fix")
366142f0b000("mm/memory.c: addvm_insert_pages()")In terms of fixing this; passing in an appropriate dir parameter is not really a problem, but what is concerning that it seems messy to have a per-platform ifdef to pass it either two arguments or one in this case. But it seems like either that would be one way to fix it, or having some arch method across all arches that takes two arguments (and ignores one of them for most arches).
Is there a general preference for the right way forward, in this case?
Thanks,
-ArjunQuoted 3 lines
--
Cheers,
Stephen Rothwell
Hi all,
Quoted 35 lines · On Sun, 16 Feb 2020 22:45:35 -0800 Arjun Roy <[email protected]> wrote:
Quoted 13 lines · Arjun Roy
Quoted 11 lines · Stephen Rothwell
After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:
mm/memory.c: In function 'insert_pages':mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 givenremaining_pages_total, PTRS_PER_PTE - pte_index(addr)); ^Caused by commit
Quoted 7 lines
Quoted 4 lines
366142f0b000("mm/memory.c: addvm_insert_pages()")This is the first use of
pte_index()outside arch specific code and the sparc64 version ofpte_index()nas an extra argument.Looks like this happens for sparc, and also metag. Other platforms just take the addr parameter based on a quick search.
And actually I guess there's no metag anyways now.
Looking further, then, it looks like in every non-sparcpte_index()is an actual numerical index, while on sparc it goes a step further to yield apte_t*.
As far as I can tell, the sparc incarnation of this is only used by thepte_offset_(kernel/map)macros.So I think a possibly sane way to fix this would be:
1. Definepte_index()to be a numerical index, like the other architectures,
2. Define something likepte_entry()that usespte_index(), and
3. Havepte_offset_(kernel/map)be defined aspte_entry()instead.
Quoted 22 lines
Then
pte_indexwould be operating on just an address for all platforms, and the reverted patchset would work without any changes.If this sounds acceptable, I can send a patch.
Quoted 17 lines
Quoted 8 lines
I have reverted these commits for today:
219ae14a9686("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")cb912fdf96bf("net-zerocopy: usevm_insert_pages()for tcp rcv zerocopy")72c684430b94("add missingpage_count()check tovm_insert_pages().")dbd9553775f3("mm-add-vm_insert_pages-fix")
366142f0b000("mm/memory.c: addvm_insert_pages()")In terms of fixing this; passing in an appropriate dir parameter is not really a problem, but what is concerning that it seems messy to have a per-platform ifdef to pass it either two arguments or one in this case. But it seems like either that would be one way to fix it, or having some arch method across all arches that takes two arguments (and ignores one of them for most arches).
Is there a general preference for the right way forward, in this case?
Has there been any progress with this? I am still reverting the above commits, so they are not getting any linux-next testing ...
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 60 lines · Stephen Rothwell
Hi all,
Quoted 56 lines · On Sun, 16 Feb 2020 22:45:35 -0800 Arjun Roy <[email protected]> wrote:
Quoted 13 lines · Arjun Roy
Quoted 11 lines · Stephen Rothwell
After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:
mm/memory.c: In function 'insert_pages':mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 givenremaining_pages_total, PTRS_PER_PTE - pte_index(addr)); ^Caused by commit
Quoted 7 lines
Quoted 4 lines
366142f0b000("mm/memory.c: addvm_insert_pages()")This is the first use of
pte_index()outside arch specific code and the sparc64 version ofpte_index()nas an extra argument.Looks like this happens for sparc, and also metag. Other platforms just take the addr parameter based on a quick search.
And actually I guess there's no metag anyways now.
Looking further, then, it looks like in every non-sparcpte_index()is an actual numerical index, while on sparc it goes a step further to yield apte_t*.
As far as I can tell, the sparc incarnation of this is only used by thepte_offset_(kernel/map)macros.So I think a possibly sane way to fix this would be:
1. Definepte_index()to be a numerical index, like the other architectures,
2. Define something likepte_entry()that usespte_index(), and
3. Havepte_offset_(kernel/map)be defined aspte_entry()instead.Then
pte_indexwould be operating on just an address for all platforms, and the reverted patchset would work without any changes.If this sounds acceptable, I can send a patch.
Quoted 16 lines
Quoted 8 lines
I have reverted these commits for today:
219ae14a9686("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")cb912fdf96bf("net-zerocopy: usevm_insert_pages()for tcp rcv zerocopy")72c684430b94("add missingpage_count()check tovm_insert_pages().")dbd9553775f3("mm-add-vm_insert_pages-fix")
366142f0b000("mm/memory.c: addvm_insert_pages()")In terms of fixing this; passing in an appropriate dir parameter is not really a problem, but what is concerning that it seems messy to have a per-platform ifdef to pass it either two arguments or one in this case. But it seems like either that would be one way to fix it, or having some arch method across all arches that takes two arguments (and ignores one of them for most arches).
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Is there a general preference for the right way forward, in this case?
Has there been any progress with this? I am still reverting the above commits, so they are not getting any linux-next testing ...
I have a possible solution in mind, but it would involve a slight change in the SPARC macro (to be more inline with the semantics of the other platforms).
If you're open to such a change, I can send it out.
Thanks,
-Arjun
Quoted 3 lines
--
Cheers,
Stephen Rothwell
Hi Arjun,
Quoted 5 lines · On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <[email protected]> wrote:
I have a possible solution in mind, but it would involve a slight change in the SPARC macro (to be more inline with the semantics of the other platforms).
If you're open to such a change, I can send it out.
Its not up to me :-)
If it is not too much work, I would say, do the patch, test it as you can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see what happens.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 10 lines · Stephen Rothwell
Hi Arjun,
Quoted 5 lines · On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <[email protected]> wrote:
I have a possible solution in mind, but it would involve a slight change in the SPARC macro (to be more inline with the semantics of the other platforms).
If you're open to such a change, I can send it out.
Quoted 6 lines
Its not up to me :-)
If it is not too much work, I would say, do the patch, test it as you can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see what happens.
Certainly, I will do so.
Thanks,
-Arjun
Quoted 3 lines
--
Cheers,
Stephen Rothwell
Hi Arjun,
Quoted 10 lines · On Thu, 20 Feb 2020 15:44:28 -0800 Arjun Roy <[email protected]> wrote:
Quoted 8 lines · Stephen Rothwell
Quoted 5 lines · On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <[email protected]> wrote:
I have a possible solution in mind, but it would involve a slight change in the SPARC macro (to be more inline with the semantics of the other platforms).
If you're open to such a change, I can send it out.
Quoted 7 lines
Quoted 5 lines
Its not up to me :-)
If it is not too much work, I would say, do the patch, test it as you can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see what happens.
Certainly, I will do so.
Just one thing: its worth while making it clear to DaveM that you just want his Ack (rather than for him to take the patch into the Sparc tree) so that the patch can go into Andrew's tree along with the rest of the series.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 20 lines · Stephen Rothwell
Hi Arjun,
Quoted 16 lines · On Thu, 20 Feb 2020 15:44:28 -0800 Arjun Roy <[email protected]> wrote:
Quoted 13 lines · Stephen Rothwell
Quoted 5 lines · On Thu, 20 Feb 2020 15:22:04 -0800 Arjun Roy <[email protected]> wrote:
I have a possible solution in mind, but it would involve a slight change in the SPARC macro (to be more inline with the semantics of the other platforms).
If you're open to such a change, I can send it out.Its not up to me :-)
If it is not too much work, I would say, do the patch, test it as you can, then send it out cc'ing the Sparc maintainer (DaveM cc'd) and see what happens.
Quoted 7 lines
Quoted 1 line
Certainly, I will do so.
Just one thing: its worth while making it clear to DaveM that you just want his Ack (rather than for him to take the patch into the Sparc tree) so that the patch can go into Andrew's tree along with the rest of the series.
For now since the earlier patches remain in the mm tree (as far as I can tell here https://github.com/hnaz/linux-mm/tree/master) I have just sent a fixup patch for the sparc compilation issue to mm-next. I also indicated the ack request to DaveM.
Thanks,
-Arjun
Quoted 3 lines
--
Cheers,
Stephen Rothwell
Hi all,
Quoted 16 lines · On Mon, 17 Feb 2020 14:57:11 +1100 Stephen Rothwell <[email protected]>…
After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:
mm/memory.c: In function 'insert_pages':mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 givenremaining_pages_total, PTRS_PER_PTE - pte_index(addr)); ^Caused by commit
366142f0b000("mm/memory.c: addvm_insert_pages()")This is the first use of
pte_index()outside arch specific code and the sparc64 version ofpte_index()nas an extra argument.
Quoted 7 lines
I have reverted these commits for today:
219ae14a9686("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")cb912fdf96bf("net-zerocopy: usevm_insert_pages()for tcp rcv zerocopy")72c684430b94("add missingpage_count()check tovm_insert_pages().")dbd9553775f3("mm-add-vm_insert_pages-fix")
366142f0b000("mm/memory.c: addvm_insert_pages()")
This failure is now in the akpm tree (it was previously in the skpm-current tree) but I am still reverting the same patches (though they are now slightly different).
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 28 lines · Stephen Rothwell
Hi all,
Quoted 16 lines · On Mon, 17 Feb 2020 14:57:11 +1100 Stephen Rothwell <[email protected]>…
After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:
mm/memory.c: In function 'insert_pages':mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 givenremaining_pages_total, PTRS_PER_PTE - pte_index(addr)); ^Caused by commit
366142f0b000("mm/memory.c: addvm_insert_pages()")This is the first use of
pte_index()outside arch specific code and the sparc64 version ofpte_index()nas an extra argument.Quoted 7 lines
I have reverted these commits for today:
219ae14a9686("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix")cb912fdf96bf("net-zerocopy: usevm_insert_pages()for tcp rcv zerocopy")72c684430b94("add missingpage_count()check tovm_insert_pages().")dbd9553775f3("mm-add-vm_insert_pages-fix")
366142f0b000("mm/memory.c: addvm_insert_pages()")
Quoted 4 lines
This failure is now in the akpm tree (it was previously in the skpm-current tree) but I am still reverting the same patches (though they are now slightly different).
Ack, and they will continue to fail till my fixup patch for sparc64 is merged (it's already out for review).
-Arjun
Quoted 3 lines
--
Cheers,
Stephen Rothwell