linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: initial multiplatform support
Date: Wed, 05 Sep 2012 08:25:54 -0500	[thread overview]
Message-ID: <504752E2.4050407@gmail.com> (raw)
In-Reply-To: <201209051036.53031.arnd@arndb.de>

On 09/05/2012 05:36 AM, Arnd Bergmann wrote:
> On Tuesday 04 September 2012, Rob Herring wrote:
>> On 09/04/2012 01:56 AM, Arnd Bergmann wrote:
>>> On Monday 03 September 2012, Rob Herring wrote:
>>>> On 09/03/2012 11:34 AM, Arnd Bergmann wrote:
>>>>>> @@ -254,27 +254,9 @@ config MMU
>>>>>>  #
>>>>>>  choice
>>>>>>         prompt "ARM system type"
>>>>>> +       depends on !ARCH_MULTIPLATFORM
>>>>>>         default ARCH_VERSATILE
>>>>>
>>>>> Why did you move ARCH_MULTIPLATFORM out of the "choice" statement?
>>>>> If we leave it in there, and make it the default, then we don't
>>>>> even have to change the defconfigs any more (except the versatile
>>>>> one, which is no longer the default), which I think is quite clever
>>>>> and helps git-bisecting across this commit.
>>>>
>>>> We don't have to change and of the defconfigs or .config in this patch.
>>>
>>> How does ARCH_MULTIPLATFORM get set then when building the existing
>>> defconfig files for the converted platforms?
>>
>> Ahhh, right. Those need to be updated. It doesn't really matter if
>> ARCH_MULTIPLATFORM is in the choice or not. It matters if we move
>> platforms out of the choice or not. More on that below.
> 
> But if ARCH_MULTIPLATFORM is one of the choice statements rather than
> a separate option, you don't need to change any of the defconfigs,
> and you can keep using 'make oldconfig' when bisecting over this
> commit.
>>>
>>> I was thinking of other cases actually:
>>>
>>> * device drivers that we don't really care about much but that rely
>>>   on a mach/* header file. In some cases it can be hard to clean up
>>>   those headers, so as an intermediate step, we can just disable the
>>>   drivers when building multiplatform.
>>
>> depends on !ARCH_MULTIPLATFORM ?
> 
> Yes, of course, that is what you'd do in in the drivers, but it only works
> if the same platform can be used both with and without ARCH_MULTIPLATFORM.
> 
>>> * At least the Samsung platforms have files that are built for separate
>>>   platforms in a way that does not work across platforms: 
>>>   arch/arm/plat-samsung/devs.c depends heavily on constants defined
>>>   in mach/*.h header files. When building for DT-only, we can decide to
>>>   just not build this file.
>>
>> I still think that should be possible on a per platform basis, but why
>> mandate that all platforms do that?
> 
> I wasn't suggesting we do that. The platforms that you have already
> converted are all ok to stay multiplatform-only.
> 
>> We have ARCH_FOO in the choice today. Assuming we want to keep the
>> choice name as is to not break configs (as Russell wanted), we have to
>> leave this alone. So then we create ARCH_FOO_MULTI for the mult-platform
>> case and also ARCH_FOO_OPTIONS to avoid duplicating all the per mach
>> selects for ARCH_FOO and ARCH_FOO_MULTI. However, then we have ARCH_FOO
>> as a depends all over the tree. I'd like to avoid having to fix-up all
>> those to be depends on ARCH_FOO_OPTIONS or (ARCH_FOO || ARCH_FOO_MULTI).
> 
> I've been going back and forth a few times between the different methods
> when I created the earlier version of this patch, trying to find the one
> that is least invasive. As you say, creating a new ARCH_FOO_MULTI in parallel
> with the existing (choice) ARCH_FOO means we have to change all the Kconfig
> statements that refer to ARCH_FOO. The good news is that I think we now only
> have to do it inside of the mach-foo directories, which we might want to
> rework anyway so you can more easily build e.g. a THUMB2 kernel that enables
> all the ARMv7 platforms but not the ARMv6 ones.
> 
> All device drivers that have a dependency on a specific platform should
> fall into one of two categories:
> 
> a) Those using platform specific header files. We just decided to not allow
> this in multiplatform kernels, so having a dependency on a symbol that
> only exists for single-platform builds is appropriate.
> 
> b) Drivers that only make sense for one platform but can be built anywhere,
> e.g. after fixing the include path from a). I'd argue that we should allow
> building them anyway, to improve build coverage, so we should better remove
> the dependency, or turn it into a more specific one.

Agreed. There are some other cases like clk drivers which are not
visible options. But changing those are probably manageable.

So to summarize, I'll make ARCH_MULTIPLATFORM part of the choice. The
platforms I converted will stay multi-plat only and don't need
additional kconfig options. Additional platforms converted can choose
whether they want to support both single and multi platform in the kconfig.

Rob

  reply	other threads:[~2012-09-05 13:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 22:49 [PATCH 0/6] Initial multi-platform support Rob Herring
2012-08-29 22:49 ` [PATCH 1/6] ARM: move ARCH config definitions into mach dirs Rob Herring
2012-08-29 23:14   ` H Hartley Sweeten
2012-08-29 23:31   ` Russell King - ARM Linux
2012-08-30 15:18     ` Rob Herring
2012-08-30 16:45       ` Russell King - ARM Linux
2012-08-30 19:07         ` Rob Herring
2012-08-30 19:28           ` Russell King - ARM Linux
2012-08-31 11:05             ` Domenico Andreoli
2012-08-31 11:11               ` Russell King - ARM Linux
2012-08-31 11:46                 ` Domenico Andreoli
2012-09-01  0:48             ` Rob Herring
2012-09-02  8:49               ` Russell King - ARM Linux
2012-09-04 17:50                 ` Tony Lindgren
2012-08-29 22:49 ` [PATCH 2/6] ARM: introduce Kconfig.mach Rob Herring
2012-08-29 23:18   ` H Hartley Sweeten
2012-08-29 22:49 ` [PATCH 3/6] ARM: picoxcell: header fixes for multi-platform Rob Herring
2012-08-29 22:49 ` [PATCH 4/6] ARM: vexpress: remove dependency on mach/* headers Rob Herring
2012-08-29 22:49 ` [PATCH 5/6] ARM: initial multiplatform support Rob Herring
2012-08-29 22:50 ` [PATCH 6/6] ARM: update defconfigs Rob Herring
2012-08-31 18:12 ` [PATCH v2] ARM: initial multiplatform support Rob Herring
2012-09-03 16:34   ` Arnd Bergmann
2012-09-03 21:58     ` Rob Herring
2012-09-04  6:56       ` Arnd Bergmann
2012-09-04 22:40         ` Rob Herring
2012-09-05 10:36           ` Arnd Bergmann
2012-09-05 13:25             ` Rob Herring [this message]
2012-09-05 13:33               ` Arnd Bergmann

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=504752E2.4050407@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).