linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Kevin Hao <haokexin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc: fix the dependency issue for CRASH_DUMP
Date: Mon, 4 May 2015 21:34:19 -0500	[thread overview]
Message-ID: <1430793259.16357.231.camel@freescale.com> (raw)
In-Reply-To: <20150505022743.GB24874@pek-khao-d1.corp.ad.wrs.com>

On Tue, 2015-05-05 at 10:27 +0800, Kevin Hao wrote:
> On Mon, May 04, 2015 at 05:17:17PM -0500, Scott Wood wrote:
> > On Thu, 2015-04-30 at 20:29 +0800, Kevin Hao wrote:
> > > In the current code, the RELOCATABLE will be forcedly enabled when
> > > enabling CRASH_DUMP. But for ppc32, the RELOCABLE also depend on
> > > ADVANCED_OPTIONS and select NONSTATIC_KERNEL. This will cause build
> > > error when CRASH_DUMP=y && ADVANCED_OPTIONS=n. Even there is no such
> > > issue for ppc64, but select is only for non-visible symbols and for
> > > symbols with no dependencies. As for a symbol like RELOCATABLE, it is
> > > definitely not suitable to select it. So choose to depend on it.
> > 
> > Why is it "definitely not suitable to select it", provided the
> > ADVANCED_OPTIONS dependency is removed, and the FLATMEM dependency is
> > moved to places that select RELOCATABLE?
> 
> Even with this change, the definition of RELOCATABLE still be something like
> this:
>     config RELOCATABLE
>            bool "Build a relocatable kernel"
>            depends on (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
>            select NONSTATIC_KERNEL

That matches the cases where CRASH_DUMP selects RELOCATABLE.

> Quoted form Documentation/kbuild/kconfig-language.txt:
>         select should be used with care. select will force
>         a symbol to a value without visiting the dependencies.
>         By abusing select you are able to select a symbol FOO even
>         if FOO depends on BAR that is not set.
>         In general use select only for non-visible symbols
>         (no prompts anywhere) and for symbols with no dependencies.
>         That will limit the usefulness but on the other hand avoid
>         the illegal configurations all over.
> 
> So it is always error prone to select a kernel option like this.

Yes, but these days Kbuild does warn about selecting a symbol with unmet
dependencies, which IIRC wasn't the case when that was written.

> >  It seems wrong that the user
> > should have to enable ADVANCED_OPTIONS to even see the option to build a
> > crash kernel.
> 
> Yes, it seems ridiculous. But this is fixed in the patch 2.

OK...  Still non-obvious, but at least not *as* bad.

-Scott

  reply	other threads:[~2015-05-05  2:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 12:29 [PATCH 0/2] powerpc: tweak the kernel options for CRASH_DUMP and RELOCATABLE Kevin Hao
2015-04-30 12:29 ` [PATCH 1/2] powerpc: fix the dependency issue for CRASH_DUMP Kevin Hao
2015-05-04 22:17   ` Scott Wood
2015-05-05  2:27     ` Kevin Hao
2015-05-05  2:34       ` Scott Wood [this message]
2015-04-30 12:29 ` [PATCH 2/2] powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64 Kevin Hao

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=1430793259.16357.231.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=haokexin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).