From: Atish Patra Date: Fri, 22 Feb 2019 19:41:37 +0000 (-0800) Subject: RISC-V: Remove NR_CPUs check during hartid search from DT X-Git-Tag: v5.1-rc1~129^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba15c86185e9017f03b31a0699a0c09d1dc0d41c;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Christoph Hellwig Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index d1d9bfd5a89fa..cf2fca12414a4 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);