diff options
Diffstat (limited to 'include/linux/kernel_stat.h')
| -rw-r--r-- | include/linux/kernel_stat.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ed5f6ed6eb77..51c72be4a7c3 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
| @@ -36,9 +36,6 @@ struct kernel_cpustat { | |||
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | struct kernel_stat { | 38 | struct kernel_stat { |
| 39 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
| 40 | unsigned int irqs[NR_IRQS]; | ||
| 41 | #endif | ||
| 42 | unsigned long irqs_sum; | 39 | unsigned long irqs_sum; |
| 43 | unsigned int softirqs[NR_SOFTIRQS]; | 40 | unsigned int softirqs[NR_SOFTIRQS]; |
| 44 | }; | 41 | }; |
| @@ -54,22 +51,6 @@ DECLARE_PER_CPU(struct kernel_cpustat, kernel_cpustat); | |||
| 54 | 51 | ||
| 55 | extern unsigned long long nr_context_switches(void); | 52 | extern unsigned long long nr_context_switches(void); |
| 56 | 53 | ||
| 57 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
| 58 | |||
| 59 | struct irq_desc; | ||
| 60 | |||
| 61 | static inline void kstat_incr_irqs_this_cpu(unsigned int irq, | ||
| 62 | struct irq_desc *desc) | ||
| 63 | { | ||
| 64 | __this_cpu_inc(kstat.irqs[irq]); | ||
| 65 | __this_cpu_inc(kstat.irqs_sum); | ||
| 66 | } | ||
| 67 | |||
| 68 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | ||
| 69 | { | ||
| 70 | return kstat_cpu(cpu).irqs[irq]; | ||
| 71 | } | ||
| 72 | #else | ||
| 73 | #include <linux/irq.h> | 54 | #include <linux/irq.h> |
| 74 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | 55 | extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); |
| 75 | 56 | ||
| @@ -79,8 +60,6 @@ do { \ | |||
| 79 | __this_cpu_inc(kstat.irqs_sum); \ | 60 | __this_cpu_inc(kstat.irqs_sum); \ |
| 80 | } while (0) | 61 | } while (0) |
| 81 | 62 | ||
| 82 | #endif | ||
| 83 | |||
| 84 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) | 63 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) |
| 85 | { | 64 | { |
| 86 | __this_cpu_inc(kstat.softirqs[irq]); | 65 | __this_cpu_inc(kstat.softirqs[irq]); |
| @@ -94,20 +73,7 @@ static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) | |||
| 94 | /* | 73 | /* |
| 95 | * Number of interrupts per specific IRQ source, since bootup | 74 | * Number of interrupts per specific IRQ source, since bootup |
| 96 | */ | 75 | */ |
| 97 | #ifndef CONFIG_GENERIC_HARDIRQS | ||
| 98 | static inline unsigned int kstat_irqs(unsigned int irq) | ||
| 99 | { | ||
| 100 | unsigned int sum = 0; | ||
| 101 | int cpu; | ||
| 102 | |||
| 103 | for_each_possible_cpu(cpu) | ||
| 104 | sum += kstat_irqs_cpu(irq, cpu); | ||
| 105 | |||
| 106 | return sum; | ||
| 107 | } | ||
| 108 | #else | ||
| 109 | extern unsigned int kstat_irqs(unsigned int irq); | 76 | extern unsigned int kstat_irqs(unsigned int irq); |
| 110 | #endif | ||
| 111 | 77 | ||
| 112 | /* | 78 | /* |
| 113 | * Number of interrupts per cpu, since bootup | 79 | * Number of interrupts per cpu, since bootup |
