From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0C5D43DEAC4 for ; Wed, 4 Mar 2026 18:56:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772650591; cv=none; b=uHhR3qx2QTrTGyfATkKqXcHpn7hF5a+GxSALxKDDLdO1CqDLCb8n/0A/ttxBwYNK9i8ZUuSqkq6KvliF2umPEXp+MbbTOdWAufKzG8YD0au6+6xwOFCf0Vh5RVYlDUtWBExNVGyQLMq6C5XeeU19h1BtPrB0X1OomZT68g0gagE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772650591; c=relaxed/simple; bh=QbC1t90YvyHplW2TxJf6x38jggAFTIZypPZm8R7wXV8=; h=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=m/5J2CZxDHlvvVuDcRuJYgKTHn1fe7yq3Vxx8Nn+Suu3ARvqwsrbiaOrzi9xxNllcu4CcZgTrhJgW36OEWc4ItPPO5Muwxu6sEUX2M16U0zOc9IRjTsDTtQJEKCuZQ4zBPQyVdttEZ00L/m5OUjul2WTluVhqE+ckeQF49KeIKA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nAZsRjsv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nAZsRjsv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 800C4C19425; Wed, 4 Mar 2026 18:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772650590; bh=QbC1t90YvyHplW2TxJf6x38jggAFTIZypPZm8R7wXV8=; h=Date:From:To:Cc:Subject:References:From; b=nAZsRjsvSV2emPsxEMbOgyEr3QOr4i2YvTggbaesEwrOrhkEoYPXYah6VWcGV4oL5 +6XeVcxIk6QtX6SoN8cJrLaxbHljqFWFsPtdqQ/5yu1cYW2Y+UALtMZHV8svAdFun8 eph7FbPlYPCIxvSxr/4G2RfxcvfNCd+rXqY+1v1v0W51HQI9HIfJIE5+zpU381ZCj2 ENfpG/v0zKEI6582Lp50WmvhLCc7EEgp7wB84IQNsd1v5RRbcgpJ2pBQ2tLa7eCkyR gNeU9RB7vffkGQJaJtI60djHdeG7TW9nKVhBVnDqYvPbnXV9KIVIYwN50I7lOkcjIl 0a7nul7sLffiw== Date: Wed, 04 Mar 2026 19:56:28 +0100 Message-ID: <20260303154548.907517219@kernel.org> User-Agent: quilt/0.68 From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Dmitry Ilvokhin , Neil Horman Subject: [patch 14/14] [RFC] x86/irq: Hook up architecture specific stats References: <20260303150539.513068586@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Enable the binary statistics interface for architecture specific interrupts. Signed-off-by: Thomas Gleixner --- arch/x86/Kconfig | 1 + arch/x86/include/asm/hardirq.h | 7 +++++++ 2 files changed, 8 insertions(+) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -177,6 +177,7 @@ config X86 select GENERIC_IRQ_PROBE select GENERIC_IRQ_RESERVATION_MODE select GENERIC_IRQ_SHOW + select GENERIC_IRQ_STATS_ARCH select GENERIC_PENDING_IRQ if SMP select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h @@ -65,7 +65,14 @@ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpust #ifdef CONFIG_X86_POSTED_MSI DECLARE_PER_CPU_ALIGNED(struct pi_desc, posted_msi_pi_desc); #endif + #define __ARCH_IRQ_STAT +#define ARCH_IRQ_STATS_NUM_IRQS IRQ_COUNT_MAX + +static inline unsigned int arch_get_irq_stat(unsigned int cpu, unsigned int idx) +{ + return data_race(per_cpu_ptr(&irq_stat, cpu)->counts[idx]); +} #define inc_irq_stat(index) this_cpu_inc(irq_stat.counts[IRQ_COUNT_##index])