All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: Nathan Monson <nmonson@gmail.com>,
	lauri.leukkunen@nokia.com, Paul Walmsley <paul@pwsan.com>,
	Richard Woodruff <r-woodruff2@ti.com>,
	Rick Bronson <rick@efn.org>
Subject: ARM: OMAP3: Fix get_irqnr_and_base to clear spurious interrupt bits
Date: Mon, 20 Oct 2008 21:58:10 -0700	[thread overview]
Message-ID: <20081021045809.GJ7341@atomide.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

Hi all,

Here's a bug fix for the irq -33 issue. So far it looks like the irq
spurious bits just tell that the irq sorting is invalid.

This patch applies after undoing Lauri's patch
5dc857b34441d5c0989b68bf3a488f89983b2645.

Looks like there are still occasional spurious GPT12 interrupts, so
I'm now looking into that.

Regards,

Tony

[-- Attachment #2: 0003-ARM-OMAP3-Fix-get_irqnr_and_base-to-clear-spurious-v2.patch --]
[-- Type: text/x-diff, Size: 1630 bytes --]

commit 3e4291d575f7d694ae1d974a17b4e077b7b721de
Author: Tony Lindgren <tony@atomide.com>
Date:   Mon Oct 20 14:04:52 2008 -0700

    ARM: OMAP3: Fix get_irqnr_and_base to clear spurious interrupt bits
    
    On omap24xx, INTCPS_SIR_IRQ_OFFSET bits [6:0] contains the current
    active interrupt number.
    
    However, on 34xx INTCPS_SIR_IRQ_OFFSET bits [31:7] also contains the
    SPURIOUSIRQFLAG, which gets set if the interrupt sorting information
    is invalid.
    
    If the SPURIOUSIRQFLAG bits are not ignored, the interrupt code will
    occasionally produce a bunch of confusing errors:
    
    irq -33, desc: c02ddcc8, depth: 0, count: 0, unhandled: 0
    ->handle_irq():  c006f23c, handle_bad_irq+0x0/0x22c
    ->chip(): 00000000, 0x0
    ->action(): 00000000
    
    Fix this by masking out only the ACTIVEIRQ bits. Also fix a
    confusing comment.
    
    Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S
index a8fca9d..47aa62c 100644
--- a/arch/arm/plat-omap/include/mach/entry-macro.S
+++ b/arch/arm/plat-omap/include/mach/entry-macro.S
@@ -65,7 +65,8 @@
 #include <mach/omap34xx.h>
 #endif
 
-#define INTCPS_SIR_IRQ_OFFSET	0x0040		/* Active interrupt number */
+#define INTCPS_SIR_IRQ_OFFSET	0x0040		/* Active interrupt offset */
+#define	ACTIVEIRQ_MASK		0x7f		/* Active interrupt bits */
 
 		.macro	disable_fiq
 		.endm
@@ -88,6 +89,7 @@
 		cmp	\irqnr, #0x0
 2222:
 		ldrne	\irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
+		and	\irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */
 
 		.endm
 

             reply	other threads:[~2008-10-21  4:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21  4:58 Tony Lindgren [this message]
2008-10-21 20:09 ` ARM: OMAP3: Fix get_irqnr_and_base to clear spurious interrupt bits Felipe Contreras
2008-10-21 20:37   ` Tony Lindgren
2008-10-21 21:34     ` Felipe Contreras
2008-10-21 22:02       ` Tony Lindgren
2008-10-21 23:25         ` Tony Lindgren
2008-10-22 14:46         ` Felipe Contreras
2008-10-22 21:30           ` Nathan Monson
2008-10-22 21:40             ` Felipe Contreras
  -- strict thread matches above, loose matches on Subject: below --
2008-10-22 17:48 Rick Bronson
2008-10-22 18:30 ` Tony Lindgren
2008-10-23  3:29 Rick Bronson
2008-10-23 15:43 ` Tony Lindgren
2008-10-23 17:54 Rick Bronson
2008-10-23 18:13 Rick Bronson
2008-10-23 18:21 ` Tony Lindgren
2008-10-24  4:14 Rick Bronson
2008-10-28 16:10 Rick Bronson
2008-10-28 16:31 ` Tony Lindgren
2008-10-31 19:27 ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081021045809.GJ7341@atomide.com \
    --to=tony@atomide.com \
    --cc=lauri.leukkunen@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nmonson@gmail.com \
    --cc=paul@pwsan.com \
    --cc=r-woodruff2@ti.com \
    --cc=rick@efn.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.