path: root/arch/riscv
diff options
authorAtish Patra <atish.patra@wdc.com>2019-02-22 11:41:37 -0800
committerPalmer Dabbelt <palmer@sifive.com>2019-03-04 10:40:38 -0800
commitba15c86185e9017f03b31a0699a0c09d1dc0d41c (patch)
tree16ddfbd1720f3bc7844977c035bc02021c71b9db /arch/riscv
parentRISC-V: Move cpuid to hartid mapping to SMP. (diff)
RISC-V: Remove NR_CPUs check during hartid search from DT
In non-smp configuration, hartid can be higher that NR_CPUS. riscv_of_processor_hartid should not be compared to hartid to NR_CPUS in that case. Moreover, this function checks all the DT properties of a hart node. NR_CPUS comparison seems out of place. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv')
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index d1d9bfd5a89f..cf2fca12414a 100644
--- a/arch/riscv/kernel/cpu.c
+++ b/arch/riscv/kernel/cpu.c
@@ -34,10 +34,6 @@ int riscv_of_processor_hartid(struct device_node *node)
pr_warn("Found CPU without hart ID\n");
return -ENODEV;
- if (hart >= NR_CPUS) {
- pr_info("Found hart ID %d, which is above NR_CPUs. Disabling this hart\n", hart);
- return -ENODEV;
- }
if (!of_device_is_available(node)) {
pr_info("CPU with hartid=%d is not available\n", hart);