From: David Brownell <david-b@pacbell.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, avorontsov@ru.mvista.com
Subject: Re: [patch 2.6.25-rc5 1/2] gpiolib: dynamic gpio number allocation
Date: Thu, 13 Mar 2008 17:54:44 -0800 [thread overview]
Message-ID: <200803131854.45035.david-b@pacbell.net> (raw)
In-Reply-To: <20080313162803.ab8bfd4c.akpm@linux-foundation.org>
On Thursday 13 March 2008, Andrew Morton wrote:
> > > Shouldn't ARCH_NR_GPIOS be CONFIG_NR_GPIOS?
> >
> > No more than NR_IRQS is settable via Kconfig. And for
> > rather similar reasons. :)
>
> What are those reasons?
Keeping a lid on the amount of space wasted by unused
table entries is one factor; it's an implementation
tradeoff. In normal usage the number of IRQs (or GPIOs)
is defined by the board (or system) design, and there's
no real point to allowing more.
That said, NR_IRQS is kind of inflexible. It's not easy
to provide board-specific overrides for cases like having
a few FPGAs or other external IRQ (or GPIO!) controllers
which chain IRQs and plug into those tables...
Both could use a way to extend a platform-defined minimum
to support a configurable number of external controllers.
Lacking that, both have somewhat ad-hoc solutions to make
sure board variants can be set up with the same kernel.
It basically boils down to making sure there are some extra
entries at end-of-table, and policies to allocate them.
- Dave
prev parent reply other threads:[~2008-03-14 1:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 22:49 [patch 2.6.25-rc5 1/2] gpiolib: dynamic gpio number allocation David Brownell
2008-03-13 23:00 ` Andrew Morton
2008-03-13 23:18 ` David Brownell
2008-03-13 23:28 ` Andrew Morton
2008-03-13 23:54 ` Anton Vorontsov
2008-03-14 0:53 ` David Brownell
2008-03-14 2:17 ` Andrew Morton
2008-03-14 5:52 ` David Brownell
2008-03-14 1:54 ` David Brownell [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=200803131854.45035.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=avorontsov@ru.mvista.com \
--cc=linux-kernel@vger.kernel.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