]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: Use __cpu_up_stack/task_pointer only for spinwait method
authorAtish Patra <atishp@rivosinc.com>
Thu, 20 Jan 2022 09:09:15 +0000 (01:09 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 20 Jan 2022 17:27:08 +0000 (09:27 -0800)
commitdff9cb45c8b7a7ca5ad26822c86ec800b4773cd7
treeda587266b5f6184ea6d71dad6b86588e5a904259
parent3d44a4b0a7130f4c832a1f0dedc0f0227aa2145e
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>
arch/riscv/include/asm/cpu_ops.h
arch/riscv/kernel/cpu_ops.c
arch/riscv/kernel/cpu_ops_spinwait.c
arch/riscv/kernel/head.S
arch/riscv/kernel/head.h