From fb33d3080626f100fe0a3447c497047789ee7f07 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 28 Mar 2009 18:35:41 +0100 Subject: [PATCH] MIPS: Sibyte, SMTC: Use generic method for irq statistics MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The structure 'struct kernel_stat' defines the 'irqs' array as its field only when CONFIG_GENERIC_HARDIRQS is not set. MIPS however sets GENERIC_HARDIRQS for all platforms. As the result, the following build error is produced: CC arch/mips/sibyte/bcm1480/smp.o /home/ralf/src/linux/linux-queue/arch/mips/sibyte/bcm1480/smp.c: In function ‘bcm1480_mailbox_interrupt’: /home/ralf/src/linux/linux-queue/arch/mips/sibyte/bcm1480/smp.c:183: error: ‘struct kernel_stat’ has no member named ‘irqs’ Similar for the other files modified by this patch. This patch fixes the build error by using the generic method for the irq statistics. Signed-off-by: Ralf Baechle --- arch/mips/kernel/smtc.c | 4 +++- arch/mips/sibyte/bcm1480/smp.c | 3 ++- arch/mips/sibyte/sb1250/smp.c | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index b6cca01ff82..35b8ac063b2 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c @@ -917,15 +917,17 @@ DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); void ipi_decode(struct smtc_ipi *pipi) { + struct irq_desc *desc = irq_to_desc(irq); unsigned int cpu = smp_processor_id(); struct clock_event_device *cd; void *arg_copy = pipi->arg; int type_copy = pipi->type; smtc_ipi_nq(&freeIPIq, pipi); + switch (type_copy) { case SMTC_CLOCK_TICK: irq_enter(); - kstat_this_cpu.irqs[MIPS_CPU_IRQ_BASE + 1]++; + kstat_incr_irqs_this_cpu(MIPS_CPU_IRQ_BASE + 1, desc); cd = &per_cpu(mips_clockevent_device, cpu); cd->event_handler(cd); irq_exit(); diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c index dddfda8e829..32938747d99 100644 --- a/arch/mips/sibyte/bcm1480/smp.c +++ b/arch/mips/sibyte/bcm1480/smp.c @@ -177,10 +177,11 @@ struct plat_smp_ops bcm1480_smp_ops = { void bcm1480_mailbox_interrupt(void) { + struct irq_desc *desc = irq_to_desc(irq); int cpu = smp_processor_id(); unsigned int action; - kstat_this_cpu.irqs[K_BCM1480_INT_MBOX_0_0]++; + kstat_incr_irqs_this_cpu(K_BCM1480_INT_MBOX_0_0, desc); /* Load the mailbox register to figure out what we're supposed to do */ action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff; diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c index 5950a288a7d..a76beb551bb 100644 --- a/arch/mips/sibyte/sb1250/smp.c +++ b/arch/mips/sibyte/sb1250/smp.c @@ -165,10 +165,11 @@ struct plat_smp_ops sb_smp_ops = { void sb1250_mailbox_interrupt(void) { + struct irq_desc *desc = irq_to_desc(irq); int cpu = smp_processor_id(); unsigned int action; - kstat_this_cpu.irqs[K_INT_MBOX_0]++; + kstat_incr_irqs_this_cpu(K_INT_MBOX_0, desc); /* Load the mailbox register to figure out what we're supposed to do */ action = (____raw_readq(mailbox_regs[cpu]) >> 48) & 0xffff; -- 2.11.4.GIT