linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] RISC-V: drop error print from riscv_hartid_to_cpuid()
@ 2023-06-29 11:33 Conor Dooley
  2023-07-05 23:38 ` Palmer Dabbelt
  2023-07-05 23:50 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 3+ messages in thread
From: Conor Dooley @ 2023-06-29 11:33 UTC (permalink / raw)
  To: palmer; +Cc: conor, conor.dooley, Paul Walmsley, linux-riscv, Andrew Jones

As of commit 2ac874343749 ("RISC-V: split early & late of_node to
hartid mapping") my CI complains about newly added pr_err() messages
during boot, for example:
[    0.000000] Couldn't find cpu id for hartid [0]
[    0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller

Before the split, riscv_of_processor_hartid() contained a check for
whether the cpu was "available", before calling riscv_hartid_to_cpuid(),
but after the split riscv_of_processor_hartid() can be called for cpus
that are disabled.

Most callers of riscv_hartid_to_cpuid() already report custom errors
where it falls, making this print superfluous in those case. In other
places, the print adds nothing - see riscv_intc_init() for example.

Fixes: 2ac874343749 ("RISC-V: split early & late of_node to hartid mapping")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
Sunil, the acpi user of this function I was unclear about. Could you
please take a look and see if disabling this print is okay there, or if I
should add a localised error print on failure?

CC: Sunil V L <sunilvl@ventanamicro.com>
CC: Andrew Jones <ajones@ventanamicro.com>
CC: Paul Walmsley <paul.walmsley@sifive.com>
CC: Palmer Dabbelt <palmer@dabbelt.com>
CC: linux-riscv@lists.infradead.org
---
 arch/riscv/kernel/smp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index 23e533766a49..85bbce0f758c 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -58,7 +58,6 @@ int riscv_hartid_to_cpuid(unsigned long hartid)
 		if (cpuid_to_hartid_map(i) == hartid)
 			return i;
 
-	pr_err("Couldn't find cpu id for hartid [%lu]\n", hartid);
 	return -ENOENT;
 }
 
-- 
2.40.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH v1] RISC-V: drop error print from riscv_hartid_to_cpuid()
  2023-06-29 11:33 [PATCH v1] RISC-V: drop error print from riscv_hartid_to_cpuid() Conor Dooley
@ 2023-07-05 23:38 ` Palmer Dabbelt
  2023-07-05 23:50 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2023-07-05 23:38 UTC (permalink / raw)
  To: Palmer Dabbelt, Conor Dooley
  Cc: Conor Dooley, Paul Walmsley, linux-riscv, Andrew Jones


On Thu, 29 Jun 2023 12:33:34 +0100, Conor Dooley wrote:
> As of commit 2ac874343749 ("RISC-V: split early & late of_node to
> hartid mapping") my CI complains about newly added pr_err() messages
> during boot, for example:
> [    0.000000] Couldn't find cpu id for hartid [0]
> [    0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller
> 
> Before the split, riscv_of_processor_hartid() contained a check for
> whether the cpu was "available", before calling riscv_hartid_to_cpuid(),
> but after the split riscv_of_processor_hartid() can be called for cpus
> that are disabled.
> 
> [...]

Applied, thanks!

[1/1] RISC-V: drop error print from riscv_hartid_to_cpuid()
      https://git.kernel.org/palmer/c/52909f176802

Best regards,
-- 
Palmer Dabbelt <palmer@rivosinc.com>


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH v1] RISC-V: drop error print from riscv_hartid_to_cpuid()
  2023-06-29 11:33 [PATCH v1] RISC-V: drop error print from riscv_hartid_to_cpuid() Conor Dooley
  2023-07-05 23:38 ` Palmer Dabbelt
@ 2023-07-05 23:50 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-07-05 23:50 UTC (permalink / raw)
  To: Conor Dooley; +Cc: linux-riscv, palmer, conor, paul.walmsley, ajones

Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Thu, 29 Jun 2023 12:33:34 +0100 you wrote:
> As of commit 2ac874343749 ("RISC-V: split early & late of_node to
> hartid mapping") my CI complains about newly added pr_err() messages
> during boot, for example:
> [    0.000000] Couldn't find cpu id for hartid [0]
> [    0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller
> 
> Before the split, riscv_of_processor_hartid() contained a check for
> whether the cpu was "available", before calling riscv_hartid_to_cpuid(),
> but after the split riscv_of_processor_hartid() can be called for cpus
> that are disabled.
> 
> [...]

Here is the summary with links:
  - [v1] RISC-V: drop error print from riscv_hartid_to_cpuid()
    https://git.kernel.org/riscv/c/52909f176802

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



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2023-07-05 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-29 11:33 [PATCH v1] RISC-V: drop error print from riscv_hartid_to_cpuid() Conor Dooley
2023-07-05 23:38 ` Palmer Dabbelt
2023-07-05 23:50 ` 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;
as well as URLs for NNTP newsgroup(s).