mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scripts/gdb: De-reference per-CPU MCE interrupts
@ 2025-06-24  3:00 Florian Fainelli
  2025-06-24 23:53 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2025-06-24  3:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: Florian Fainelli, Jan Kiszka, Kieran Bingham, Andrew Morton

The per-CPU MCE interrupts are looked up by reference and need to be
de-referenced before printing.

Fixes: b0969d7687a7 ("scripts/gdb: print interrupts")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 scripts/gdb/linux/interrupts.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gdb/linux/interrupts.py b/scripts/gdb/linux/interrupts.py
index 199d9e8193f4..8bd0d7108ae0 100644
--- a/scripts/gdb/linux/interrupts.py
+++ b/scripts/gdb/linux/interrupts.py
@@ -110,7 +110,7 @@ def x86_show_mce(prec, var, pfx, desc):
     pvar = gdb.parse_and_eval(var)
     text = "%*s: " % (prec, pfx)
     for cpu in cpus.each_online_cpu():
-        text += "%10u " % (cpus.per_cpu(pvar, cpu))
+        text += "%10u " % (cpus.per_cpu(pvar, cpu).dereference())
     text += "  %s\n" % (desc)
     return text
 
-- 
2.43.0


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

* Re: [PATCH] scripts/gdb: De-reference per-CPU MCE interrupts
  2025-06-24  3:00 [PATCH] scripts/gdb: De-reference per-CPU MCE interrupts Florian Fainelli
@ 2025-06-24 23:53 ` Andrew Morton
  2025-06-25  2:01   ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2025-06-24 23:53 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-kernel, Jan Kiszka, Kieran Bingham

On Mon, 23 Jun 2025 20:00:19 -0700 Florian Fainelli <florian.fainelli@broadcom.com> wrote:

> The per-CPU MCE interrupts are looked up by reference and need to be
> de-referenced before printing.

Again, please fully describe the problem which is being addressed.

(OK, I can see it's "prints wrong stuff", but something like example
before-and-after output would be very helpful)

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

* Re: [PATCH] scripts/gdb: De-reference per-CPU MCE interrupts
  2025-06-24 23:53 ` Andrew Morton
@ 2025-06-25  2:01   ` Florian Fainelli
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2025-06-25  2:01 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Jan Kiszka, Kieran Bingham



On 6/24/2025 4:53 PM, Andrew Morton wrote:
> On Mon, 23 Jun 2025 20:00:19 -0700 Florian Fainelli <florian.fainelli@broadcom.com> wrote:
> 
>> The per-CPU MCE interrupts are looked up by reference and need to be
>> de-referenced before printing.
> 
> Again, please fully describe the problem which is being addressed.
> 
> (OK, I can see it's "prints wrong stuff", but something like example
> before-and-after output would be very helpful)

Sure, I thought it was clear enough we were printing the variable 
address rather than its content, but I will make that clear in a v2.

Thanks!
-- 
Florian


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

end of thread, other threads:[~2025-06-25  2:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-24  3:00 [PATCH] scripts/gdb: De-reference per-CPU MCE interrupts Florian Fainelli
2025-06-24 23:53 ` Andrew Morton
2025-06-25  2:01   ` Florian Fainelli

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

all inboxes | Powered by JetHome®