aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel_stat.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-01-07 18:03:13 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-10 22:46:26 -0500
commitd7e51e66899f95dabc89b4d4c6674a6e50fa37fc (patch)
tree5b4cc72a4e411d6962ce9ce7258abf2bac0204d4 /include/linux/kernel_stat.h
parente8b722f487589a1f60ca27adc695494f188d404e (diff)
sparseirq: make some func to be used with genirq
Impact: clean up sparseirq fallout on random.c Ingo suggested to change some ifdef from SPARSE_IRQ to GENERIC_HARDIRQS so we could some #ifdef later if all arch support genirq Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r--include/linux/kernel_stat.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index 570d20413119..a3431b164bea 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -28,7 +28,7 @@ struct cpu_usage_stat {
28 28
29struct kernel_stat { 29struct kernel_stat {
30 struct cpu_usage_stat cpustat; 30 struct cpu_usage_stat cpustat;
31#ifndef CONFIG_SPARSE_IRQ 31#ifndef CONFIG_GENERIC_HARDIRQS
32 unsigned int irqs[NR_IRQS]; 32 unsigned int irqs[NR_IRQS];
33#endif 33#endif
34}; 34};
@@ -41,7 +41,7 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
41 41
42extern unsigned long long nr_context_switches(void); 42extern unsigned long long nr_context_switches(void);
43 43
44#ifndef CONFIG_SPARSE_IRQ 44#ifndef CONFIG_GENERIC_HARDIRQS
45#define kstat_irqs_this_cpu(irq) \ 45#define kstat_irqs_this_cpu(irq) \
46 (kstat_this_cpu.irqs[irq]) 46 (kstat_this_cpu.irqs[irq])
47 47
@@ -55,7 +55,7 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
55#endif 55#endif
56 56
57 57
58#ifndef CONFIG_SPARSE_IRQ 58#ifndef CONFIG_GENERIC_HARDIRQS
59static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) 59static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
60{ 60{
61 return kstat_cpu(cpu).irqs[irq]; 61 return kstat_cpu(cpu).irqs[irq];