Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f95ec9e authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

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: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3060d6fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -526,7 +526,7 @@ static void do_irq_balance(void)
			if (package_index == i)
				IRQ_DELTA(package_index, j) = 0;
			/* Determine the total count per processor per IRQ */
			value_now = (unsigned long) kstat_cpu(i).irqs[j];
			value_now = (unsigned long) kstat_irqs_cpu(j, i);

			/* Determine the activity per processor per IRQ */
			delta = value_now - LAST_CPU_IRQ(i, j);
+2 −2
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ int show_interrupts(struct seq_file *p, void *v)
		any_count = kstat_irqs(i);
#else
		for_each_online_cpu(j)
			any_count |= kstat_cpu(j).irqs[i];
			any_count |= kstat_irqs_cpu(i, j);
#endif
		action = desc->action;
		if (!action && !any_count)
@@ -290,7 +290,7 @@ int show_interrupts(struct seq_file *p, void *v)
		seq_printf(p, "%10u ", kstat_irqs(i));
#else
		for_each_online_cpu(j)
			seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
			seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
#endif
		seq_printf(p, " %8s", desc->chip->name);
		seq_printf(p, "-%-8s", desc->name);
+2 −2
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ int show_interrupts(struct seq_file *p, void *v)
		any_count = kstat_irqs(i);
#else
		for_each_online_cpu(j)
			any_count |= kstat_cpu(j).irqs[i];
			any_count |= kstat_irqs_cpu(i, j);
#endif
		action = desc->action;
		if (!action && !any_count)
@@ -100,7 +100,7 @@ int show_interrupts(struct seq_file *p, void *v)
		seq_printf(p, "%10u ", kstat_irqs(i));
#else
		for_each_online_cpu(j)
			seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
			seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
#endif
		seq_printf(p, " %8s", desc->chip->name);
		seq_printf(p, "-%-8s", desc->name);
+1 −1
Original line number Diff line number Diff line
@@ -633,7 +633,7 @@ static irqreturn_t piix4_master_intr(int irq, void *dev_id)
	/*
	 * handle this 'virtual interrupt' as a Cobalt one now.
	 */
	kstat_cpu(smp_processor_id()).irqs[realirq]++;
	kstat_irqs_this_cpu(desc)++;

	if (likely(desc->action != NULL))
		handle_IRQ_event(realirq, desc->action);
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ static noinline int xen_spin_lock_slow(struct raw_spinlock *lock, bool irq_enabl
		ADD_STATS(taken_slow_spurious, !xen_test_irq_pending(irq));
	} while (!xen_test_irq_pending(irq)); /* check for spurious wakeups */

	kstat_this_cpu.irqs[irq]++;
	kstat_irqs_this_cpu(irq_to_desc(irq))++;

out:
	raw_local_irq_restore(flags);
Loading