aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel_stat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r--include/linux/kernel_stat.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index a77c6007dc99..348fa8874b52 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -5,6 +5,7 @@
5#include <linux/threads.h> 5#include <linux/threads.h>
6#include <linux/percpu.h> 6#include <linux/percpu.h>
7#include <linux/cpumask.h> 7#include <linux/cpumask.h>
8#include <linux/interrupt.h>
8#include <asm/irq.h> 9#include <asm/irq.h>
9#include <asm/cputime.h> 10#include <asm/cputime.h>
10 11
@@ -31,6 +32,7 @@ struct kernel_stat {
31#ifndef CONFIG_GENERIC_HARDIRQS 32#ifndef CONFIG_GENERIC_HARDIRQS
32 unsigned int irqs[NR_IRQS]; 33 unsigned int irqs[NR_IRQS];
33#endif 34#endif
35 unsigned int softirqs[NR_SOFTIRQS];
34}; 36};
35 37
36DECLARE_PER_CPU(struct kernel_stat, kstat); 38DECLARE_PER_CPU(struct kernel_stat, kstat);
@@ -67,6 +69,16 @@ extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
67 69
68#endif 70#endif
69 71
72static inline void kstat_incr_softirqs_this_cpu(unsigned int irq)
73{
74 kstat_this_cpu.softirqs[irq]++;
75}
76
77static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu)
78{
79 return kstat_cpu(cpu).softirqs[irq];
80}
81
70/* 82/*
71 * Number of interrupts per specific IRQ source, since bootup 83 * Number of interrupts per specific IRQ source, since bootup
72 */ 84 */