From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id fB16nGR20747 for linux-mips-outgoing; Fri, 30 Nov 2001 22:49:16 -0800 Received: from ns1.local (vsat-148-63-243-254.c3.sb4.mrt.starband.net [148.63.243.254]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id fB16mbo20743; Fri, 30 Nov 2001 22:48:40 -0800 Received: from dev1 (unknown [10.1.1.85]) by ns1.local (Postfix) with ESMTP id 86815590A9; Sat, 1 Dec 2001 00:46:41 -0500 (EST) Received: from brad by dev1 with local (Exim 3.32 #1 (Debian)) id 16A2xr-0005mu-00; Sat, 01 Dec 2001 00:45:28 -0500 Date: Sat, 1 Dec 2001 00:45:27 -0500 To: ralf@oss.sgi.com Cc: linux-mips@oss.sgi.com Subject: PATCH: spurious_count cleanup Message-ID: <20011201004526.A22248@dev1.ltc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.20i From: "Bradley D. LaRonde" Sender: owner-linux-mips@oss.sgi.com Precedence: bulk 2001-11-30 Bradley D. LaRonde arch/mips/kernel/irq.c prints irq_err_count, but spurious_interupt incremented spurious_count, not irq_err_count. irq_err_count is used for counting spurious interrupts on other platforms. * increment irq_err_count instead of spurious_count in spurious_interrupt * eliminate spurious_count variable * use common spurious intterrupt handler in au1000 --- arch/mips/au1000/common/int-handler.S 2001/05/18 22:13:23 1.2 +++ arch/mips/au1000/common/int-handler.S 2001/11/30 18:42:05 @@ -65,7 +65,5 @@ 5: move a0, sp - jal mips_spurious_interrupt -done: - j ret_from_irq + j spurious_interrupt END(au1000_IRQ) --- arch/mips/au1000/common/irq.c 2001/10/31 12:47:14 1.8 +++ arch/mips/au1000/common/irq.c 2001/11/30 18:42:05 @@ -84,7 +84,7 @@ inline void local_enable_irq(unsigned int irq_nr); inline void local_disable_irq(unsigned int irq_nr); -unsigned long spurious_interrupts; +volatile unsigned long irq_err_count; extern unsigned int do_IRQ(int irq, struct pt_regs *regs); extern void __init init_generic_irq(void); @@ -455,12 +455,6 @@ set_debug_traps(); breakpoint(); #endif -} - - -void mips_spurious_interrupt(struct pt_regs *regs) -{ - spurious_interrupts++; } --- arch/mips/baget/irq.c 2001/03/12 02:46:14 1.12 +++ arch/mips/baget/irq.c 2001/11/30 18:42:05 @@ -27,7 +27,7 @@ #include -unsigned long spurious_count = 0; +volatile unsigned long irq_err_count; /* * This table is a correspondence between IRQ numbers and CPU PILs --- arch/mips/dec/irq.c 2001/09/27 23:45:52 1.16 +++ arch/mips/dec/irq.c 2001/11/30 18:42:05 @@ -34,7 +34,7 @@ extern asmlinkage void decstation_handle_int(void); -unsigned long spurious_count = 0; +volatile unsigned long irq_err_count; static inline void mask_irq(unsigned int irq_nr) { --- arch/mips/galileo-boards/ev64120/irq.c 2001/11/05 20:15:26 1.6 +++ arch/mips/galileo-boards/ev64120/irq.c 2001/11/30 18:42:05 @@ -189,7 +189,7 @@ */ irq_desc_t irq_desc[NR_IRQS]; -unsigned long spurious_count = 0; +volatile unsigned long irq_err_count; int get_irq_list(char *buf) { @@ -219,7 +219,7 @@ } len += sprintf(buf + len, "\n"); } - len += sprintf(buf + len, "BAD: %10lu\n", spurious_count); + len += sprintf(buf + len, "BAD: %10lu\n", irq_err_count); return len; } --- arch/mips/galileo-boards/ev96100/irq.c 2001/11/30 13:28:06 1.10 +++ arch/mips/galileo-boards/ev96100/irq.c 2001/11/30 18:42:06 @@ -64,7 +64,7 @@ extern asmlinkage void ev96100IRQ(void); unsigned int local_bh_count[NR_CPUS]; unsigned int local_irq_count[NR_CPUS]; -unsigned long spurious_count = 0; +volatile unsigned long irq_err_count; irq_desc_t irq_desc[NR_IRQS]; irq_desc_t *irq_desc_base=&irq_desc[0]; @@ -153,7 +153,7 @@ } len += sprintf(buf+len, "\n"); } - len += sprintf(buf+len, "BAD: %10lu\n", spurious_count); + len += sprintf(buf+len, "BAD: %10lu\n", irq_err_count); return len; } @@ -210,7 +210,7 @@ } else { - spurious_count++; + irq_err_count++; printk("Unhandled interrupt %x, cause %x, disabled\n", (unsigned)irq, (unsigned)cause); disable_irq(1<