Skip to contentSkip to conversation

ppc32: minor arch/ppc/syslib/xilinx_pic.c cleanups

PATCH New Andrei Konovalov 1 participant 1 message Jun 29, 2005 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32: minor arch/ppc/syslib/xilinx_pic.c cleanups

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.

arch/ppc/syslib/xilinx_pic.c +2 -3
diff -Nupr a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c
@@ -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);