]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scripts/gdb: de-reference per-CPU MCE interrupts
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Tue, 24 Jun 2025 03:00:19 +0000 (20:00 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 10 Jul 2025 04:07:53 +0000 (21:07 -0700)
The per-CPU MCE interrupts are looked up by reference and need to be
de-referenced before printing, otherwise we print the addresses of the
variables instead of their contents:

MCE: 18379471554386948492   Machine check exceptions
MCP: 18379471554386948488   Machine check polls

The corrected output looks like this instead now:

MCE:          0   Machine check exceptions
MCP:          1   Machine check polls

Link: https://lkml.kernel.org/r/20250625021109.1057046-1-florian.fainelli@broadcom.com
Link: https://lkml.kernel.org/r/20250624030020.882472-1-florian.fainelli@broadcom.com
Fixes: b0969d7687a7 ("scripts/gdb: print interrupts")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/gdb/linux/interrupts.py

index 492d1f1e9529211e6b2849b2e989958d4d1878c1..f4f715a8f0e36e1fde5f543b7d82289c69f81520 100644 (file)
@@ -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