when to use devm_request_irq and irq_set_chained_handler_and_data

Marc Zyngier marc.zyngier at arm.com
Wed Oct 7 09:27:08 PDT 2015


On 07/10/15 17:07, Bharat Kumar Gogada wrote:
> Thanks, as mentioned in your review if have separate irq line which
> our driver consumes and we use devm_request_irq to setup irq line.
> Then can we use the same irq line number to setup chained irqchip but
> will there be two handlers for each of these or we can use the same
> handler.

I'm not sure I understand what you mean here, but let me be clear about
what I want to see in your particular driver:

- if you handle MSIs, you need an MSI domain
- if you call generic_handle_irq(), your need a chained irqchip with its
own irq domain

None of the above cases can be implemented using devm_request_irq, or
request_irq, or setup_irq.

If you have interrupts that are directly consumed by your driver
(because they are interrupts that are unrelated to devices that are on
the PCIe bus), then you can possibly use devm_request_irq.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list