Skip to content

Commit

Permalink
sparc64: Fix wedged irq regression.
Browse files Browse the repository at this point in the history
Kernel bugzilla 10273

As reported by Jos van der Ende, ever since commit
5a606b7 ("[SPARC64]: Do not ACK an
INO if it is disabled or inprogress.") sun4u interrupts
can get stuck.

What this changset did was add the following conditional to
the various IRQ chip ->enable() handlers on sparc64:

	if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
		return;

which is correct, however it means that special care is needed
in the ->enable() method.

Specifically we must put the interrupt into IDLE state during
an enable, or else it might never be sent out again.

Setting the INO interrupt state to IDLE resets the state machine,
the interrupt input to the INO is retested by the hardware, and
if an interrupt is being signalled by the device, the INO
moves back into TRANSMIT state, and an interrupt vector is sent
to the cpu.

The two sun4v IRQ chip handlers were already doing this properly,
only sun4u got it wrong.

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Apr 27, 2008
1 parent c3bf9bc commit 227c331
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/sparc64/kernel/irq.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* irq.c: UltraSparc IRQ handling/init/registry.
*
* Copyright (C) 1997, 2007 David S. Miller ([email protected])
* Copyright (C) 1997, 2007, 2008 David S. Miller ([email protected])
* Copyright (C) 1998 Eddie C. Dost ([email protected])
* Copyright (C) 1998 Jakub Jelinek ([email protected])
*/
Expand Down Expand Up @@ -308,6 +308,7 @@ static void sun4u_irq_enable(unsigned int virt_irq)
IMAP_AID_SAFARI | IMAP_NID_SAFARI);
val |= tid | IMAP_VALID;
upa_writeq(val, imap);
upa_writeq(ICLR_IDLE, data->iclr);
}
}

Expand Down

0 comments on commit 227c331

Please sign in to comment.