RISC-V: Use Linux logical CPU number instead of hartid
authorAtish Patra <atish.patra@wdc.com>
Tue, 2 Oct 2018 19:15:05 +0000 (12:15 -0700)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 23 Oct 2018 00:03:37 +0000 (17:03 -0700)
commitf99fb607fb2bc0d4ce6b9adb764c65e37f40a92b
tree082100e81815f6c2fa5d152821d24351aa16a871
parent6825c7a80f1863b975a00042abe140ea24813af2
RISC-V: Use Linux logical CPU number instead of hartid

Setup the cpu_logical_map during boot. Moreover, every SBI call
and PLIC context are based on the physical hartid. Use the logical
CPU to hartid mapping to pass correct hartid to respective functions.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/include/asm/tlbflush.h
arch/riscv/kernel/cpu.c
arch/riscv/kernel/head.S
arch/riscv/kernel/setup.c
arch/riscv/kernel/smp.c
arch/riscv/kernel/smpboot.c
drivers/clocksource/riscv_timer.c
drivers/irqchip/irq-sifive-plic.c