Skip to content

Commit e1de2c9

Browse files
avpatelpalmer-dabbelt
authored andcommitted
RISC-V: Rename relocate() and make it global
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> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Guo Ren <guoren@kernel.org> Reviewed-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent f6e64b6 commit e1de2c9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

arch/riscv/kernel/head.S

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ pe_head_start:
9090

9191
.align 2
9292
#ifdef CONFIG_MMU
93-
relocate:
93+
.global relocate_enable_mmu
94+
relocate_enable_mmu:
9495
/* Relocate return address */
9596
la a1, kernel_map
9697
XIP_FIXUP_OFFSET a1
@@ -185,7 +186,7 @@ secondary_start_sbi:
185186
/* Enable virtual memory and relocate to virtual address */
186187
la a0, swapper_pg_dir
187188
XIP_FIXUP_OFFSET a0
188-
call relocate
189+
call relocate_enable_mmu
189190
#endif
190191
call setup_trap_vector
191192
tail smp_callin
@@ -329,7 +330,7 @@ clear_bss_done:
329330
#ifdef CONFIG_MMU
330331
la a0, early_pg_dir
331332
XIP_FIXUP_OFFSET a0
332-
call relocate
333+
call relocate_enable_mmu
333334
#endif /* CONFIG_MMU */
334335

335336
call setup_trap_vector

0 commit comments

Comments
 (0)