aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel_stat.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-01-22 03:38:56 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-22 04:18:58 -0500
commitd52a61c04c6c0814ca270a088feedb126436598e (patch)
treec216da41e04b856d639cc8b85e3b495cb1e240e4 /include/linux/kernel_stat.h
parente81838d2555e77c893f720c25bfb0c0e5782ef57 (diff)
irq: clean up irq stat methods
David Miller suggested, related to a kstat_irqs related build breakage: > Either linux/kernel_stat.h provides the kstat_incr_irqs_this_cpu > interface or linux/irq.h does, not both. So move them to kernel_stat.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r--include/linux/kernel_stat.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index a3431b164bea..0c8b89f28a95 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -52,16 +52,19 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
52{ 52{
53 kstat_this_cpu.irqs[irq]++; 53 kstat_this_cpu.irqs[irq]++;
54} 54}
55#endif
56
57 55
58#ifndef CONFIG_GENERIC_HARDIRQS
59static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) 56static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
60{ 57{
61 return kstat_cpu(cpu).irqs[irq]; 58 return kstat_cpu(cpu).irqs[irq];
62} 59}
63#else 60#else
61#include <linux/irq.h>
64extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); 62extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
63#define kstat_irqs_this_cpu(DESC) \
64 ((DESC)->kstat_irqs[smp_processor_id()])
65#define kstat_incr_irqs_this_cpu(irqno, DESC) \
66 ((DESC)->kstat_irqs[smp_processor_id()]++)
67
65#endif 68#endif
66 69
67/* 70/*