Messages in this thread | | | Date | Wed, 7 Oct 2009 12:07:56 +0200 | From | Uwe Kleine-König <> | Subject | Using set_irq_handler in set_irq_type callback? |
| |
Hallo,
I'm seeing an imx31 (ARCH=arm) based system failing to boot .31.2-rt13.
The reason is that the irq for the ethernet device is level triggered, but the handler for that interrupt is handle_edge_irq. As the handler is threaded with PREEMPT_RT=y, the irq is only acked but neither masked (as it is believed to be an edge irq) nor handled. This stucks the machine as the irq is still active.
I think the fix for that is adding something like:
if (type & IRQ_TYPE_EDGE_BOTH) set_irq_handler(irq, handle_edge_irq); else set_irq_handler(irq, handle_level_irq);
to the chip's .set_type callback. (Doing this directly fails, as .set_type holds desc->lock which set_irq_handler acquires, too. So maybe I need to code up a handler that checks how a given irq triggers and then calls handle_edge_irq or handle_level_irq.)
The thing that let's me question that change is that I only found[1] a single .set_type callback that does something like that (i.e. arch/blackfin/mach-common/ints-priority.c).
Do I just miss something or are there more than one platforms that are in the need of handling this issue, too?
Best regards Uwe
[1] checking files found by
git grep -c set_irq_handler | awk -F: '$2 >= 2'
-- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |