summaryrefslogtreecommitdiff
path: root/kernel/irq/internals.h
diff options
context:
space:
mode:
authorBitao Hu <yaoma@linux.alibaba.com>2024-04-11 15:41:30 +0800
committerThomas Gleixner <tglx@linutronix.de>2024-04-12 17:08:05 +0200
commit86d2a2f51fbada84e377665df06b5a479a1edc99 (patch)
tree4d4841bbc3a1d129a8cc9d6793bb19fb52553720 /kernel/irq/internals.h
parent81e4cb0fd45c84d416e3edffbf6ae62c89ce6b5a (diff)
genirq: Convert kstat_irqs to a struct
The irq_desc::kstat_irqs member is a per-CPU variable of type int, which is only capable of counting. A snapshot mechanism for interrupt statistics will be added soon, which requires an additional variable to store the snapshot. To facilitate expansion, convert kstat_irqs here to a struct containing only the count. Originally-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Bitao Hu <yaoma@linux.alibaba.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240411074134.30922-2-yaoma@linux.alibaba.com
Diffstat (limited to 'kernel/irq/internals.h')
-rw-r--r--kernel/irq/internals.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index bcc7f21db9ee..1d92532c2aae 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -258,7 +258,7 @@ static inline void irq_state_set_masked(struct irq_desc *desc)
static inline void __kstat_incr_irqs_this_cpu(struct irq_desc *desc)
{
- __this_cpu_inc(*desc->kstat_irqs);
+ __this_cpu_inc(desc->kstat_irqs->cnt);
__this_cpu_inc(kstat.irqs_sum);
}