diff mbox series

[2/2] riscv: Fix undefined reference to vmemmap_populate_basepages

Message ID 20191023032302.160388-2-wangkefeng.wang@huawei.com (mailing list archive)
State New, archived
Headers show
Series [1/2] riscv: Fix implicit declaration of 'page_to_section' | expand

Commit Message

Kefeng Wang Oct. 23, 2019, 3:23 a.m. UTC
Using CONFIG_SPARSEMEM_VMEMMAP instead of CONFIG_SPARSEMEM to fix
following build issue.

  riscv64-linux-ld: arch/riscv/mm/init.o: in function 'vmemmap_populate':
  init.c:(.meminit.text+0x8): undefined reference to 'vmemmap_populate_basepages'

Cc: Logan Gunthorpe <logang@deltatee.com>
Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/riscv/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Logan Gunthorpe Oct. 23, 2019, 3:58 p.m. UTC | #1
On 2019-10-22 9:23 p.m., Kefeng Wang wrote:
> Using CONFIG_SPARSEMEM_VMEMMAP instead of CONFIG_SPARSEMEM to fix
> following build issue.
> 
>   riscv64-linux-ld: arch/riscv/mm/init.o: in function 'vmemmap_populate':
>   init.c:(.meminit.text+0x8): undefined reference to 'vmemmap_populate_basepages'
> 
> Cc: Logan Gunthorpe <logang@deltatee.com>
> Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem")
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Yup!

Reviewed-by: Logan Gunthorpe <logang@deltatee.com>

> ---
>  arch/riscv/mm/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index 83f7d12042fb..a1ca6200c31f 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -458,7 +458,7 @@ void __init paging_init(void)
>  	zone_sizes_init();
>  }
>  
> -#ifdef CONFIG_SPARSEMEM
> +#ifdef CONFIG_SPARSEMEM_VMEMMAP
>  int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
>  			       struct vmem_altmap *altmap)
>  {
>
Paul Walmsley Oct. 23, 2019, 6:26 p.m. UTC | #2
On Wed, 23 Oct 2019, Logan Gunthorpe wrote:

> On 2019-10-22 9:23 p.m., Kefeng Wang wrote:
> > Using CONFIG_SPARSEMEM_VMEMMAP instead of CONFIG_SPARSEMEM to fix
> > following build issue.
> > 
> >   riscv64-linux-ld: arch/riscv/mm/init.o: in function 'vmemmap_populate':
> >   init.c:(.meminit.text+0x8): undefined reference to 'vmemmap_populate_basepages'
> > 
> > Cc: Logan Gunthorpe <logang@deltatee.com>
> > Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem")
> > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> 
> Yup!
> 
> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>

Thanks, queued for v5.4-rc.


- Paul
diff mbox series

Patch

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 83f7d12042fb..a1ca6200c31f 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -458,7 +458,7 @@  void __init paging_init(void)
 	zone_sizes_init();
 }
 
-#ifdef CONFIG_SPARSEMEM
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
 int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
 			       struct vmem_altmap *altmap)
 {