m68k: Revive reporting of spurious interrupts
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 13 Jul 2011 18:29:24 +0000 (20:29 +0200)
committerGreg Ungerer <gerg@uclinux.org>
Mon, 25 Jul 2011 01:20:41 +0000 (11:20 +1000)
commit 2502b667ea835ee16685c74b2a0d89ba8afe117a ("Change the m68knommu irq
handling to use the generic irq framework.") removed the reporting of spurious
interrupts on nommu (68328 and 68360).

Bring it back in a generic way, using "atomic_t irq_err_count", as that's what
most of the other architectures are using.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68k/kernel/irq.c
arch/m68k/platform/68328/entry.S
arch/m68k/platform/68328/ints.c
arch/m68k/platform/68360/entry.S
arch/m68k/platform/68360/ints.c

index 544b8717d49913bff339695db2d25f255d4734a1..c73988cfa90f113383b3012111810b8f8c06cb8d 100644 (file)
@@ -28,3 +28,13 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
 
        set_irq_regs(oldregs);
 }
+
+
+/* The number of spurious interrupts */
+atomic_t irq_err_count;
+
+int arch_show_interrupts(struct seq_file *p, int prec)
+{
+       seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
+       return 0;
+}
index 4ed7a65d5aa0124b33b64bece72e13d3d86a19cb..293e1eba9accd3551f5d266704a7ffefda4c02ec 100644 (file)
@@ -236,7 +236,7 @@ ret_from_interrupt:
  * Handler for uninitialized and spurious interrupts.
  */
 ENTRY(bad_interrupt)
-       addql   #1,num_spurious
+       addql   #1,irq_err_count
        rte
 
 /*
index 22acb60b541a16f715e59e80c039a13423e5af97..4bd456531f91eeed395b76c1f168d420ec8172d7 100644 (file)
@@ -70,9 +70,6 @@ asmlinkage irqreturn_t inthandler7(void);
 
 extern e_vector *_ramvec;
 
-/* The number of spurious interrupts */
-volatile unsigned int num_spurious;
-
 /* The 68k family did not have a good way to determine the source
  * of interrupts until later in the family.  The EC000 core does
  * not provide the vector number on the stack, we vector everything
index 0ede6702127a552c325b4d2b336f56c9f65fda6d..abbb89672ea02789b4364b7c261e0f3cd2a5f53a 100644 (file)
@@ -157,7 +157,7 @@ ret_from_interrupt:
  * Handler for uninitialized and spurious interrupts.
  */
 bad_interrupt:
-       addql   #1,num_spurious
+       addql   #1,irq_err_count
        rte
 
 /*
index 44443820d208abd0a40d25697e238f19c978b37a..7b40202d96385feba6879666db7b999dc48b02bb 100644 (file)
@@ -34,9 +34,6 @@ asmlinkage void inthandler(void);
 
 extern void *_ramvec[];
 
-/* The number of spurious interrupts */
-volatile unsigned int num_spurious;
-
 static void intc_irq_unmask(struct irq_data *d)
 {
        pquicc->intr_cimr |= (1 << d->irq);