diff mbox series

[RFC,v4,2/8] RISC-V: Rename relocate() and make it global

Message ID 20210517130823.796963-3-anup.patel@wdc.com (mailing list archive)
State Superseded, archived
Headers show
Series RISC-V CPU Idle Support | expand

Commit Message

Anup Patel May 17, 2021, 1:08 p.m. UTC
The low-level relocate() function enables mmu and relocates
execution to link-time addresses. We rename relocate() function
to relocate_enable_mmu() function which is more informative.

Also, the relocate_enable_mmu() function will be used in the
resume path when a CPU wakes-up from a non-retentive suspend
so we make it global symbol.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
 arch/riscv/kernel/head.S | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series


diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index 89cc58ab52b4..a44c0bc9c2f3 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -79,7 +79,8 @@  pe_head_start:
 .align 2
 #ifdef CONFIG_MMU
+	.global relocate_enable_mmu
 	/* Relocate return address */
 	la a1, kernel_virt_addr
@@ -174,7 +175,7 @@  secondary_start_common:
 	/* Enable virtual memory and relocate to virtual address */
 	la a0, swapper_pg_dir
-	call relocate
+	call relocate_enable_mmu
 	call setup_trap_vector
 	tail smp_callin
@@ -311,7 +312,7 @@  clear_bss_done:
 #ifdef CONFIG_MMU
 	la a0, early_pg_dir
-	call relocate
+	call relocate_enable_mmu
 #endif /* CONFIG_MMU */
 	call setup_trap_vector