All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Vinod Koul <vinod.koul@intel.com>
Cc: ksummit-discuss@lists.linuxfoundation.org,
	Dave Airlie <airlied@linux.ie>,
	"Nikula, Jani" <jani.nikula@linux.intel.com>,
	Grant Likely <grant.likely@linaro.org>
Subject: Re: [Ksummit-discuss] [CORE TOPIC] (group) maintainership models
Date: Fri, 2 Sep 2016 10:25:09 -0700	[thread overview]
Message-ID: <CA+55aFwSpNrOuOzaR5hh0A1XvuTu0=xVbE_CV1RVf9GMrTPDNQ@mail.gmail.com> (raw)
In-Reply-To: <20160902104619.GD9355@localhost>

On Fri, Sep 2, 2016 at 3:46 AM, Vinod Koul <vinod.koul@intel.com> wrote:
>
> Arm seems to define NO_IRQ. This is not available in other arch and one
> driver (moxart-dma) is using it. I don't see why this should be arm specific.

NO_IRQ is broken. We long long since agreed that 0 is "no irq", and
that the right way to test for it is just

   if (!irq) ...

which is what all the generic drivers use.

See for example

   git grep '(!.*irq)'

for how common that is.

(If you grep for NO_IRQ, you'll find a lot in particularly powerpc
drivers and platforms, but there NO_IRQ is actually just defined to
(0), so it ends up being the same thing).

The fact that ARM still has a NO_IRQ that seems to be defined to
((unsigned int)-1) just means that there are bugs hiding: if ARM
actually _uses_ that value for "no IRQ", then all the generic drivers
will be broken, and if ARM core doesn't, then the drivers that still
use NO_IRQ are broken. Either way you can't win.

So please make sure that NO_IRQ goes away entirely (or, if you insist
on having the confusing #define for some legacy reason, make it be 0
like powerpc, so that the real way of just testing "!irq" also works)

Some people have said "..but but but I have a real irq that has the
value 0", but that's irrelevant - the kernel "irq" value isn't
necessarily the same as the value that an interrupt _controller_ sees,
since the interrupt controller can be hiding behind various other
nested controllers etc. So an architecture might need to translate
"irq" into the actual hw interrupt controller value.

             Linus

  reply	other threads:[~2016-09-02 17:25 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 12:11 [Ksummit-discuss] [CORE TOPIC] (group) maintainership models Daniel Vetter
2016-07-22 20:02 ` Darren Hart
2016-07-25  5:57   ` Daniel Vetter
2016-07-26 16:22     ` Darren Hart
2016-07-28 22:13       ` Bjorn Helgaas
2016-07-26 16:45 ` Olof Johansson
2016-07-27  3:04   ` Vinod Koul
2016-07-27  5:34     ` Wolfram Sang
2016-07-27  7:53     ` Arnd Bergmann
2016-07-27 12:57       ` Vinod Koul
2016-07-27 14:22         ` Mark Brown
2016-07-27 17:15           ` Vinod Koul
2016-07-28  8:44             ` Arnd Bergmann
2016-07-28 23:48               ` Alexandre Belloni
2016-07-29  0:06                 ` Stephen Rothwell
2016-07-31 17:57               ` Vinod Koul
2016-08-01  6:56                 ` Arnd Bergmann
2016-08-01  7:36                   ` Laurent Pinchart
2016-08-01 14:10                     ` Arnd Bergmann
2016-08-02  4:46                       ` Vinod Koul
2016-08-02  6:48                         ` Peter Ujfalusi
2016-08-02  7:27                           ` Arnd Bergmann
2016-08-02  8:29                             ` Peter Ujfalusi
2016-08-02  8:33                           ` Laurent Pinchart
2016-08-02  9:49                             ` Tony Lindgren
2016-08-02  8:41                           ` Russell King - ARM Linux
2016-08-02  9:21                             ` Laurent Pinchart
2016-08-02  9:27                               ` Russell King - ARM Linux
2016-09-02 10:46                   ` Vinod Koul
2016-09-02 17:25                     ` Linus Torvalds [this message]
2016-09-02 20:06                       ` Arnd Bergmann
2016-09-02 20:26                         ` Linus Torvalds
2016-09-02 20:26                           ` Linus Torvalds
2016-09-02 20:43                           ` Julia Lawall
2016-09-02 20:43                             ` Julia Lawall
2016-09-02 20:50                             ` Linus Torvalds
2016-09-02 20:50                               ` Linus Torvalds
2016-09-02 22:16                           ` Benjamin Herrenschmidt
2016-09-02 22:16                             ` Benjamin Herrenschmidt
2016-09-03 14:02                           ` Michael Ellerman
2016-09-03 14:02                             ` Michael Ellerman
2016-09-02 23:35                         ` Arnd Bergmann
2016-09-04 17:45                       ` Geert Uytterhoeven
2016-09-04 17:59                         ` Linus Torvalds
2016-09-03  0:07                     ` Mark Brown
2016-07-27 12:59     ` Daniel Vetter
2016-07-27 13:03   ` Daniel Vetter
2016-08-01 14:42 ` Jani Nikula
2016-09-07  5:03 Leon Romanovsky

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='CA+55aFwSpNrOuOzaR5hh0A1XvuTu0=xVbE_CV1RVf9GMrTPDNQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=airlied@linux.ie \
    --cc=grant.likely@linaro.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=vinod.koul@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.