Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488688

Re: recommended use of request_any_context_irq()

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: recommended use of request_any_context_irq()
Date 2016-09-22 11:40 +0200
Message-ID <sk8E2-4xk-21@gated-at.bofh.it> (permalink)
References <sjX5U-5Jq-35@gated-at.bofh.it> <sk7oB-3S7-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 22 Sep 2016, Marc Zyngier wrote:
> On 21/09/16 22:14, Leo Li wrote:
> > Hi Marc and Thomas,
> > 
> > With the introduction of request_any_context_irq() routine, driver can
> > deal with interrupt controllers using either threaded irq or normal
> > irq.  But I don't see many drivers that have been changed to use this
> > function to request interrupt.  For on-board devices, the driver
> > normally don't know which kind of interrupt controller they are
> > connected to.  Why don't we make the request_any_context_irq()
> > mandatory or recommended for all drivers?  Is there any drawback for
> > changing all the request_irq() to the request_any_context_irq()?
> 
> In 99.99% of the cases, a device is integrated in one particular way,
> always. For the 0.01% that is left, we have the above API. And if a
> particular device moves from the first category to the second, whoever
> designed the system will change the driver to use this API, and that
> driver only.
> 
> There is strictly no reason to perform a blanket change of all the
> drivers. What would be the reason to change them other than to cater for
> a contrived use case that may never happen?

Aside of that this API is explicitely returning the context type so a
driver can accomodate in which context it runs.

And the difference is not plain interupt or threaded. The difference is
plain interrupt or nested thread. Nested threading happens when the device
sits behind a demultiplex interrupt device, where the demultiplex handler
runs in a thread. So the device handler can reuse the thread context of the
demultiplex handler.

Thanks,

	tglx

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

recommended use of request_any_context_irq() Leo Li <pku.leo@gmail.com> - 2016-09-21 23:20 +0200
  Re: recommended use of request_any_context_irq() Marc Zyngier <marc.zyngier@arm.com> - 2016-09-22 10:20 +0200
    Re: recommended use of request_any_context_irq() Thomas Gleixner <tglx@linutronix.de> - 2016-09-22 11:40 +0200
    Re: recommended use of request_any_context_irq() Leo Li <pku.leo@gmail.com> - 2016-09-22 22:40 +0200
      Re: recommended use of request_any_context_irq() Thomas Gleixner <tglx@linutronix.de> - 2016-09-22 23:00 +0200
        Re: recommended use of request_any_context_irq() Leo Li <pku.leo@gmail.com> - 2016-09-23 00:00 +0200
          Re: recommended use of request_any_context_irq() Thomas Gleixner <tglx@linutronix.de> - 2016-09-23 00:10 +0200

csiph-web