public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Milton Miller <miltonm@bga.com>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: genirq: Ensure we locate the passed IRQ in irq_alloc_descs()
Date: Fri, 3 Jun 2011 16:06:36 +0100	[thread overview]
Message-ID: <20110603150636.GA9492@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <locate-from-more@mdm.bga.com>

On Fri, Jun 03, 2011 at 09:43:42AM -0500, Milton Miller wrote:

> I treated the arguments to irq_alloc_descs as having grown to
> accomidate the two uses having a common allocator with the partially
> redunant encoding.  In one case an exact irq was specified (irq >= 0),
> and one that allocates from anywhere (irq < 0, all callers passed -1).

> Maybe you have a new case.

No, I'm only aware of those two cases.  All my change does is make the
irq parameter be enough to select between the two - at the minute it's
just too weak.

> Do you need a specific irq or an allocated one?

> Or do you have a case where you don't know?

I need either a specific IRQ or an allocated one.  This is just a very
standard driver with an interrupt controller (well, there's a bunch of
devices that are going to be doing the same thing - it's far from just
one driver), it doesn't care what base it gets but systems can specify a
base if they care for the externally visible interrupts (so that they
can be supplied to other devices or whatever).

> > I need about 60 IRQs in the particular driver where I noticed this.

> Do you need a block of 60?  or just 60 somewhere?

The driver assumes it's going to get a contiguous range, it'd be a lot
of bookkeeping for no gain to have to cope with them being splattered
all over the place.

> How do you know from = 0 is safe?

If the user cares they can just pick a number for the base; if they're
going to pick a number they may as well pick the actual number.

> > I don't really see the relevance of this patch?  You're adding
> > functionality for limiting the maximum IRQ number allocated which seems
> > orthogonal to the issue.

> Its relavant in that irq_alloc_descs_range no longer gets both irq and from;
> the information is passed to the underling allocator in a different form.

That's not the goal of the patch, it's just something the patch happens
to do as part of the implementation as far as I can see.

  reply	other threads:[~2011-06-03 15:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 17:55 [PATCH] genirq: Ensure we locate the passed IRQ in irq_alloc_descs() Mark Brown
2011-06-03  9:24 ` Milton Miller
2011-06-03 10:42   ` Mark Brown
2011-06-03 14:43     ` Milton Miller
2011-06-03 15:06       ` Mark Brown [this message]
2011-06-04  0:23         ` Milton Miller
2011-06-04  9:51           ` Mark Brown
2011-06-06 19:42             ` Grant Likely
2011-06-06 20:57               ` Mark Brown
2011-06-06 21:33                 ` Grant Likely
2011-06-03 16:25       ` Thomas Gleixner
2011-06-03 12:59 ` [tip:irq/urgent] " tip-bot for Mark Brown

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=20110603150636.GA9492@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=tglx@linutronix.de \
    /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