linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported()
@ 2019-06-26 13:21 Anshuman Khandual
  2019-06-27  0:06 ` Stephen Rothwell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anshuman Khandual @ 2019-06-26 13:21 UTC (permalink / raw)
  To: linux-mm
  Cc: Anshuman Khandual, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Aneesh Kumar K.V, Nicholas Piggin,
	Andrew Morton, Stephen Rothwell, linuxppc-dev, linux-kernel,
	linux-next

Recent core ioremap changes require HAVE_ARCH_HUGE_VMAP subscribing archs
provide arch_ioremap_p4d_supported() failing which will result in a build
failure like the following.

ld: lib/ioremap.o: in function `.ioremap_huge_init':
ioremap.c:(.init.text+0x3c): undefined reference to
`.arch_ioremap_p4d_supported'

This defines a stub implementation for arch_ioremap_p4d_supported() keeping
it disabled for now to fix the build problem.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-next@vger.kernel.org

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
This has been just build tested and fixes the problem reported earlier.

 arch/powerpc/mm/book3s64/radix_pgtable.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 8904aa1..c81da88 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -1124,6 +1124,11 @@ void radix__ptep_modify_prot_commit(struct vm_area_struct *vma,
 	set_pte_at(mm, addr, ptep, pte);
 }
 
+int __init arch_ioremap_p4d_supported(void)
+{
+	return 0;
+}
+
 int __init arch_ioremap_pud_supported(void)
 {
 	/* HPT does not cope with large pages in the vmalloc area */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported()
  2019-06-26 13:21 [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported() Anshuman Khandual
@ 2019-06-27  0:06 ` Stephen Rothwell
  2019-06-27  4:38 ` Christophe Leroy
  2019-06-27  4:48 ` Michael Ellerman
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-06-27  0:06 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: linux-mm, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Aneesh Kumar K.V, Nicholas Piggin,
	Andrew Morton, linuxppc-dev, linux-kernel, linux-next

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

Hi Anshuman,

