Message ID | 20230105005126.1772294-2-paulmck@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 3ca0a6ea8f6de0f21a9331ff3596a9c073fbdab0 |
Headers | show |
Series | RCU CPU stall-warning updates for v6.3 | expand |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 90e2fdc17d79f..898076e173a92 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -67,6 +67,17 @@ static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) return kstat_cpu(cpu).softirqs[irq]; } +static inline unsigned int kstat_cpu_softirqs_sum(int cpu) +{ + int i; + unsigned int sum = 0; + + for (i = 0; i < NR_SOFTIRQS; i++) + sum += kstat_softirqs_cpu(i, cpu); + + return sum; +} + /* * Number of interrupts per specific IRQ source, since bootup */