RISC-V: Add cpu_ops and modify default booting method
authorAtish Patra <atish.patra@wdc.com>
Wed, 18 Mar 2020 01:11:40 +0000 (18:11 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 31 Mar 2020 18:25:56 +0000 (11:25 -0700)
commit2875fe0561569f82d0e63658ccf0d11ce7da8922
tree1d6539c565bf2eb03efb776a2032d48eae4763c4
parente011995e826f85fbe55dc7d4ce649461163d1052
RISC-V: Add cpu_ops and modify default booting method

Currently, all non-booting harts start booting after the booting hart
updates the per-hart stack pointer. This is done in a way that, it's
difficult to implement any other booting method without breaking the
backward compatibility.

Define a cpu_ops method that allows to introduce other booting methods
in future. Modify the current booting method to be compatible with
cpu_ops.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/cpu_ops.h [new file with mode: 0644]
arch/riscv/kernel/Makefile
arch/riscv/kernel/cpu_ops.c [new file with mode: 0644]
arch/riscv/kernel/cpu_ops_spinwait.c [new file with mode: 0644]
arch/riscv/kernel/smpboot.c