From c313bbf03c19105d1499865c5c3fec9c2caa6b0c Mon Sep 17 00:00:00 2001 From: Dmitri Vorobiev Date: Fri, 27 Mar 2009 13:39:11 +0200 Subject: [PATCH] MIPS: IP22: Use a generic method for irq statistics The structure 'struct kernel_stat' defines the 'irqs' array as its field only when CONFIG_GENERIC_HARDIRQS is not set. However, the ip22 code makes use of this field unconditionally. As the result, the following build error is produced: CC arch/mips/sgi-ip22/ip22-int.o arch/mips/sgi-ip22/ip22-int.c: In function 'indy_buserror_irq': arch/mips/sgi-ip22/ip22-int.c:158: error: 'struct kernel_stat' has no member named 'irqs' make[1]: *** [arch/mips/sgi-ip22/ip22-int.o] Error 1 make: *** [arch/mips/sgi-ip22] Error 2 This patch fixes the build error by using the generic method for the irq statistics. Signed-off-by: Dmitri Vorobiev Signed-off-by: Ralf Baechle --- arch/mips/sgi-ip22/ip22-int.c | 3 ++- arch/mips/sgi-ip22/ip22-time.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index f8b18af141a..e359ee8d6c1 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c @@ -153,9 +153,10 @@ extern void ip22_be_interrupt(int irq); static void indy_buserror_irq(void) { int irq = SGI_BUSERR_IRQ; + struct irq_desc *desc = irq_to_desc(irq); irq_enter(); - kstat_this_cpu.irqs[irq]++; + kstat_incr_irqs_this_cpu(irq, desc); ip22_be_interrupt(irq); irq_exit(); } diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c index 3dcb27ec0c5..2536d78e8ac 100644 --- a/arch/mips/sgi-ip22/ip22-time.c +++ b/arch/mips/sgi-ip22/ip22-time.c @@ -118,11 +118,12 @@ __init void plat_time_init(void) void indy_8254timer_irq(void) { int irq = SGI_8254_0_IRQ; + struct irq_desc *desc = irq_to_desc(irq); ULONG cnt; char c; irq_enter(); - kstat_this_cpu.irqs[irq]++; + kstat_incr_irqs_this_cpu(irq, desc); printk(KERN_ALERT "Oops, got 8254 interrupt.\n"); ArcRead(0, &c, 1, &cnt); ArcEnterInteractiveMode(); -- 2.11.4.GIT