linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* gt64260_mask_irq bug fix
@ 2003-03-11 19:46 Dale Farnsworth
  0 siblings, 0 replies; only message in thread
From: Dale Farnsworth @ 2003-03-11 19:46 UTC (permalink / raw)
  To: linuxppc-dev


This patch two fixes.
First, it removes the spinlock calls from gt64260_unmask_irq and
gt64260_mask_irq.  I was the one who added these in a misguided
attempt to fix the problem addressed by the second fix.

Second, after the irq is masked, we wait for the gt64260's internal
pipeline to drain before returning.  Apparently this bit someone
on irq 36, but it is necessary for all irqs.

-Dale

Patch vs. linuxppc_2_4_devel

===== gt64260_pic.c 1.10 vs edited =====
--- 1.10/arch/ppc/kernel/gt64260_pic.c	Fri Feb 28 10:31:00 2003
+++ edited/gt64260_pic.c	Tue Mar 11 12:28:10 2003
@@ -283,10 +283,7 @@
 void
 gt64260_unmask_irq(unsigned int irq)
 {
-    	unsigned long flags;
-
 	irq -= gt64260_irq_base;
-	spin_lock_irqsave(&gt64260_lock, flags);

 	if (irq > 31) {
 		if (irq > 63) {
@@ -304,7 +301,6 @@
 		set_bit(irq, &ppc_cached_irq_mask[0]);
 		gt_write(GT64260_IC_CPU_INTR_MASK_LO, ppc_cached_irq_mask[0]);
 	}
-	spin_unlock_irqrestore(&gt64260_lock, flags);
 }


@@ -325,10 +321,8 @@
 static void
 gt64260_mask_irq(unsigned int irq)
 {
-    	unsigned long flags;
-
 	irq -= gt64260_irq_base;
-	spin_lock_irqsave(&gt64260_lock, flags);
+
 	if (irq > 31) {
 		if (irq > 63) {
 			/* mask GPP irq */
@@ -345,11 +339,12 @@
 		clear_bit(irq, &ppc_cached_irq_mask[0]);
 		gt_write(GT64260_IC_CPU_INTR_MASK_LO, ppc_cached_irq_mask[0]);
 	}
-	spin_unlock_irqrestore(&gt64260_lock, flags);
-
-	if (irq == 36) { /* Seems necessary for SDMA interrupts */
-		udelay(1);
-	}
+	/*
+	 * Need to drain the gt64260 pipeline to ensure that the irq has
+	 * been masked before returning.  Reading any gt64260 register
+	 * is sufficient.
+	 */
+	(void) gt_read(GT64260_GPP_INTR_MASK);
 }


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-11 19:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-11 19:46 gt64260_mask_irq bug fix Dale Farnsworth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).