From: Arnd Bergmann <arnd@arndb.de>
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>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [Ksummit-discuss] [CORE TOPIC] (group) maintainership models
Date: Thu, 28 Jul 2016 10:44:23 +0200 [thread overview]
Message-ID: <27648120.ey0ZEtExVa@wuerfel> (raw)
In-Reply-To: <20160727171551.GE9681@localhost>
On Wednesday, July 27, 2016 10:45:51 PM CEST Vinod Koul wrote:
> On Wed, Jul 27, 2016 at 03:22:21PM +0100, Mark Brown wrote:
> > On Wed, Jul 27, 2016 at 06:27:51PM +0530, Vinod Koul wrote:
> > > On Wed, Jul 27, 2016 at 09:53:24AM +0200, Arnd Bergmann wrote:
> >
> > > > We should be at the point where an 'allmodconfig' build on ARM
> > > > gets you most of the drivers and builds without warnings (using
> > > > gcc-4.9 or higher).
> >
> > > The problem is drivers depend on various ARM sub arch's. That is the
> > > sole reason why I have multiple configs now.
> >
> > That shouldn't be the case at least for any new code, things should at
> > least build OK with an || COMPILE_TEST normally. Old code may need
> > fixing up for this.
>
> That's right, this is problematic mostly with older code and for ARMv5 and
> below. As I said later code & sub-ARCHs seems to be well covered with
> current multi-vx-configs...
>
> > > Which brings me to another problem why should individual drivers
> > > depend on ARM sub arch's. Depends on ARM, yes. First look at code tells
> > > me they shouldn't!, probably sometime back that was true, but I don't
> > > think that should be the case now, ofcourse you would know better!
> >
> > The dependencies are there to improve UX when people are configuring
> > their kernels - it stops them being asked about hardware they can't
> > possibly have in their system. If there's no build time reason for it
> > then it should be (ARCH_FOO || COMPILE_TEST) so people can do build
> > tests.
>
> That is a valid point as well. This seems better suggestion to me.
Unfortunately, we have too many different ways of handling this, and
the preferred style differs by subsystem. The style that Mark
mentioned is particularly nice and concise:
config FOO
bool "foo driver"
depends on ARCH_FOO || COMPILE_TEST
depends on GPIOLIB && I2C && OF && WHATEVER
These days we should rarely need a 'depends on ARM || PPC' statement
in there, but it's very common to limit drivers by architecture as
well for historic reasons.
For old drivers, we often have
config FOO
bool "foo driver"
depends on ARCH_FOO
and this used to be a compile-time requirement as each ARM platform
had their own headers, but now this is only needed (on ARM) for
really old platforms that will remain like this (strongarm, ixp4xx,
iop, ...) or those that are a little more recent but still in the
long process of being converted (omap1, davinci, lpc32xx, ep93xx, ...).
On other architectures (MIPS, sh, avr32, ...) this is however much
more common.
We have had a couple of per-subsystem efforts to identify the drivers
that actually build on other architectures and add the '|| COMPILE_TEST'
statements. This typically causes a few regressions initially and then
just works.
Some subsystems have essential drivers without which a platform cannot
work (clock, irqchip, reset, ...) and those often don't allow the
driver to be user-selectable at all. I'd like to see more of those
get enabled for COMPILE_TEST, but the Kconfig statement for this
is rather unintuitive:
config FOO
bool "foo driver" if COMPILE_TEST && !ARCH_FOO
default ARCH_FOO
depends on GPIOLIB && I2C && OF && WHATEVER
This becomes a silent always-on symbol if the platform is used,
and user-selectable on every other platform with COMPILE_TEST.
Arnd
next prev parent reply other threads:[~2016-07-28 8:44 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 12:11 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 [this message]
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
2016-09-02 20:06 ` Arnd Bergmann
2016-09-02 20:26 ` Linus Torvalds
2016-09-02 20:43 ` Julia Lawall
2016-09-02 20:50 ` Linus Torvalds
2016-09-02 22:16 ` Benjamin Herrenschmidt
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=27648120.ey0ZEtExVa@wuerfel \
--to=arnd@arndb.de \
--cc=airlied@linux.ie \
--cc=grant.likely@linaro.org \
--cc=jani.nikula@linux.intel.com \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox