From nobody Mon Jun 8 20:45:37 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85E103FFABF; Tue, 26 May 2026 14:22:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779805355; cv=none; b=EyqS4LrDg5Km0fzIC4euDxFxjYEapi/pCHYWlkTxxlXhUNjZr869WTNLvKLxle0LiYLg0XaDLkU2/65U/bcbGx2cznm30gXVfzMzYAi9RTdPFQe+LCQ60ndZFTidYZE+MJJrWl5x8yJJML+0oGYHabg+HZYFwyZx4BTjbakFrTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779805355; c=relaxed/simple; bh=lsYhgXhA1+VUy5hDxLIzlqSAQcqZD/tlW0gImjUxLmY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=O3Twcx5NZENtQ7Lb1jw1Bghx/ZY0fHXQgOwlPQfAN56YQ44rdu2kwGyyyR5TwDAsooaRnvXC4i/GeNwXsA20MKlT0DNCOsRVcsfTOUEaYNCXcZgdNTbi9QGrkTO+91IpdLO8ddZ/6pGVYlj7b8iJH2vX9mfDB6WDqejidiajJxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=298wEOk/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qvSRv+5a; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="298wEOk/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qvSRv+5a" Date: Tue, 26 May 2026 14:22:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1779805352; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fN/9p6+jCIIXi+2Z5WVykwGF3OCSLx3Cw3oRQgd0ORs=; b=298wEOk/0KAVDe5VZgXMTvwLBXT/nKu9DZkWN511IEYoz0eGPrPIcz7MQNFCh9LMBNU7fP TCBrShk2maSd0LnfCunNLI6EwUSi85BKc2+yog8M6L7cqTo5NO6PmubDXHYpQLwR3YmcP5 VshQRS/n3zCv5X/aVfBdpUeE8YuHNyI6QOzDzp9IgZLlzHS8dOi7uUpMI6EEaoriiDQ9n7 wzlcBJKBKa5zDDPGAeHR9KwXiv++QfXk/9GrhP7yDFoQcP4Ysq1Q9SMlMGFZQzO/j52aXm gdVNvymGSI8b/N6v43sQtO7Z3kNzqcPX804QlBbRN4gGu6BMbg34qoWAArz8eA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1779805352; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fN/9p6+jCIIXi+2Z5WVykwGF3OCSLx3Cw3oRQgd0ORs=; b=qvSRv+5agIcUUNwPIVlB0eXbhpQ7aLr2dYKDFs8AQCJ5I5OKvLWVmGYHSRO/KwmDACQIZq rFriC4fbyh4t4XCA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] scripts/gdb: Update x86 interrupts to the array based storage Cc: Thomas Gleixner , Florian Fainelli , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20260517194931.442613033@kernel.org> References: <20260517194931.442613033@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177980535057.1039918.9361032420255654689.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/core branch of tip: Commit-ID: cca5e6fa791bdf84f716ae92604d8330a6b6411a Gitweb: https://git.kernel.org/tip/cca5e6fa791bdf84f716ae92604d8330a= 6b6411a Author: Thomas Gleixner AuthorDate: Sun, 17 May 2026 22:02:04 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 26 May 2026 16:21:13 +02:00 scripts/gdb: Update x86 interrupts to the array based storage x86 changed the interrupt statistics from a struct with individual members to an counter array. It also provides a corresponding info array with the strings for prefix and description and an indicator to skip the entry. Update the already out of sync GDB script to use the counter and the info array, which keeps the GDB script in sync automatically. Signed-off-by: Thomas Gleixner Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20260517194931.442613033@kernel.org --- scripts/gdb/linux/interrupts.py | 73 ++++++++------------------------ 1 file changed, 19 insertions(+), 54 deletions(-) diff --git a/scripts/gdb/linux/interrupts.py b/scripts/gdb/linux/interrupts= .py index f4f715a..b794e01 100644 --- a/scripts/gdb/linux/interrupts.py +++ b/scripts/gdb/linux/interrupts.py @@ -48,7 +48,7 @@ def show_irq_desc(prec, irq): count =3D cpus.per_cpu(desc['kstat_irqs'], cpu)['cnt'] else: count =3D 0 - text +=3D "%10u" % (count) + text +=3D "%10u " % (count) =20 name =3D "None" if desc['irq_data']['chip']: @@ -58,7 +58,7 @@ def show_irq_desc(prec, irq): else: name =3D "-" =20 - text +=3D " %8s" % (name) + text +=3D " %-8s" % (name) =20 if desc['irq_data']['domain']: text +=3D " %*lu" % (prec, desc['irq_data']['hwirq']) @@ -97,64 +97,29 @@ def show_irq_err_count(prec): text +=3D "%*s: %10u\n" % (prec, "ERR", cnt['counter']) return text =20 -def x86_show_irqstat(prec, pfx, field, desc): - irq_stat =3D gdb.parse_and_eval("&irq_stat") +def x86_show_irqstat(prec, pfx, idx, desc): + irq_stat =3D gdb.parse_and_eval("&irq_stat.counts[%d]" %idx) text =3D "%*s: " % (prec, pfx) for cpu in cpus.each_online_cpu(): stat =3D cpus.per_cpu(irq_stat, cpu) - text +=3D "%10u " % (stat[field]) - text +=3D " %s\n" % (desc) - return text - -def x86_show_mce(prec, var, pfx, desc): - pvar =3D gdb.parse_and_eval(var) - text =3D "%*s: " % (prec, pfx) - for cpu in cpus.each_online_cpu(): - text +=3D "%10u " % (cpus.per_cpu(pvar, cpu).dereference()) - text +=3D " %s\n" % (desc) + text +=3D "%10u " % (stat.dereference()) + text +=3D desc return text =20 def x86_show_interupts(prec): - text =3D x86_show_irqstat(prec, "NMI", '__nmi_count', 'Non-maskable in= terrupts') - - if constants.LX_CONFIG_X86_LOCAL_APIC: - text +=3D x86_show_irqstat(prec, "LOC", 'apic_timer_irqs', "Local = timer interrupts") - text +=3D x86_show_irqstat(prec, "SPU", 'irq_spurious_count', "Spu= rious interrupts") - text +=3D x86_show_irqstat(prec, "PMI", 'apic_perf_irqs', "Perform= ance monitoring interrupts") - text +=3D x86_show_irqstat(prec, "IWI", 'apic_irq_work_irqs', "IRQ= work interrupts") - text +=3D x86_show_irqstat(prec, "RTR", 'icr_read_retry_count', "A= PIC ICR read retries") - if utils.gdb_eval_or_none("x86_platform_ipi_callback") is not None: - text +=3D x86_show_irqstat(prec, "PLT", 'x86_platform_ipis', "= Platform interrupts") - - if constants.LX_CONFIG_SMP: - text +=3D x86_show_irqstat(prec, "RES", 'irq_resched_count', "Resc= heduling interrupts") - text +=3D x86_show_irqstat(prec, "CAL", 'irq_call_count', "Functio= n call interrupts") - text +=3D x86_show_irqstat(prec, "TLB", 'irq_tlb_count', "TLB shoo= tdowns") - - if constants.LX_CONFIG_X86_THERMAL_VECTOR: - text +=3D x86_show_irqstat(prec, "TRM", 'irq_thermal_count', "Ther= mal events interrupts") - - if constants.LX_CONFIG_X86_MCE_THRESHOLD: - text +=3D x86_show_irqstat(prec, "THR", 'irq_threshold_count', "Th= reshold APIC interrupts") - - if constants.LX_CONFIG_X86_MCE_AMD: - text +=3D x86_show_irqstat(prec, "DFR", 'irq_deferred_error_count'= , "Deferred Error APIC interrupts") - - if constants.LX_CONFIG_X86_MCE: - text +=3D x86_show_mce(prec, "&mce_exception_count", "MCE", "Machi= ne check exceptions") - text +=3D x86_show_mce(prec, "&mce_poll_count", "MCP", "Machine ch= eck polls") - - text +=3D show_irq_err_count(prec) - - if constants.LX_CONFIG_X86_IO_APIC: - cnt =3D utils.gdb_eval_or_none("irq_mis_count") - if cnt is not None: - text +=3D "%*s: %10u\n" % (prec, "MIS", cnt['counter']) - - if constants.LX_CONFIG_KVM: - text +=3D x86_show_irqstat(prec, "PIN", 'kvm_posted_intr_ipis', 'P= osted-interrupt notification event') - text +=3D x86_show_irqstat(prec, "NPI", 'kvm_posted_intr_nested_ip= is', 'Nested posted-interrupt event') - text +=3D x86_show_irqstat(prec, "PIW", 'kvm_posted_intr_wakeup_ip= is', 'Posted-interrupt wakeup event') + info_type =3D gdb.lookup_type('struct irq_stat_info') + info =3D gdb.parse_and_eval('irq_stat_info') + bitmap =3D gdb.parse_and_eval('irq_stat_count_show') + bitsperlong =3D 8 * int(bitmap.type.target().sizeof) + + text =3D "" + for idx in range(int(info.type.sizeof / info_type.sizeof)): + show =3D bitmap[int(idx / bitsperlong)] + if not show & 1 << int(idx % bitsperlong): + continue + pfx =3D info[idx]['symbol'].string() + desc =3D info[idx]['text'].string() + text +=3D x86_show_irqstat(prec, pfx, idx, desc) =20 return text =20