[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130907185710.GF3966@linux.vnet.ibm.com>
Date: Sat, 7 Sep 2013 11:57:10 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: "Yann E. MORIN" <yann.morin.1998@...e.fr>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>, laijs@...fujitsu.com,
dipankar@...ibm.com, Andrew Morton <akpm@...ux-foundation.org>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
josh@...htriplett.org, niv@...ibm.com,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
David Howells <dhowells@...hat.com>, edumazet@...gle.com,
darren@...art.com,
Frédéric Weisbecker <fweisbec@...il.com>,
sbw@....edu, Linux-Arch <linux-arch@...r.kernel.org>,
linux-kbuild <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH tip/core/rcu 8/9] nohz_full: Add full-system-idle state
machine
On Sat, Sep 07, 2013 at 11:13:48AM +0200, Yann E. MORIN wrote:
> Paul, All,
>
> On 2013-09-06 10:30 -0700, Paul E. McKenney spake thusly:
> [--SNIP--]
> > I also tried using Kconfig "if":
> >
> > if SMP
> > config NR_CPUS_REALLY
> > int "Fixed version of NR_CPUS"
> > default NR_CPUS
> > endif
> > if !SMP
> > config NR_CPUS_REALLY
> > int "Fixed version of NR_CPUS"
> > default 1 if !SMP
>
> The 'if !SMP' here is unneeded, you're already in a 'if !SMP' if-block.
Agreed, though I get the same result even without the !SMP.
> > endif
> >
> > However, Kconfig complained about the use of NR_CPUS even though this
> > was under an "if" whose condition was not set. Perhaps someone with
> > better Kconfig-fu than I have can come up with something.
>
> That's because the 'if' condition is added to the dependency list of the
> symbol(s) that is(are) enclosed in the if.
>
> 'if' in Kconfig behaves the same way as an 'if' in C. What you expected
> (I believe) was the behaviour of '#ifdef', which is not the case. From
> Documentation/kbuild/kconfig-language.txt:
>
> ---8<---
> if:
>
> "if" <expr>
> <if block>
> "endif"
>
> This defines an if block. The dependency expression <expr> is appended
> to all enclosed menu entries.
> ---8<---
OK, I did read this, but misunderstood it.
> There's no equivlaent to '#ifdef' in Kconfig.
>
> I'll see if I can come up with a meaningfull construct that fixes your
> use-case. Don't hold your breath, though! ;-)
If not, we need to add NR_CPUS to the architectures lacking them...
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists