[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1550089092-28783-4-git-send-email-atish.patra@wdc.com>
Date: Wed, 13 Feb 2019 12:18:07 -0800
From: Atish Patra <atish.patra@....com>
To: linux-riscv@...ts.infradead.org
Cc: Atish Patra <atish.patra@....com>,
Alan Kao <alankao@...estech.com>,
Albert Ou <aou@...s.berkeley.edu>,
Andreas Schwab <schwab@...e.de>,
Anup Patel <anup@...infault.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Dmitriy Cherkasov <dmitriy@...-tech.org>,
Guenter Roeck <linux@...ck-us.net>,
Jason Cooper <jason@...edaemon.net>,
Johan Hovold <johan@...nel.org>, linux-kernel@...r.kernel.org,
Marc Zyngier <marc.zyngier@....com>,
Palmer Dabbelt <palmer@...ive.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: [v5 PATCH 3/8] 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@....com>
Reviewed-by: Christoph Hellwig <hch@....de>
Reviewed-by: Anup Patel <anup@...infault.org>
---
arch/riscv/kernel/cpu.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index d1d9bfd5..cf2fca12 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);
--
2.7.4
Powered by blists - more mailing lists