diff options
| author | Serge Semin <fancer.lancer@gmail.com> | 2025-10-23 18:01:20 +0300 |
|---|---|---|
| committer | Serge Semin <fancer.lancer@gmail.com> | 2026-08-06 01:49:05 +0300 |
| commit | 6e2faed87587e079b407e6e330c1aea107c35e11 (patch) | |
| tree | 6dd8bdc5e0b40a4294edc016ecebf3386d06c014 | |
| parent | 028ef9c96e96197026887c0f092424679298aae8 (diff) | |
| download | linux-6e2faed87587e079b407e6e330c1aea107c35e11.tar.gz linux-6e2faed87587e079b407e6e330c1aea107c35e11.zip | |
mips: CPS: Fix secondary CPU failed to boot on EVA
EVA-based memory mapping can be any but normally the segments have the
KSEG0 extended downwards (like on Malta and Baikal-T1). In these cases it
will be fatal to jump over the absolute address, i.e. to use l*r
instructions, before the EVA mapping is deployed since kernel may reside
at a range not suitably remapped yet. So let's move the eva_init code
execution to be done before jumping to the actual kernel address. The same
order can be found on the core 0 initial boot up assembler code.
Fixes: 6521d9a436a6 ("MIPS: CPS: Initialize EVA before bringing up VPEs from secondary cores")
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
| -rw-r--r-- | arch/mips/kernel/cps-vec.S | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S index 2ae7034a3d5c..ac8f7c91b0fd 100644 --- a/arch/mips/kernel/cps-vec.S +++ b/arch/mips/kernel/cps-vec.S @@ -117,19 +117,19 @@ LEAF(mips_cps_core_boot) mtc0 t0, CP0_CONFIG ehb - /* Jump to kseg0 */ - PTR_LA t0, 1f - jr t0 - nop - /* * We're up, cached & coherent. Perform any EVA initialization necessary * before we access memory. */ -1: eva_init + eva_init + + /* Jump to the actual kernel address kseg0/xkseg (legacy/EVA) */ + PTR_LA t0, 1f + jr t0 + nop /* Retrieve boot configuration pointers */ - jal mips_cps_get_bootcfg +1: jal mips_cps_get_bootcfg nop /* Skip core-level init if we started up coherent */ |
