Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: OMAP: drop "select MACH_NOKIA_RM696"
Date: Sat, 09 Mar 2013 20:48:30 +0100	[thread overview]
Message-ID: <1362858510.3137.31.camel@x61.thuisdomein> (raw)
In-Reply-To: <20130309000157.GE30923@n2100.arm.linux.org.uk>

On Sat, 2013-03-09 at 00:01 +0000, Russell King - ARM Linux wrote:
> It's actually quite clever.  There's two levels to it.
> 
> The first is that CONFIG_MACH_xxx result in their machine_is_xxx() macros
> being defined to constant zero if the CONFIG option is not enabled.  That
> allows the compiler to throw away code for disabled platforms because
> the expression is always false.
> 
> Otherwise, they end up as (machine_arch_type == MACH_TYPE_xxx).
> 
> The second is the magic which happens when two CONFIG_MACH_xxx are
> selected.  If only one is selected, then machine_arch_type is defined
> to the appropriate MACH_TYPE_xxx.  This means that the above expression
> becomes constant-true, and the conditional is eliminated.
> 
> If more than one is selected, then machine_arch_type is defined to a
> variable which is appropriately set to one of the MACH_TYPE_xxx values.

At boot?

> So, the result is that:
> - de-selected platforms have their if (machine_is_xxx()) { } optimised
>   out of the kernel.
> - for a kernel built targetting one platform, all the
>   if (machine_is_xxx()) tests are optimised away, leaving only the
>   relevant code behind.
> - otherwise, we get the _appropriate_ conditional code for the
>   configuration generated.

Thanks for clarifying this. Quite clever indeed. 

> However, going back to that MACH_NOKIA_RM696.  If there exists only a
> select of this symbol and no "config MACH_NOKIA_RM696" entry, then the
> symbol will never be generated in the output .config file.
> 
>[...]
> 
> My conclusion is... it's a mess.

That mess can only be fully cleaned up if the code for the RM-696 that
now is maintained in some unknown to me repository gets merged into
mainline, can't it?

In the meantime, how do you prefer I solve the (trivial) issue of an
useless select for MACH_NOKIA_RM696? Drop that select or add an (equally
useless) config entry for MACH_NOKIA_RM696? Or should I try to ignore it
for the time being?


Paul Bolle

  reply	other threads:[~2013-03-09 19:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 10:29 [PATCH] ARM: OMAP: drop "select MACH_NOKIA_RM696" Paul Bolle
2013-03-08 16:11 ` Aaro Koskinen
2013-03-08 16:35   ` Tony Lindgren
2013-03-08 17:20     ` Paul Bolle
2013-03-08 17:55       ` Tony Lindgren
2013-03-08 18:02         ` Paul Bolle
2013-03-08 18:10           ` Tony Lindgren
2013-03-09  0:01           ` Russell King - ARM Linux
2013-03-09 19:48             ` Paul Bolle [this message]
2013-03-11 16:33               ` Tony Lindgren
2013-03-14  8:00                 ` Paul Bolle
2013-03-08 17:18   ` Paul Bolle

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=1362858510.3137.31.camel@x61.thuisdomein \
    --to=pebolle@tiscali.nl \
    --cc=aaro.koskinen@iki.fi \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tony@atomide.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