lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1238153951-18307-1-git-send-email-dmitri.vorobiev@movial.com>
Date:	Fri, 27 Mar 2009 13:39:11 +0200
From:	Dmitri Vorobiev <dmitri.vorobiev@...ial.com>
To:	ralf@...ux-mips.org, linux-mips@...ux-mips.org,
	linux-kernel@...r.kernel.org
Cc:	Dmitri Vorobiev <dmitri.vorobiev@...ial.com>
Subject: [PATCH 1/1] [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 <dmitri.vorobiev@...ial.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