RISC-V: Move the entire hart selection via lottery to SMP
authorAtish Patra <atishp@rivosinc.com>
Thu, 20 Jan 2022 09:09:16 +0000 (01:09 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 20 Jan 2022 17:27:11 +0000 (09:27 -0800)
commit0b39eb38f85908e039ce8c9f09868438e029757b
tree2d94289a034f5c2526ce06203d8dbb50a91def7c
parentc78f94f35cf6486c4057317e8de3ddc4c62e12c7
RISC-V: Move the entire hart selection via lottery to SMP

The booting hart selection via lottery is only useful for SMP systems.
Moreover, the lottery selection is only necessary for systems using
spinwait booting method. It is better to keep the entire lottery
selection together so that it can be disabled in future.

Move the lottery selection code to under CONFIG_SMP.

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/kernel/head.S