public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Don't print details of CPUs disabled in DT
@ 2025-10-14 16:30 Anup Patel
  2025-10-14 17:50 ` Andrew Jones
  2025-10-18 16:01 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 4+ messages in thread
From: Anup Patel @ 2025-10-14 16:30 UTC (permalink / raw)
  To: Palmer Dabbelt, Paul Walmsley
  Cc: Alexandre Ghiti, Atish Patra, Andrew Jones, Anup Patel,
	linux-riscv, linux-kernel, Anup Patel

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 <apatel@ventanamicro.com>
---
 arch/riscv/kernel/cpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index f6b13e9f5e6c..3dbc8cc557dd 100644
--- a/arch/riscv/kernel/cpu.c
+++ b/arch/riscv/kernel/cpu.c
@@ -62,10 +62,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;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Don't print details of CPUs disabled in DT
  2025-10-14 16:30 [PATCH] RISC-V: Don't print details of CPUs disabled in DT Anup Patel
@ 2025-10-14 17:50 ` Andrew Jones
  2025-10-14 21:43   ` Conor Dooley
  2025-10-18 16:01 ` patchwork-bot+linux-riscv
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Jones @ 2025-10-14 17:50 UTC (permalink / raw)
  To: Anup Patel
  Cc: Palmer Dabbelt, Paul Walmsley, Alexandre Ghiti, Atish Patra,
	Anup Patel, linux-riscv, linux-kernel

On Tue, Oct 14, 2025 at 10:00:09PM +0530, Anup Patel wrote:
> 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 <apatel@ventanamicro.com>
> ---
>  arch/riscv/kernel/cpu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
> index f6b13e9f5e6c..3dbc8cc557dd 100644
> --- a/arch/riscv/kernel/cpu.c
> +++ b/arch/riscv/kernel/cpu.c
> @@ -62,10 +62,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;
> -- 
> 2.43.0
>

Maybe we should keep the message as a pr_debug()?

Otherwise,

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Don't print details of CPUs disabled in DT
  2025-10-14 17:50 ` Andrew Jones
@ 2025-10-14 21:43   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2025-10-14 21:43 UTC (permalink / raw)
  To: Andrew Jones
  Cc: Anup Patel, Palmer Dabbelt, Paul Walmsley, Alexandre Ghiti,
	Atish Patra, Anup Patel, linux-riscv, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

On Tue, Oct 14, 2025 at 12:50:11PM -0500, Andrew Jones wrote:
> On Tue, Oct 14, 2025 at 10:00:09PM +0530, Anup Patel wrote:
> > 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 <apatel@ventanamicro.com>
> > ---
> >  arch/riscv/kernel/cpu.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
> > index f6b13e9f5e6c..3dbc8cc557dd 100644
> > --- a/arch/riscv/kernel/cpu.c
> > +++ b/arch/riscv/kernel/cpu.c
> > @@ -62,10 +62,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;
> > -- 
> > 2.43.0
> >
> 
> Maybe we should keep the message as a pr_debug()?

I don't even know if that really has any value, there's plenty of places
in userspace to get access to what CPUs are enabled and having no CPUs
triggers a BUG().
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

> 
> Otherwise,
> 
> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] RISC-V: Don't print details of CPUs disabled in DT
  2025-10-14 16:30 [PATCH] RISC-V: Don't print details of CPUs disabled in DT Anup Patel
  2025-10-14 17:50 ` Andrew Jones
@ 2025-10-18 16:01 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-riscv @ 2025-10-18 16:01 UTC (permalink / raw)
  To: Anup Patel
  Cc: linux-riscv, palmer, paul.walmsley, alex, atish.patra, ajones,
	anup, linux-kernel

Hello:

This patch was applied to riscv/linux.git (fixes)
by Paul Walmsley <pjw@kernel.org>:

On Tue, 14 Oct 2025 22:00:09 +0530 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - RISC-V: Don't print details of CPUs disabled in DT
    https://git.kernel.org/riscv/c/d2721bb165b3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-18 16:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14 16:30 [PATCH] RISC-V: Don't print details of CPUs disabled in DT Anup Patel
2025-10-14 17:50 ` Andrew Jones
2025-10-14 21:43   ` Conor Dooley
2025-10-18 16:01 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox