public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: steve@digidescorp.com
To: microblaze-uclinux@itee.uq.edu.au
Cc: monstr@monstr.eu, linux-kernel@vger.kernel.org,
	"Steven J. Magnani" <steve@digidescorp.com>
Subject: [PATCH, RESEND] microblaze: Fix level interrupt ACKing
Date: Tue, 17 Nov 2009 08:43:39 -0600	[thread overview]
Message-ID: <1258469019-3863-1-git-send-email-steve@digidescorp.com> (raw)

Level interrupts need to be ack'd in the unmask handler, as in powerpc. 
Among other issues, this bug causes the system clock to appear to run at 
double-speed.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
---
diff -uprN a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c
--- a/arch/microblaze/kernel/intc.c	2009-06-02 15:26:28.000000000 -0500
+++ b/arch/microblaze/kernel/intc.c	2009-06-02 15:27:39.000000000 -0500
@@ -41,8 +41,16 @@ unsigned int nr_irq;
 
 static void intc_enable_or_unmask(unsigned int irq)
 {
+	unsigned long mask = 1 << irq;
 	pr_debug("enable_or_unmask: %d\n", irq);
-	out_be32(INTC_BASE + SIE, 1 << irq);
+	out_be32(INTC_BASE + SIE, mask);
+
+	/* ack level irqs because they can't be acked during
+	 * ack function since the handle_level_irq function
+	 * acks the irq before calling the interrupt handler
+	 */
+	if (irq_desc[irq].status & IRQ_LEVEL)
+		out_be32(INTC_BASE + IAR, mask);
 }
 
 static void intc_disable_or_mask(unsigned int irq)


             reply	other threads:[~2009-11-17 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 14:43 steve [this message]
2009-11-20 11:07 ` [PATCH, RESEND] microblaze: Fix level interrupt ACKing Michal Simek
2009-11-20 18:49   ` Steven J. Magnani
2009-11-24 12:45     ` Michal Simek

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=1258469019-3863-1-git-send-email-steve@digidescorp.com \
    --to=steve@digidescorp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=microblaze-uclinux@itee.uq.edu.au \
    --cc=monstr@monstr.eu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox