From: Arnd Bergmann <arnd@arndb.de>
To: "Russell King - ARM Linux" <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
"Michał Mirosław" <mirqus@gmail.com>,
"Hans Ulli Kroll" <ulli.kroll@googlemail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: Gemini: Add support for PCI Bus
Date: Mon, 29 Nov 2010 16:50:30 +0100 [thread overview]
Message-ID: <201011291650.30982.arnd@arndb.de> (raw)
In-Reply-To: <20101129142200.GA14941@n2100.arm.linux.org.uk>
On Monday 29 November 2010, Russell King - ARM Linux wrote:
> On Sat, Nov 27, 2010 at 04:39:21PM +0100, Arnd Bergmann wrote:
> > On Saturday 27 November 2010 14:01:20 Michał Mirosław wrote:
>
> Be careful. There are two things going on here:
>
> 1. those which PCI support is configurable
> 2. those which always have PCI support
>
> Making PCI "depend on HAVE_PCI" is wrong, and will throw up lots of
> Kconfig warnings, as those platforms which always have PCI support
> won't select HAVE_PCI - and making them do so such that "PCI support"
> gets offered to them - with the only possible value being 'Y' is
> silly.
We definitely need to be careful with combinations of select and
depends. The obvious danger is enabling two boards, one of which
requires PCI while the other one cannot deal with CONFIG_PCI=y.
As we get to more multiplatform builds, we have to eventually
solve this, along with the problem that certain PCI implementations
are currently mutually exclusive.
What behaviour do you want to see in a multiplatform build where
one board is known to have PCI, one may have it and a third
one cannot have PCI? Should it be enabled, disabled or
user-selected.
> So, rather than HAVE_PCI, it should be MIGHT_HAVE_PCI, and that
> symbol needs to control whether the "PCI support" prompt is offered
> to the user, not whether PCI is available or not.
Most architectures make PCI optional even though it is a bit silly
to disable it like on x86. There are a lot of other useful configuration
options that end up always enabled in practice.
The easiest way would be to always select HAVE_PCI (or MIGHT_HAVE_PCI
if you prefer the term) and make the default CONFIG_PCI default to
yes.
Or you could go fancy and have both HAVE_PCI and MIGHT_HAVE_PCI, with
each platform selecting at most one of the two and this
config PCI
bool "PCI support"
depends on MIGHT_HAVE_PCI && !HAVE_PCI
default HAVE_PCI
This way it will be silently turned on if one of the machines requires
PCI, but stay visible if the machines might want to disable PCI.
Arnd
next prev parent reply other threads:[~2010-11-29 15:50 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-20 14:27 [PATCH] ARM: Gemini: Add support for PCI Bus Hans Ulli Kroll
2010-11-20 19:30 ` Paulius Zaleckas
2010-11-26 11:18 ` Russell King - ARM Linux
2010-11-26 11:57 ` Michał Mirosław
2010-11-27 12:16 ` Hans Ulli Kroll
2010-11-27 13:01 ` Michał Mirosław
2010-11-27 15:39 ` Arnd Bergmann
2010-11-29 8:12 ` Hans Ulli Kroll
2010-11-29 14:22 ` Russell King - ARM Linux
2010-11-29 14:50 ` Hans Ulli Kroll
2010-11-29 15:57 ` Arnd Bergmann
2010-11-30 15:38 ` Hans Ulli Kroll
2010-11-30 16:05 ` Russell King - ARM Linux
2010-11-30 16:19 ` Arnd Bergmann
2010-12-01 15:05 ` Hans Ulli Kroll
2010-11-29 15:50 ` Arnd Bergmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-11-27 12:24 [PATCH] ARM: Gemini: Add support for PCI BUS Hans Ulli Kroll
2010-11-28 19:56 ` Arnd Bergmann
2010-11-29 12:17 ` Hans Ulli Kroll
2010-11-29 15:02 ` Arnd Bergmann
2010-11-29 16:05 ` Paulius Zaleckas
2010-11-29 16:45 ` Arnd Bergmann
2010-11-29 18:52 ` Paulius Zaleckas
2010-11-29 20:02 ` Arnd Bergmann
2010-11-29 20:19 ` Paulius Zaleckas
2010-11-30 8:15 ` Hans Ulli Kroll
2010-11-30 9:34 ` Paulius Zaleckas
2010-12-01 11:52 ` Hans Ulli Kroll
2010-12-01 13:08 ` Paulius Zaleckas
2010-12-01 15:02 ` Hans Ulli Kroll
2010-12-06 10:51 ` Sergei Shtylyov
2010-12-06 12:18 ` Arnd Bergmann
2010-11-29 19:32 ` Russell King - ARM Linux
2010-11-29 19:57 ` Paulius Zaleckas
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=201011291650.30982.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mirqus@gmail.com \
--cc=ulli.kroll@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox