Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Fri, 27 Mar 2009
 04:46:31 -0700
Received: from psmtp.com ([64.18.0.87]) by mail.onstor.com with Microsoft
 SMTPSVC(6.0.3790.3959);	 Fri, 27 Mar 2009 04:46:22 -0700
Received: from source ([213.58.128.207]) by exprod5mx264.postini.com
 ([64.18.4.13]) with SMTP;	Fri, 27 Mar 2009 05:46:23 MDT
Received: from localhost.localdomain ([127.0.0.1]:27106 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S20023151AbZC0Lju
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Fri, 27 Mar 2009 11:39:50 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 27 Mar 2009 11:39:33
 +0000 (GMT)
Received: from gw03.mail.saunalahti.fi ([195.197.172.111]:43915 "EHLO
	gw03.mail.saunalahti.fi") by ftp.linux-mips.org with ESMTP	id
 S20021288AbZC0Lj0 (ORCPT <rfc822;linux-mips@linux-mips.org>);	Fri, 27 Mar
 2009 11:39:26 +0000
Received: from localhost.localdomain (a88-114-245-69.elisa-laajakaista.fi
 [88.114.245.69])	by gw03.mail.saunalahti.fi (Postfix) with ESMTP id
 8DE65216792;	Fri, 27 Mar 2009 13:39:20 +0200 (EET)
From: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
To: "ralf@linux-mips.org" <ralf@linux-mips.org>, "linux-mips@linux-mips.org"
	<linux-mips@linux-mips.org>, "linux-kernel@vger.kernel.org"
	<linux-kernel@vger.kernel.org>
CC: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Fri, 27 Mar 2009 04:39:11 -0700
Subject: [PATCH 1/1] [MIPS] ip22: use a generic method for irq statistics
Thread-Topic: [PATCH 1/1] [MIPS] ip22: use a generic method for irq
 statistics
Thread-Index: Acmu0axefOWnqeQBTtG+8B5cjoNw+w==
Message-ID: <1238153951-18307-1-git-send-email-dmitri.vorobiev@movial.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 27 Mar 2009 11:46:22.0986 (UTC)
 FILETIME=[A6FE6EA0:01C9AED1]
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:90.25942/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-neptune: 1/1/1.00/94
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: 6ZjiskfXmSoHndHMa5+mLQ==
x-list: linux-mips
x-archive-position: 22158
x-ecartis-version: Ecartis v1.0.0
x-original-sender: dmitri.vorobiev@movial.com
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

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 =3D SGI_BUSERR_IRQ;
+	struct irq_desc *desc =3D irq_to_desc(irq);
=20
 	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 =3D SGI_8254_0_IRQ;
+	struct irq_desc *desc =3D irq_to_desc(irq);
 	ULONG cnt;
 	char c;
=20
 	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();
--=20
1.5.6.3


