summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-25 12:41:19 -0700
committerIngo Molnar <mingo@elte.hu>2008-10-16 16:53:04 +0200
commit8c464a4b23ca283b414022ebc77787f3c7040fa7 (patch)
tree1d62a78b0af21492289d015c81270683f6bbe0bd /include
parente492c5ae85428d4a3815d06bf308c590120b928b (diff)
downloadlinux-8c464a4b23ca283b414022ebc77787f3c7040fa7.tar.gz
linux-8c464a4b23ca283b414022ebc77787f3c7040fa7.tar.bz2
linux-8c464a4b23ca283b414022ebc77787f3c7040fa7.zip
sparseirq: move kstat_irqs from kstat to irq_desc - fix
fix non-sparseirq architectures. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/irq.h4
-rw-r--r--include/linux/kernel_stat.h10
2 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 2445d2b3d5dc..93fe9a943e71 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -161,8 +161,6 @@ struct irq_desc {
#endif
#ifdef CONFIG_HAVE_DYN_ARRAY
unsigned int *kstat_irqs;
-#else
- unsigned int kstat_irqs[NR_CPUS];
#endif
#if defined(CONFIG_INTR_REMAP) && defined(CONFIG_HAVE_SPARSE_IRQ)
struct irq_2_iommu *irq_2_iommu;
@@ -219,8 +217,10 @@ extern struct irq_desc *sparse_irqs;
#endif
+#ifdef CONFIG_HAVE_DYN_ARRAY
#define kstat_irqs_this_cpu(DESC) \
((DESC)->kstat_irqs[smp_processor_id()])
+#endif
/*
* Migration helpers for obsolete names, they will go away:
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index f10616712de5..21249d8c1293 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -28,7 +28,7 @@ struct cpu_usage_stat {
struct kernel_stat {
struct cpu_usage_stat cpustat;
-#ifndef CONFIG_GENERIC_HARDIRQS
+#ifndef CONFIG_HAVE_DYN_ARRAY
unsigned int irqs[NR_IRQS];
#endif
};
@@ -41,7 +41,13 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
extern unsigned long long nr_context_switches(void);
-#ifndef CONFIG_GENERIC_HARDIRQS
+#ifndef CONFIG_HAVE_DYN_ARRAY
+#define kstat_irqs_this_cpu(irq) \
+ (kstat_this_cpu.irqs[irq])
+#endif
+
+
+#ifndef CONFIG_HAVE_DYN_ARRAY
static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
{
return kstat_cpu(cpu).irqs[irq];