diff mbox

[v2] ARM: Kconfig: Do not force selection of ARCH_VEXPRESS by ARCH_MULTI_V7

Message ID 1353431918-9326-1-git-send-email-festevam@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Nov. 20, 2012, 5:18 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

When building a kernel using imx_v6_v7_defconfig, it is not possible to unselect
ARCH_VEXPRESS due to the fact that it is automatically selected by ARCH_MULTI_V7.

This is not good when someone wants to create a minimal kernel build, so let 
multi_v7_defconfig select ARCH_VEXPRESS instead.

Also avoid build breakage when randconfig selects no platform.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Avoid build breakage on randconfig for the case that no platform is selected.
 arch/arm/Kconfig                    |    2 +-
 arch/arm/configs/multi_v7_defconfig |    1 +
 arch/arm/kernel/vmlinux.lds.S       |    2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

Comments

Fabio Estevam Dec. 7, 2012, 10:07 a.m. UTC | #1
Hi Rob,

On Tue, Nov 20, 2012 at 3:18 PM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> When building a kernel using imx_v6_v7_defconfig, it is not possible to unselect
> ARCH_VEXPRESS due to the fact that it is automatically selected by ARCH_MULTI_V7.
>
> This is not good when someone wants to create a minimal kernel build, so let
> multi_v7_defconfig select ARCH_VEXPRESS instead.
>
> Also avoid build breakage when randconfig selects no platform.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - Avoid build breakage on randconfig for the case that no platform is selected.

Does this version look good?

Regards,

Fabio Estevam
Rob Herring Dec. 7, 2012, 1:25 p.m. UTC | #2
On 12/07/2012 04:07 AM, Fabio Estevam wrote:
> Hi Rob,
> 
> On Tue, Nov 20, 2012 at 3:18 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> When building a kernel using imx_v6_v7_defconfig, it is not possible to unselect
>> ARCH_VEXPRESS due to the fact that it is automatically selected by ARCH_MULTI_V7.
>>
>> This is not good when someone wants to create a minimal kernel build, so let
>> multi_v7_defconfig select ARCH_VEXPRESS instead.
>>
>> Also avoid build breakage when randconfig selects no platform.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> ---
>> Changes since v1:
>> - Avoid build breakage on randconfig for the case that no platform is selected.
> 
> Does this version look good?

Yes.

Acked-by: Rob Herring <rob.herring@calxeda.com>

> 
> Regards,
> 
> Fabio Estevam
>
Fabio Estevam Jan. 2, 2013, 10:03 p.m. UTC | #3
Russell,

On Fri, Dec 7, 2012 at 11:25 AM, Rob Herring <rob.herring@calxeda.com> wrote:

>> Does this version look good?
>
> Yes.
>
> Acked-by: Rob Herring <rob.herring@calxeda.com>

Should I submit this one to the patch system?

Regards,

Fabio Estevam
Russell King - ARM Linux Jan. 2, 2013, 10:59 p.m. UTC | #4
On Tue, Nov 20, 2012 at 03:18:38PM -0200, Fabio Estevam wrote:
> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> index b9f38e3..aa46be8 100644
> --- a/arch/arm/kernel/vmlinux.lds.S
> +++ b/arch/arm/kernel/vmlinux.lds.S
> @@ -310,4 +310,6 @@ SECTIONS
>   * binutils is too old (for other reasons as well)
>   */
>  ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
> +#ifndef CONFIG_ARCH_MULTIPLATFORM
>  ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
> +#endif

This is wrong.  So you want a kernel build which produces an unbootable
kernel (because it contains absolutely no platform support of any kind,
not even any DT platform support) to succeed?
Fabio Estevam Jan. 2, 2013, 11:03 p.m. UTC | #5
On Wed, Jan 2, 2013 at 8:59 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Tue, Nov 20, 2012 at 03:18:38PM -0200, Fabio Estevam wrote:
>> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
>> index b9f38e3..aa46be8 100644
>> --- a/arch/arm/kernel/vmlinux.lds.S
>> +++ b/arch/arm/kernel/vmlinux.lds.S
>> @@ -310,4 +310,6 @@ SECTIONS
>>   * binutils is too old (for other reasons as well)
>>   */
>>  ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
>> +#ifndef CONFIG_ARCH_MULTIPLATFORM
>>  ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
>> +#endif
>
> This is wrong.  So you want a kernel build which produces an unbootable
> kernel (because it contains absolutely no platform support of any kind,
> not even any DT platform support) to succeed?

Ok, what about the first version?
https://patchwork.kernel.org/patch/1774521/

Regards,

Fabio Estevam
Russell King - ARM Linux Jan. 2, 2013, 11:15 p.m. UTC | #6
On Wed, Jan 02, 2013 at 09:03:52PM -0200, Fabio Estevam wrote:
> On Wed, Jan 2, 2013 at 8:59 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Tue, Nov 20, 2012 at 03:18:38PM -0200, Fabio Estevam wrote:
> >> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> >> index b9f38e3..aa46be8 100644
> >> --- a/arch/arm/kernel/vmlinux.lds.S
> >> +++ b/arch/arm/kernel/vmlinux.lds.S
> >> @@ -310,4 +310,6 @@ SECTIONS
> >>   * binutils is too old (for other reasons as well)
> >>   */
> >>  ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
> >> +#ifndef CONFIG_ARCH_MULTIPLATFORM
> >>  ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
> >> +#endif
> >
> > This is wrong.  So you want a kernel build which produces an unbootable
> > kernel (because it contains absolutely no platform support of any kind,
> > not even any DT platform support) to succeed?
> 
> Ok, what about the first version?
> https://patchwork.kernel.org/patch/1774521/

That seems to be better because it leaves the desire for an unbootable
kernel to be a build failure.

However, it allows the multi-platform case to end up with a configuration
where such a kernel can be generated, which is something Arnd wants to
avoid as it messes up allnoconfig and randconfig builds.

What we need to come up with is some kind of "default platform" which is
always built into the kernel.  Will had some ideas about that for the
virtualization stuff, but I think there were objections to that over it
being modelled on Versatile Express.  If that can be sorted, then we
have a solution to this problem.

We _should_ be aiming to get to that state anyway, where the kernel
doesn't need to know about platform X, Y or Z but just uses the
description in DT which tells it where devices A, B, and C are and how
they relate to the rest of the system.
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 14f8160..372cb4e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -267,6 +267,7 @@  choice
 config ARCH_MULTIPLATFORM
 	bool "Allow multiple platforms to be selected"
 	depends on MMU
+	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARM_PATCH_PHYS_VIRT
 	select AUTO_ZRELADDR
 	select COMMON_CLK
@@ -1000,7 +1001,6 @@  config ARCH_MULTI_V7
 	bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)"
 	default y
 	select ARCH_MULTI_V6_V7
-	select ARCH_VEXPRESS
 	select CPU_V7
 
 config ARCH_MULTI_V6_V7
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 159f75f..531c538 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -6,6 +6,7 @@  CONFIG_MACH_ARMADA_370=y
 CONFIG_MACH_ARMADA_XP=y
 CONFIG_ARCH_HIGHBANK=y
 CONFIG_ARCH_SOCFPGA=y
+CONFIG_ARCH_VEXPRESS=y
 # CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
 CONFIG_ARM_ERRATA_754322=y
 CONFIG_SMP=y
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index b9f38e3..aa46be8 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -310,4 +310,6 @@  SECTIONS
  * binutils is too old (for other reasons as well)
  */
 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
+#ifndef CONFIG_ARCH_MULTIPLATFORM
 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
+#endif