aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:09 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:32 -0400
commit7f95ec9e4c12fd067febfd57532da1166d75d858 (patch)
treeb395b6776485f60e3f5d9d820ad665161ef76771 /arch
parent3060d6fe28570640c2d7d66d38b9eaa848c3b9e3 (diff)
x86: move kstat_irqs from kstat to irq_desc
based on Eric's patch ... together mold it with dyn_array for irq_desc, will allcate kstat_irqs for nr_irq_desc alltogether if needed. -- at that point nr_cpus is known already. v2: make sure system without generic_hardirqs works they don't have irq_desc v3: fix merging v4: [mingo@elte.hu] fix typo [ mingo@elte.hu ] irq: build fix fix: arch/x86/xen/spinlock.c: In function 'xen_spin_lock_slow': arch/x86/xen/spinlock.c:90: error: 'struct kernel_stat' has no member named 'irqs' Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/io_apic_32.c2
-rw-r--r--arch/x86/kernel/irq_32.c4
-rw-r--r--arch/x86/kernel/irq_64.c4
-rw-r--r--arch/x86/kernel/visws_quirks.c2
-rw-r--r--arch/x86/xen/spinlock.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index c2160cfdec9b..204884b1415a 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -526,7 +526,7 @@ static void do_irq_balance(void)
526 if (package_index == i) 526 if (package_index == i)
527 IRQ_DELTA(package_index, j) = 0; 527 IRQ_DELTA(package_index, j) = 0;
528 /* Determine the total count per processor per IRQ */ 528 /* Determine the total count per processor per IRQ */
529 value_now = (unsigned long) kstat_cpu(i).irqs[j]; 529 value_now = (unsigned long) kstat_irqs_cpu(j, i);
530 530
531 /* Determine the activity per processor per IRQ */ 531 /* Determine the activity per processor per IRQ */
532 delta = value_now - LAST_CPU_IRQ(i, j); 532 delta = value_now - LAST_CPU_IRQ(i, j);
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index ede513be517d..576c5df6cad8 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -280,7 +280,7 @@ int show_interrupts(struct seq_file *p, void *v)
280 any_count = kstat_irqs(i); 280 any_count = kstat_irqs(i);
281#else 281#else
282 for_each_online_cpu(j) 282 for_each_online_cpu(j)
283 any_count |= kstat_cpu(j).irqs[i]; 283 any_count |= kstat_irqs_cpu(i, j);
284#endif 284#endif
285 action = desc->action; 285 action = desc->action;
286 if (!action && !any_count) 286 if (!action && !any_count)
@@ -290,7 +290,7 @@ int show_interrupts(struct seq_file *p, void *v)
290 seq_printf(p, "%10u ", kstat_irqs(i)); 290 seq_printf(p, "%10u ", kstat_irqs(i));
291#else 291#else
292 for_each_online_cpu(j) 292 for_each_online_cpu(j)
293 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); 293 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
294#endif 294#endif
295 seq_printf(p, " %8s", desc->chip->name); 295 seq_printf(p, " %8s", desc->chip->name);
296 seq_printf(p, "-%-8s", desc->name); 296 seq_printf(p, "-%-8s", desc->name);
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
index 738eb65a924e..4a0a4eb44dcb 100644
--- a/arch/x86/kernel/irq_64.c
+++ b/arch/x86/kernel/irq_64.c
@@ -90,7 +90,7 @@ int show_interrupts(struct seq_file *p, void *v)
90 any_count = kstat_irqs(i); 90 any_count = kstat_irqs(i);
91#else 91#else
92 for_each_online_cpu(j) 92 for_each_online_cpu(j)
93 any_count |= kstat_cpu(j).irqs[i]; 93 any_count |= kstat_irqs_cpu(i, j);
94#endif 94#endif
95 action = desc->action; 95 action = desc->action;
96 if (!action && !any_count) 96 if (!action && !any_count)
@@ -100,7 +100,7 @@ int show_interrupts(struct seq_file *p, void *v)
100 seq_printf(p, "%10u ", kstat_irqs(i)); 100 seq_printf(p, "%10u ", kstat_irqs(i));
101#else 101#else
102 for_each_online_cpu(j) 102 for_each_online_cpu(j)
103 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); 103 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
104#endif 104#endif
105 seq_printf(p, " %8s", desc->chip->name); 105 seq_printf(p, " %8s", desc->chip->name);
106 seq_printf(p, "-%-8s", desc->name); 106 seq_printf(p, "-%-8s", desc->name);
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index 9d85ab384435..817aa55a1209 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -633,7 +633,7 @@ static irqreturn_t piix4_master_intr(int irq, void *dev_id)
633 /* 633 /*
634 * handle this 'virtual interrupt' as a Cobalt one now. 634 * handle this 'virtual interrupt' as a Cobalt one now.
635 */ 635 */
636 kstat_cpu(smp_processor_id()).irqs[realirq]++; 636 kstat_irqs_this_cpu(desc)++;
637 637
638 if (likely(desc->action != NULL)) 638 if (likely(desc->action != NULL))
639 handle_IRQ_event(realirq, desc->action); 639 handle_IRQ_event(realirq, desc->action);
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index dd71e3a021cd..bb6bc721b13d 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -241,7 +241,7 @@ static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enabl
241 ADD_STATS(taken_slow_spurious, !xen_test_irq_pending(irq)); 241 ADD_STATS(taken_slow_spurious, !xen_test_irq_pending(irq));
242 } while (!xen_test_irq_pending(irq)); /* check for spurious wakeups */ 242 } while (!xen_test_irq_pending(irq)); /* check for spurious wakeups */
243 243
244 kstat_this_cpu.irqs[irq]++; 244 kstat_irqs_this_cpu(irq_to_desc(irq))++;
245 245
246out: 246out:
247 raw_local_irq_restore(flags); 247 raw_local_irq_restore(flags);