Subject: [PATCH] ppc32: minor arch/ppc/syslib/xilinx_pic.c cleanups

From: Andrei Konovalov <[email-masked]>
Date: Wed, 29 Jun 2005 20:57:05 +0400

For level sensitive interrupts the patch moves unmasking the interrupt behind
acknowledging it. It seems not to change anything in practice (experimented with
the ethernet a little bit), but looks more logical IMHO.

The second hunk removes two lines that do nothing.

Signed-off-by: Andrei Konovalov <[email-masked]>

diff -Nupr a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c
--- a/arch/ppc/syslib/xilinx_pic.c	2005-06-23 15:32:18.000000000 +0400
+++ b/arch/ppc/syslib/xilinx_pic.c	2005-06-29 18:28:44.000000000 +0400
@@ -71,10 +71,11 @@ xilinx_intc_end(unsigned int irq)
 
 	pr_debug("end: %d\n", irq);
 	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
-		intc_out_be32(intc + SIE, mask);
 		/* ack level sensitive intr */
 		if (irq_desc[irq].status & IRQ_LEVEL)
 			intc_out_be32(intc + IAR, mask);
+		/* unmask the interrupt */
+		intc_out_be32(intc + SIE, mask);
 	}
 }
 
@@ -101,8 +102,6 @@ xilinx_pic_get_irq(struct pt_regs *regs)
 	 */
 
 	irq = intc_in_be32(intc + IVR);
-	if (irq != -1)
-		irq = irq;
 
 	pr_debug("get_irq: %d\n", irq);