linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: when to use devm_request_irq and irq_set_chained_handler_and_data
Date: Wed, 07 Oct 2015 17:27:08 +0100	[thread overview]
Message-ID: <561547DC.2030409@arm.com> (raw)
In-Reply-To: <8520D5D51A55D047800579B09414719801690865@XAP-PVEXMBX01.xlnx.xilinx.com>

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...

      reply	other threads:[~2015-10-07 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 15:29 when to use devm_request_irq and irq_set_chained_handler_and_data bharat kumar gogada
2015-10-07 15:43 ` Marc Zyngier
2015-10-07 16:07   ` Bharat Kumar Gogada
2015-10-07 16:27     ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561547DC.2030409@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).