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 E991E3BD25D for ; Fri, 20 Mar 2026 13:22:38 +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=1774012959; cv=none; b=OvjfF3qEFq9CEJhBkCCwRTbTzej+CiPccPUkNhIZvMf5z7Y2fGTGQfnNXlEMNclDjRjOPsV4o17ORT1dzkqFNPYjlnZj4URJRJLOhuRKB71a0BIrsLlAQqTDiBepGtH0/hSnfEIW8q/50oTl/nUkkFrq/SnGoCVW2ORVBKdb5XE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774012959; c=relaxed/simple; bh=QbC1t90YvyHplW2TxJf6x38jggAFTIZypPZm8R7wXV8=; h=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=uN67y+qIJuBKgXoKpFoCH5dzSqqSN6baYtKbOHpn7VQaTqFu32twezkzm/NxknQiTefGYLG9dV+pOZdL5oCkQV+OiY5nwUY5sRK9vnG3jvJzVgiEWJgp6wN2Ex6DW6cAwxX1RGddpHnEl9461g3SH1yT+yzU85BPLd7D37dsq20= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HjzW7GVc; 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="HjzW7GVc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA256C2BCB0; Fri, 20 Mar 2026 13:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774012958; bh=QbC1t90YvyHplW2TxJf6x38jggAFTIZypPZm8R7wXV8=; h=Date:From:To:Cc:Subject:References:From; b=HjzW7GVczoS3JSch2WtKfCiPbgZSozKhYEBTo6Rxbp5fY2grxXRY8h0Bhc9pSmCaa TNjenbp8ZsUhHOp5NmWfjeqf9y7CtJHhASKe91ib/9PjO9Em3TmJgWCyOjMu0ERg/y vKJf0OLyrJMmRRmbTn03YIeT7kjQDYnMDe9xgyY7aZqMtFon1j2u4zaYmJ9sdJ4lrK x9qy4HxOK8IT2NPWtt3b5TgSYu7CO9ZoQg39RfGGJCggkEkcs3sEwYoN70NxWbDT9W BKmq2wR2uWwnPNUJ5vfpU9SAWsdq8funZYLY52xCcN4yAg/sqI9JtOZiDiPiQVEBJ3 ab3ka3/jCLOFA== Date: Fri, 20 Mar 2026 14:22:35 +0100 Message-ID: <20260320132102.977658755@kernel.org> User-Agent: quilt/0.68 From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Dmitry Ilvokhin , Neil Horman , Radu Rendec Subject: [patch v2 14/14] [RFC] x86/irq: Hook up architecture specific stats References: <20260320131108.344376329@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])