mbox

[GIT,PULL] Integrator multiplatform migration for v3.19

Message ID CACRpkdafst1j2tp4-=BZMn_P688uUSjeAZEGt26WuD_d521sHQ@mail.gmail.com
State New
Headers show

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git

Message

Linus Walleij Oct. 22, 2014, 12:13 p.m. UTC
Hi ARM SoC folks,

this is the initial set of two patches to migrate the Integrator
platforms to multiplatform.

Tested on the Integrator/AP with ARM926EJ-S and Integrator/CP
with ARM920T.

Please pull it in for v3.19!

Yours,
Linus Walleij

The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1:

  Linux 3.18-rc1 (2014-10-19 18:08:38 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
tags/integrator-multiplatform-for-arm-soc

for you to fetch changes up to 9713497b6c64c67c8763f8f07fad325b193764b6:

  ARM: integrator: set V4T and V5 as default multitargets (2014-10-22
09:49:26 +0200)

----------------------------------------------------------------
Multiplatform migration of the Integrator.

----------------------------------------------------------------
Linus Walleij (2):
      ARM: integrator: make the Integrator multiplatform
      ARM: integrator: set V4T and V5 as default multitargets

 arch/arm/Kconfig                                   | 18 --------
 arch/arm/configs/integrator_defconfig              |  3 ++
 arch/arm/mach-integrator/Kconfig                   | 18 ++++++++
 arch/arm/mach-integrator/include/mach/uncompress.h | 48 ----------------------
 4 files changed, 21 insertions(+), 66 deletions(-)
 delete mode 100644 arch/arm/mach-integrator/include/mach/uncompress.h

Comments

Olof Johansson Nov. 4, 2014, 6:32 a.m. UTC | #1
On Wed, Oct 22, 2014 at 02:13:04PM +0200, Linus Walleij wrote:
> Hi ARM SoC folks,
> 
> this is the initial set of two patches to migrate the Integrator
> platforms to multiplatform.
> 
> Tested on the Integrator/AP with ARM926EJ-S and Integrator/CP
> with ARM920T.
> 
> Please pull it in for v3.19!
> 
> Yours,
> Linus Walleij
> 
> The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1:
> 
>   Linux 3.18-rc1 (2014-10-19 18:08:38 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
> tags/integrator-multiplatform-for-arm-soc
> 
> for you to fetch changes up to 9713497b6c64c67c8763f8f07fad325b193764b6:
> 
>   ARM: integrator: set V4T and V5 as default multitargets (2014-10-22
> 09:49:26 +0200)
> 
> ----------------------------------------------------------------
> Multiplatform migration of the Integrator.

Merged. The patches had better commit texts than the tag though, so please
feel free to carry forward and/or elaborate just a bit more in the future.


-Olof
Russell King - ARM Linux Nov. 6, 2014, 10:52 a.m. UTC | #2
On Mon, Nov 03, 2014 at 10:32:35PM -0800, Olof Johansson wrote:
> On Wed, Oct 22, 2014 at 02:13:04PM +0200, Linus Walleij wrote:
> > Hi ARM SoC folks,
> > 
> > this is the initial set of two patches to migrate the Integrator
> > platforms to multiplatform.
> > 
> > Tested on the Integrator/AP with ARM926EJ-S and Integrator/CP
> > with ARM920T.
> > 
> > Please pull it in for v3.19!
> > 
> > Yours,
> > Linus Walleij
> > 
> > The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1:
> > 
> >   Linux 3.18-rc1 (2014-10-19 18:08:38 -0700)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
> > tags/integrator-multiplatform-for-arm-soc
> > 
> > for you to fetch changes up to 9713497b6c64c67c8763f8f07fad325b193764b6:
> > 
> >   ARM: integrator: set V4T and V5 as default multitargets (2014-10-22
> > 09:49:26 +0200)
> > 
> > ----------------------------------------------------------------
> > Multiplatform migration of the Integrator.
> 
> Merged. The patches had better commit texts than the tag though, so please
> feel free to carry forward and/or elaborate just a bit more in the future.

Unfortunately, this totally screws multiplatform support - with this
merged, we now can enable all CPUs from ARM720T upwards into a single
kernel - and that is illegal.

The problem is that Integrator can be ARM720T all the way up to ARMv6.
So, when ARCH_INTEGRATOR is enabled, you are presented with the
individual CPUs which the platform supports as options to select.
This results in randconfig seeing all the CPU options, which it can
then enable, resulting in:

CONFIG_CPU_ARM720T=y
CONFIG_CPU_ARM920T=y
CONFIG_CPU_ARM922T=y
CONFIG_CPU_ARM926T=y
CONFIG_CPU_ARM1020=y
CONFIG_CPU_ARM1022=y
CONFIG_CPU_ARM1026=y
CONFIG_CPU_V6=y
CONFIG_CPU_V6K=y
CONFIG_CPU_V7=y

which then causes:

arch/arm/include/asm/cmpxchg.h:114:2: error: #error "SMP is not supported on this platform"
arch/arm/include/asm/atomic.h:137:2: error: #error SMP not supported on pre-ARMv6 CPUs

Integrator doesn't fit into the "is it a pre-ARMv6 or not" platform
structure chosen in the early days of multiplatform support, because
it straddles that boundary.
Arnd Bergmann Nov. 6, 2014, 11:33 a.m. UTC | #3
On Thursday 06 November 2014 10:52:47 Russell King - ARM Linux wrote:
> Unfortunately, this totally screws multiplatform support - with this
> merged, we now can enable all CPUs from ARM720T upwards into a single
> kernel - and that is illegal.
> 
> The problem is that Integrator can be ARM720T all the way up to ARMv6.
> So, when ARCH_INTEGRATOR is enabled, you are presented with the
> individual CPUs which the platform supports as options to select.
> This results in randconfig seeing all the CPU options, which it can
> then enable, resulting in:
> 
> CONFIG_CPU_ARM720T=y
> CONFIG_CPU_ARM920T=y
> CONFIG_CPU_ARM922T=y
> CONFIG_CPU_ARM926T=y
> CONFIG_CPU_ARM1020=y
> CONFIG_CPU_ARM1022=y
> CONFIG_CPU_ARM1026=y
> CONFIG_CPU_V6=y
> CONFIG_CPU_V6K=y
> CONFIG_CPU_V7=y
> 
> which then causes:
> 
> arch/arm/include/asm/cmpxchg.h:114:2: error: #error "SMP is not supported on this platform"
> arch/arm/include/asm/atomic.h:137:2: error: #error SMP not supported on pre-ARMv6 CPUs
> 
> Integrator doesn't fit into the "is it a pre-ARMv6 or not" platform
> structure chosen in the early days of multiplatform support, because
> it straddles that boundary.

I've thought about this issue before but hadn't realized that the patches
as they went into arm-soc already cause the problem.

I think it would be best to replace all the lines like

	bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB

with

	bool "Support ARM926T processor" if ARCH_MULTI_V5 || MACH_REALVIEW_EB

and ignore whether ARCH_INTEGRATOR is set or not. Since we have the
generic default platform for multiplatform kernels now, in theory you
could always have any other CPU enabled without even needing an
ARCH_* symbol, as long as the drivers are all present.

	Arnd
Linus Walleij Nov. 10, 2014, 1:48 p.m. UTC | #4
On Thu, Nov 6, 2014 at 12:33 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 06 November 2014 10:52:47 Russell King - ARM Linux wrote:

>> Unfortunately, this totally screws multiplatform support - with this
>> merged, we now can enable all CPUs from ARM720T upwards into a single
>> kernel - and that is illegal.
(...)
> I think it would be best to replace all the lines like
>
>         bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB
>
> with
>
>         bool "Support ARM926T processor" if ARCH_MULTI_V5 || MACH_REALVIEW_EB
>
> and ignore whether ARCH_INTEGRATOR is set or not.

OK I have sent a v2 patch for this check it out.

Sorry for screwing up so badly, I've done quite a few allmodconfig builds now,
just a bit confused with the other noise in linux-next.

Yours,
Linus Walleij
Russell King - ARM Linux Nov. 10, 2014, 1:56 p.m. UTC | #5
On Thu, Nov 06, 2014 at 12:33:51PM +0100, Arnd Bergmann wrote:
> On Thursday 06 November 2014 10:52:47 Russell King - ARM Linux wrote:
> > Unfortunately, this totally screws multiplatform support - with this
> > merged, we now can enable all CPUs from ARM720T upwards into a single
> > kernel - and that is illegal.
> > 
> > The problem is that Integrator can be ARM720T all the way up to ARMv6.
> > So, when ARCH_INTEGRATOR is enabled, you are presented with the
> > individual CPUs which the platform supports as options to select.
> > This results in randconfig seeing all the CPU options, which it can
> > then enable, resulting in:
> > 
> > CONFIG_CPU_ARM720T=y
> > CONFIG_CPU_ARM920T=y
> > CONFIG_CPU_ARM922T=y
> > CONFIG_CPU_ARM926T=y
> > CONFIG_CPU_ARM1020=y
> > CONFIG_CPU_ARM1022=y
> > CONFIG_CPU_ARM1026=y
> > CONFIG_CPU_V6=y
> > CONFIG_CPU_V6K=y
> > CONFIG_CPU_V7=y
> > 
> > which then causes:
> > 
> > arch/arm/include/asm/cmpxchg.h:114:2: error: #error "SMP is not supported on this platform"
> > arch/arm/include/asm/atomic.h:137:2: error: #error SMP not supported on pre-ARMv6 CPUs
> > 
> > Integrator doesn't fit into the "is it a pre-ARMv6 or not" platform
> > structure chosen in the early days of multiplatform support, because
> > it straddles that boundary.
> 
> I've thought about this issue before but hadn't realized that the patches
> as they went into arm-soc already cause the problem.
> 
> I think it would be best to replace all the lines like
> 
> 	bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB
> 
> with
> 
> 	bool "Support ARM926T processor" if ARCH_MULTI_V5 || MACH_REALVIEW_EB
> 
> and ignore whether ARCH_INTEGRATOR is set or not. Since we have the
> generic default platform for multiplatform kernels now, in theory you
> could always have any other CPU enabled without even needing an
> ARCH_* symbol, as long as the drivers are all present.

I don't like this.  The reason the config is structured like this is to:

1. Hide symbols which are not user selectable, but are force-selected in
   the Kconfig.
2. Only present the processors which are appropriate for the platform.

By removing ARCH_INTEGRATOR from the option, you're making the symbol
visible, and sometimes it'll be forced-enabled, other times it'll be
inappropriately visible.  There's absolutely no point offering ARM926T
for a PXA platform for example.

Conversely, there's no point offering support for Xscale CPUs if you
have the PXA platform enabled - it can never be disabled in that
circumstance, and offering it is nothing but shere noise.  The last
thing that Kconfig needs is yet more shite unchangeable options
appearing in the list - it's already enough of a nightmare today
without having this kind of crap added to it.

The answer is of course /not/ to remove ARCH_INTEGRATOR but to make
the processor options depend on !ARCH_MULTIPLATFORM || ARCH_MULTI_xx -
thus, allowing them to be selected in non-multi-platform environments,
and also only in their appropriate multi-platform environment.  That
means we get the best of all worlds.

It also means that people selecting the CPUs directly better do so only
according to the multiplatform CPU architecture selected, which I think
would be a useful side effect of this.
Linus Walleij Nov. 10, 2014, 2:01 p.m. UTC | #6
On Mon, Nov 10, 2014 at 2:56 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:

> The answer is of course /not/ to remove ARCH_INTEGRATOR but to make
> the processor options depend on !ARCH_MULTIPLATFORM || ARCH_MULTI_xx -
> thus, allowing them to be selected in non-multi-platform environments,
> and also only in their appropriate multi-platform environment.  That
> means we get the best of all worlds.

OK I'll do my best to cook up something like this.

Yours,
Linus Walleij