diff mbox series

riscv: Move setup_bootmem into paging_init

Message ID 20210510114222.42195-1-wangkefeng.wang@huawei.com (mailing list archive)
State New, archived
Headers show
Series riscv: Move setup_bootmem into paging_init | expand

Commit Message

Kefeng Wang May 10, 2021, 11:42 a.m. UTC
Make setup_bootmem() static.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/riscv/include/asm/pgtable.h | 1 -
 arch/riscv/kernel/setup.c        | 1 -
 arch/riscv/mm/init.c             | 3 ++-
 3 files changed, 2 insertions(+), 3 deletions(-)

Comments

Palmer Dabbelt May 23, 2021, 11:07 p.m. UTC | #1
On Mon, 10 May 2021 04:42:22 PDT (-0700), wangkefeng.wang@huawei.com wrote:
> Make setup_bootmem() static.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  arch/riscv/include/asm/pgtable.h | 1 -
>  arch/riscv/kernel/setup.c        | 1 -
>  arch/riscv/mm/init.c             | 3 ++-
>  3 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 9469f464e71a..2017794d0e64 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> @@ -533,7 +533,6 @@ extern uintptr_t _dtb_early_pa;
>  #define dtb_early_pa	_dtb_early_pa
>  #endif /* CONFIG_XIP_KERNEL */
>
> -void setup_bootmem(void);
>  void paging_init(void);
>  void misc_mem_init(void);
>
> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
> index 03901d3a8b02..4db4d0b5911f 100644
> --- a/arch/riscv/kernel/setup.c
> +++ b/arch/riscv/kernel/setup.c
> @@ -276,7 +276,6 @@ void __init setup_arch(char **cmdline_p)
>  	parse_early_param();
>
>  	efi_init();
> -	setup_bootmem();
>  	paging_init();
>  #if IS_ENABLED(CONFIG_BUILTIN_DTB)
>  	unflatten_and_copy_device_tree();
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index 4faf8bd157ea..136d0342b147 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -119,7 +119,7 @@ void __init mem_init(void)
>  	print_vm_layout();
>  }
>
> -void __init setup_bootmem(void)
> +static void __init setup_bootmem(void)
>  {
>  	phys_addr_t vmlinux_end = __pa_symbol(&_end);
>  	phys_addr_t vmlinux_start = __pa_symbol(&_start);
> @@ -866,6 +866,7 @@ RESERVEDMEM_OF_DECLARE(elfcorehdr, "linux,elfcorehdr", elfcore_hdr_setup);
>
>  void __init paging_init(void)
>  {
> +	setup_bootmem();
>  	setup_vm_final();
>  	setup_zero_page();
>  }

Thanks, this is on for-next.
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 9469f464e71a..2017794d0e64 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -533,7 +533,6 @@  extern uintptr_t _dtb_early_pa;
 #define dtb_early_pa	_dtb_early_pa
 #endif /* CONFIG_XIP_KERNEL */
 
-void setup_bootmem(void);
 void paging_init(void);
 void misc_mem_init(void);
 
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 03901d3a8b02..4db4d0b5911f 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -276,7 +276,6 @@  void __init setup_arch(char **cmdline_p)
 	parse_early_param();
 
 	efi_init();
-	setup_bootmem();
 	paging_init();
 #if IS_ENABLED(CONFIG_BUILTIN_DTB)
 	unflatten_and_copy_device_tree();
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 4faf8bd157ea..136d0342b147 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -119,7 +119,7 @@  void __init mem_init(void)
 	print_vm_layout();
 }
 
-void __init setup_bootmem(void)
+static void __init setup_bootmem(void)
 {
 	phys_addr_t vmlinux_end = __pa_symbol(&_end);
 	phys_addr_t vmlinux_start = __pa_symbol(&_start);
@@ -866,6 +866,7 @@  RESERVEDMEM_OF_DECLARE(elfcorehdr, "linux,elfcorehdr", elfcore_hdr_setup);
 
 void __init paging_init(void)
 {
+	setup_bootmem();
 	setup_vm_final();
 	setup_zero_page();
 }