linux-mips
[Top] [All Lists]

[PATCH 1/1] [MIPS] ip22: use a generic method for irq statistics

To: ralf@linux-mips.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] [MIPS] ip22: use a generic method for irq statistics
From: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Date: Fri, 27 Mar 2009 13:39:11 +0200
Cc: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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 <dmitri.vorobiev@movial.com>
---
 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 f8b18af..e359ee8 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 3dcb27e..2536d78 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();
-- 
1.5.6.3


<Prev in Thread] Current Thread [Next in Thread>