From: Anup Patel Date: Tue, 14 Oct 2025 16:30:09 +0000 (+0530) Subject: RISC-V: Don't print details of CPUs disabled in DT X-Git-Tag: v6.6.115~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc1ac7c1a355b27c1888ccb16d53255d78e1f842;p=thirdparty%2Fkernel%2Fstable.git RISC-V: Don't print details of CPUs disabled in DT [ Upstream commit d2721bb165b3ee00dd23525885381af07fec852a ] Early boot stages may disable CPU DT nodes for unavailable CPUs based on SKU, pinstraps, eFuse, etc. Currently, the riscv_early_of_processor_hartid() prints details of a CPU if it is disabled in DT which has no value and gives a false impression to the users that there some issue with the CPU. Fixes: e3d794d555cd ("riscv: treat cpu devicetree nodes without status as enabled") Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20251014163009.182381-1-apatel@ventanamicro.com Signed-off-by: Paul Walmsley Signed-off-by: Sasha Levin --- diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index 88732abecd02..93e794d0e523 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -61,10 +61,8 @@ int __init riscv_early_of_processor_hartid(struct device_node *node, unsigned lo return -ENODEV; } - if (!of_device_is_available(node)) { - pr_info("CPU with hartid=%lu is not available\n", *hart); + if (!of_device_is_available(node)) return -ENODEV; - } if (of_property_read_string(node, "riscv,isa-base", &isa)) goto old_interface;