On Wed, 26 Jun 2019 18:51:00 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
>
> Recent core ioremap changes require HAVE_ARCH_HUGE_VMAP subscribing archs
> provide arch_ioremap_p4d_supported() failing which will result in a build
> failure like the following.
> 
> ld: lib/ioremap.o: in function `.ioremap_huge_init':
> ioremap.c:(.init.text+0x3c): undefined reference to
> `.arch_ioremap_p4d_supported'
> 
> This defines a stub implementation for arch_ioremap_p4d_supported() keeping
> it disabled for now to fix the build problem.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-next@vger.kernel.org
> 
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> This has been just build tested and fixes the problem reported earlier.
> 
>  arch/powerpc/mm/book3s64/radix_pgtable.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
> index 8904aa1..c81da88 100644
> --- a/arch/powerpc/mm/book3s64/radix_pgtable.c
> +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
> @@ -1124,6 +1124,11 @@ void radix__ptep_modify_prot_commit(struct vm_area_struct *vma,
>  	set_pte_at(mm, addr, ptep, pte);
>  }
>  
> +int __init arch_ioremap_p4d_supported(void)
> +{
> +	return 0;
> +}
> +
>  int __init arch_ioremap_pud_supported(void)
>  {
>  	/* HPT does not cope with large pages in the vmalloc area */
> -- 
> 2.7.4
> 

I will add that as a merge resolution patch for the akpm-current tree
merge today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported()
  2019-06-26 13:21 [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported() Anshuman Khandual
  2019-06-27  0:06 ` Stephen Rothwell
@ 2019-06-27  4:38 ` Christophe Leroy
  2019-06-27  4:48 ` Michael Ellerman
  2 siblings, 0 replies; 6+ messages in thread
From: Christophe Leroy @ 2019-06-27  4:38 UTC (permalink / raw)
  To: Anshuman Khandual, linux-mm
  Cc: Stephen Rothwell, linux-kernel, Nicholas Piggin, linux-next,
	Paul Mackerras, Aneesh Kumar K.V, Andrew Morton, linuxppc-dev



On 06/26/2019 01:21 PM, Anshuman Khandual wrote:
> Recent core ioremap changes require HAVE_ARCH_HUGE_VMAP subscribing archs
> provide arch_ioremap_p4d_supported() failing which will result in a build
> failure like the following.
> 
> ld: lib/ioremap.o: in function `.ioremap_huge_init':
> ioremap.c:(.init.text+0x3c): undefined reference to
> `.arch_ioremap_p4d_supported'
> 
> This defines a stub implementation for arch_ioremap_p4d_supported() keeping
> it disabled for now to fix the build problem.
> 
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-next@vger.kernel.org
> 
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

Add a Fixes: tag ? For instance:

Fixes: d909f9109c30 ("powerpc/64s/radix: Enable HAVE_ARCH_HUGE_VMAP")

Christophe

> ---
> This has been just build tested and fixes the problem reported earlier.
> 
>   arch/powerpc/mm/book3s64/radix_pgtable.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
> index 8904aa1..c81da88 100644
> --- a/arch/powerpc/mm/book3s64/radix_pgtable.c
> +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
> @@ -1124,6 +1124,11 @@ void radix__ptep_modify_prot_commit(struct vm_area_struct *vma,
>   	set_pte_at(mm, addr, ptep, pte);
>   }
>   
> +int __init arch_ioremap_p4d_supported(void)
> +{
> +	return 0;
> +}
> +
>   int __init arch_ioremap_pud_supported(void)
>   {
>   	/* HPT does not cope with large pages in the vmalloc area */
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported()
  2019-06-26 13:21 [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported() Anshuman Khandual
  2019-06-27  0:06 ` Stephen Rothwell
  2019-06-27  4:38 ` Christophe Leroy
@ 2019-06-27  4:48 ` Michael Ellerman
  2019-06-28  3:44   ` Anshuman Khandual
  2 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2019-06-27  4:48 UTC (permalink / raw)
  To: Anshuman Khandual, linux-mm
  Cc: Anshuman Khandual, Benjamin Herrenschmidt, Paul Mackerras,
	Aneesh Kumar K.V, Nicholas Piggin, Andrew Morton,
	Stephen Rothwell, linuxppc-dev, linux-kernel, linux-next

Anshuman Khandual <anshuman.khandual@arm.com> writes:
> Recent core ioremap changes require HAVE_ARCH_HUGE_VMAP subscribing archs
> provide arch_ioremap_p4d_supported() failing which will result in a build
> failure like the following.
>
> ld: lib/ioremap.o: in function `.ioremap_huge_init':
> ioremap.c:(.init.text+0x3c): undefined reference to
> `.arch_ioremap_p4d_supported'
>
> This defines a stub implementation for arch_ioremap_p4d_supported() keeping
> it disabled for now to fix the build problem.

The easiest option is for this to be folded into your patch that creates
the requirement for arch_ioremap_p4d_supported().

Andrew might do that for you, or you could send a v2.

This looks fine from a powerpc POV:

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers

> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-next@vger.kernel.org
>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> This has been just build tested and fixes the problem reported earlier.
>
>  arch/powerpc/mm/book3s64/radix_pgtable.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
> index 8904aa1..c81da88 100644
> --- a/arch/powerpc/mm/book3s64/radix_pgtable.c
> +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
> @@ -1124,6 +1124,11 @@ void radix__ptep_modify_prot_commit(struct vm_area_struct *vma,
>  	set_pte_at(mm, addr, ptep, pte);
>  }
>  
> +int __init arch_ioremap_p4d_supported(void)
> +{
> +	return 0;
> +}
> +
>  int __init arch_ioremap_pud_supported(void)
>  {
>  	/* HPT does not cope with large pages in the vmalloc area */
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported()
  2019-06-27  4:48 ` Michael Ellerman
@ 2019-06-28  3:44   ` Anshuman Khandual
  2019-06-28  4:10     ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Anshuman Khandual @ 2019-06-28  3:44 UTC (permalink / raw)
  To: Michael Ellerman, linux-mm
  Cc: Benjamin Herrenschmidt, Paul Mackerras, Aneesh Kumar K.V,
	Nicholas Piggin, Andrew Morton, Stephen Rothwell, linuxppc-dev,
	linux-kernel, linux-next



On 06/27/2019 10:18 AM, Michael Ellerman wrote:
> Anshuman Khandual <anshuman.khandual@arm.com> writes:
>> Recent core ioremap changes require HAVE_ARCH_HUGE_VMAP subscribing archs
>> provide arch_ioremap_p4d_supported() failing which will result in a build
>> failure like the following.
>>
>> ld: lib/ioremap.o: in function `.ioremap_huge_init':
>> ioremap.c:(.init.text+0x3c): undefined reference to
>> `.arch_ioremap_p4d_supported'
>>
>> This defines a stub implementation for arch_ioremap_p4d_supported() keeping
>> it disabled for now to fix the build problem.
> 
> The easiest option is for this to be folded into your patch that creates
> the requirement for arch_ioremap_p4d_supported().
> 
> Andrew might do that for you, or you could send a v2.
> 
> This looks fine from a powerpc POV:
> 
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
> 
> cheers

Hello Stephen/Michael/Andrew,

On linux-next (next-20190627) this change has already been applied though a
merge commit 153083a99fe431 ("Merge branch 'akpm-current/current'"). So we
are good on this ? Or shall I send out a V2 for the original patch. Please
suggest. Thank you.

- Anshuman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported()
  2019-06-28  3:44   ` Anshuman Khandual
@ 2019-06-28  4:10     ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-06-28  4:10 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Michael Ellerman, linux-mm, Benjamin Herrenschmidt,
	Paul Mackerras, Aneesh Kumar K.V, Nicholas Piggin, Andrew Morton,
	linuxppc-dev, linux-kernel, linux-next

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

Hi Anshuman,

On Fri, 28 Jun 2019 09:14:46 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
>
> On linux-next (next-20190627) this change has already been applied though a
> merge commit 153083a99fe431 ("Merge branch 'akpm-current/current'"). So we
> are good on this ? Or shall I send out a V2 for the original patch. Please
> suggest. Thank you.

Please send Andrew a v2.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-28  4:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 13:21 [PATCH] powerpc/64s/radix: Define arch_ioremap_p4d_supported() Anshuman Khandual
2019-06-27  0:06 ` Stephen Rothwell
2019-06-27  4:38 ` Christophe Leroy
2019-06-27  4:48 ` Michael Ellerman
2019-06-28  3:44   ` Anshuman Khandual
2019-06-28  4:10     ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).