linux/arch/riscv/kernel
Atish Patra 6825c7a80f
RISC-V: Add logical CPU indexing for RISC-V
Currently, both Linux CPU id and hart id are same.
This is not recommended as it will lead to discontinuous CPU
indexing in Linux. Moreover, kdump kernel will run from CPU0
which would be absent if we follow existing scheme.

Implement a logical mapping between Linux CPU id and hart
id to decouple these two. Always mark the boot processor as
CPU0 and all other CPUs get the logical CPU id based on their
booting order.

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>
2018-10-22 17:03:37 -07:00
..
vdso RISC-V: Use KBUILD_CFLAGS instead of KCFLAGS when building the vDSO 2018-08-13 08:31:28 -07:00
.gitignore RISC-V: Build Infrastructure 2017-09-26 15:26:49 -07:00
asm-offsets.c RISC-V: Task implementation 2017-09-26 15:26:46 -07:00
cacheinfo.c RISC-V: Don't set cacheinfo.{physical_line_partition,attributes} 2018-10-22 17:03:35 -07:00
cpu.c RISC-V: Rename riscv_of_processor_hart to riscv_of_processor_hartid 2018-10-22 17:03:36 -07:00
cpufeature.c RISC-V: User-facing API 2017-09-26 15:26:48 -07:00
entry.S RISC-V: No need to pass scause as arg to do_IRQ() 2018-10-22 17:03:35 -07:00
ftrace.c riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support 2018-04-02 19:59:13 -07:00
head.S RISC-V: Add the directive for alignment of stvec's value 2018-08-13 08:31:31 -07:00
irq.c RISC-V: No need to pass scause as arg to do_IRQ() 2018-10-22 17:03:35 -07:00
Makefile perf: riscv: preliminary RISC-V support 2018-06-04 14:02:01 -07:00
mcount-dyn.S riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support 2018-04-02 19:59:13 -07:00
mcount.S riscv/ftrace: Export _mcount when DYNAMIC_FTRACE isn't set 2018-06-11 09:04:03 -07:00
module-sections.c RISC-V: Add section of GOT.PLT for kernel module 2018-04-02 20:00:54 -07:00
module.c RISC-V: Fix the rv32i kernel build 2018-07-04 14:12:53 -07:00
module.lds RISC-V: Add section of GOT.PLT for kernel module 2018-04-02 20:00:54 -07:00
perf_event.c RISC-V: Fix !CONFIG_SMP compilation error 2018-08-13 08:31:32 -07:00
process.c Merge branch 'work.whack-a-mole' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-01-31 19:18:12 -08:00
ptrace.c RISC-V: Fix PTRACE_SETREGSET bug. 2018-07-04 14:12:47 -07:00
reset.c RISC-V: Init and Halt Code 2017-09-26 15:26:44 -07:00
riscv_ksyms.c riscv: split the declaration of __copy_user 2018-06-09 12:34:31 -07:00
setup.c RISC-V: Add logical CPU indexing for RISC-V 2018-10-22 17:03:37 -07:00
signal.c RISC-V: User-facing API 2017-09-26 15:26:48 -07:00
smp.c RISC-V: Add logical CPU indexing for RISC-V 2018-10-22 17:03:37 -07:00
smpboot.c RISC-V: Use WRITE_ONCE instead of direct access 2018-10-22 17:03:37 -07:00
stacktrace.c riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support 2018-04-02 19:59:13 -07:00
sys_riscv.c RISC-V: Use a less ugly workaround for unused variable warnings 2018-08-28 12:58:36 -07:00
syscall_table.c RISC-V: Make __NR_riscv_flush_icache visible to userspace 2018-01-07 15:14:37 -08:00
time.c clocksource: new RISC-V SBI timer driver 2018-08-13 08:31:31 -07:00
traps.c RISC-V: Don't increment sepc after breakpoint. 2018-08-13 08:31:30 -07:00
vdso.c riscv: remove redundant unlikely() 2018-01-30 19:12:06 -08:00
vmlinux.lds.S RISC-V: Build Infrastructure 2017-09-26 15:26:49 -07:00