diff options
author | Atish Patra <atishp@rivosinc.com> | 2022-01-20 01:09:15 -0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-01-20 09:27:08 -0800 |
commit | c78f94f35cf6486c4057317e8de3ddc4c62e12c7 (patch) | |
tree | da587266b5f6184ea6d71dad6b86588e5a904259 /arch/riscv/kernel/head.S | |
parent | 410bb20a698d4c95c63e7f2b6f6f7d8da43795f5 (diff) | |
download | linux-stable-c78f94f35cf6486c4057317e8de3ddc4c62e12c7.tar.gz linux-stable-c78f94f35cf6486c4057317e8de3ddc4c62e12c7.tar.bz2 linux-stable-c78f94f35cf6486c4057317e8de3ddc4c62e12c7.zip |
RISC-V: Use __cpu_up_stack/task_pointer only for spinwait method
The __cpu_up_stack/task_pointer array is only used for spinwait method
now. The per cpu array based lookup is also fragile for platforms with
discontiguous/sparse hartids. The spinwait method is only used for
M-mode Linux or older firmwares without SBI HSM extension. For general
Linux systems, ordered booting method is preferred anyways to support
cpu hotplug and kexec.
Make sure that __cpu_up_stack/task_pointer is only used for spinwait
method. Take this opportunity to rename it to
__cpu_spinwait_stack/task_pointer to emphasize the purpose as well.
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/head.S')
-rw-r--r-- | arch/riscv/kernel/head.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 05ea372e1909..efa9cd499ac6 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -347,9 +347,9 @@ clear_bss_done: csrw CSR_TVEC, a3 slli a3, a0, LGREG - la a1, __cpu_up_stack_pointer + la a1, __cpu_spinwait_stack_pointer XIP_FIXUP_OFFSET a1 - la a2, __cpu_up_task_pointer + la a2, __cpu_spinwait_task_pointer XIP_FIXUP_OFFSET a2 add a1, a3, a1 add a2, a3, a2 |