Fix select-induced Kconfig warning for ZBOOT_ROM
Subsystems (3)
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
warning: (ARCH_MULTIPLATFORM && ARCH_CLPS711X && ARCH_PXA &&
SOC_EXYNOS5440 && ARCH_EMEV2) selects AUTO_ZRELADDR which has unmet direct dependencies (!ZBOOT_ROM)
This is because it's possible to have ZBOOT_ROM enabled, but at the same time have another option enabled which selects AUTO_ZRELADDR overriding the !ZBOOT_ROM dependency. Fix this by reversing the dependencies between ZBOOT_ROM and the options which depend on !ZBOOT_ROM.
---
The autobuilder spotted this on one of its randconfig builds - yet again, it's another illustration of the problems that throwing a "select" statement at a problem is generally a bad idea. Let's make a new year's resolution that we're going to stop throwing "select" at a problem without first thinking about the consequences.
arch/arm/Kconfig | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/Kconfig +3 -3
@@ -1946,6 +1946,7 @@ config ZBOOT_ROM_BSS config ZBOOT_ROM bool "Compressed boot loader in ROM/flash" depends on ZBOOT_ROM_TEXT != ZBOOT_ROM_BSS + depends on !ARM_APPENDED_DTB && !XIP_KERNEL && !AUTO_ZRELADDR help Say Y here if you intend to execute your compressed kernel image (zImage) directly from ROM or flash. If unsure, say N.
@@ -1981,7 +1982,7 @@ endchoice config ARM_APPENDED_DTB bool "Use appended device tree blob to zImage (EXPERIMENTAL)" - depends on OF && !ZBOOT_ROM + depends on OF help With this option, the boot code will look for a device tree binary (DTB) appended to zImage
@@ -2069,7 +2070,7 @@ endchoice config XIP_KERNEL bool "Kernel Execute-In-Place from ROM" - depends on !ZBOOT_ROM && !ARM_LPAE && !ARCH_MULTIPLATFORM + depends on !ARM_LPAE && !ARCH_MULTIPLATFORM help Execute-In-Place allows the kernel to run from non-volatile storage directly addressable by the CPU, such as NOR flash. This saves RAM
@@ -2132,7 +2133,6 @@ config CRASH_DUMP config AUTO_ZRELADDR bool "Auto calculation of the decompressed kernel image address" - depends on !ZBOOT_ROM help ZRELADDR is the physical address where the decompressed kernel image will be placed. If AUTO_ZRELADDR is selected, the address
Signature · 1 line
1.7.4.4
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 4 lines · Russell King
warning: (
ARCH_MULTIPLATFORM&&ARCH_CLPS711X&&ARCH_PXA&&
SOC_EXYNOS5440&&ARCH_EMEV2) selectsAUTO_ZRELADDRwhich has unmet direct dependencies (!ZBOOT_ROM)
Quoted 8 lines
This is because it's possible to have
ZBOOT_ROMenabled, but at the same time have another option enabled which selectsAUTO_ZRELADDRoverriding the !ZBOOT_ROM dependency. Fix this by reversing the dependencies betweenZBOOT_ROMand the options which depend on !ZBOOT_ROM.Signed-off-by Russell King <[email protected]>---
After this patch I see these warnings with exynos_defconfig
arch/arm/Kconfig:1963:error: recursive dependency detected! arch/arm/Kconfig:1963: symbol ZBOOT_ROM depends on AUTO_ZRELADDR arch/arm/Kconfig:2151: symbol AUTO_ZRELADDR is selected by ZBOOT_ROM
I am not really sure why this happened as I don't see AUTO_ZRELADDR selected by ZBOOT_ROM in Kconfig :)
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 15 lines · On Wednesday 08 January 2014 13:32:35 Viresh Kumar wrote:
Quoted 4 lines · Russell King
warning: (
ARCH_MULTIPLATFORM&&ARCH_CLPS711X&&ARCH_PXA&&
SOC_EXYNOS5440&&ARCH_EMEV2) selectsAUTO_ZRELADDRwhich has unmet direct dependencies (!ZBOOT_ROM)Quoted 8 lines
This is because it's possible to have
ZBOOT_ROMenabled, but at the same time have another option enabled which selectsAUTO_ZRELADDRoverriding the !ZBOOT_ROM dependency. Fix this by reversing the dependencies betweenZBOOT_ROMand the options which depend on !ZBOOT_ROM.Signed-off-by Russell King <[email protected]>---
Quoted 8 lines
After this patch I see these warnings with
exynos_defconfigarch/arm/Kconfig:1963:error: recursive dependency detected!
arch/arm/Kconfig:1963: symbolZBOOT_ROMdepends onAUTO_ZRELADDRarch/arm/Kconfig:2151: symbolAUTO_ZRELADDRis selected byZBOOT_ROMI am not really sure why this happened as I don't see
AUTO_ZRELADDRselected byZBOOT_ROMinKconfig:)
It's a weird dependency. You need this hunk:
arch/arm/mach-imx/Kconfig +1 -1
@@ -3,7 +3,7 @@ config ARCH_MXC select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR if !ZBOOT_ROM + select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select GENERIC_ALLOCATOR
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
arch/arm/mach-imx/Kconfig config ARCH_MXC · line 9
Quoted 13 lines · Arnd Bergmann
It's a weird dependency. You need this hunk:
arch/arm/mach-imx/Kconfig +1
-1@@ -3,7 +3,7 @@ config ARCH_MXC select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR if !ZBOOT_ROM + select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select GENERIC_ALLOCATOR
Exynos already has this:
arch/arm/mach-exynos/Kconfig
config SOC_EXYNOS5440
...
select AUTO_ZRELADDRPATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 17 lines · On Wednesday 08 January 2014 13:56:38 Viresh Kumar wrote:
arch/arm/mach-imx/Kconfig config ARCH_MXC · line 9
Quoted 13 lines · Arnd Bergmann
It's a weird dependency. You need this hunk:
arch/arm/mach-imx/Kconfig +1
-1@@ -3,7 +3,7 @@ config ARCH_MXC select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR if !ZBOOT_ROM + select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select GENERIC_ALLOCATORExynos already has this:
Quoted 4 lines
arch/arm/mach-exynos/Kconfig
configSOC_EXYNOS5440... select AUTO_ZRELADDR
Yes, that is ok. The problem with the imx dependency is that the kconfig parser needs to know the state of the ZBOOT_ROM symbol in order to decide whether to select AUTO_ZRELADDR or not, but ZBOOT_ROM in turn depends on AUTO_ZRELADDR.
On second thought, we should just remove the 'select AUTO_ZRELADDR' from ARCH_MXC and everything that is multiplatform enabled, since it's already selected by ARCH_MULTIPLATFORM. An interesting question is what to do about the case where you actually want ZBOOT_ROM with a multiplatform enabled machine. We should probably allow that, but it's not possible to express that in Kconfig as long as ZBOOT_ROM depends on !AUTO_ZRELADDR. Obviously such a kernel won't be true multiplatform (it will only work on systems with the right rom address), but I think that's ok as long as it's documented well and not enabled by default. This is similar to what we need to allow non-MMU builds for multiplatform machines.
Arnd
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 24 lines · Arnd Bergmann
Quoted 14 lines
arch/arm/mach-imx/Kconfig config ARCH_MXC · line 9
Quoted 11 lines
arch/arm/mach-imx/Kconfig +1
-1@@ -3,7 +3,7 @@ config ARCH_MXC select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR if !ZBOOT_ROM + select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select GENERIC_ALLOCATORExynos already has this:
Quoted 4 lines
arch/arm/mach-exynos/Kconfig
configSOC_EXYNOS5440... select AUTO_ZRELADDRYes, that is ok. The problem with the imx dependency is that the kconfig parser needs to know the state of the
ZBOOT_ROMsymbol in order to decide whether to selectAUTO_ZRELADDRor not, butZBOOT_ROMin turn depends onAUTO_ZRELADDR.
Quoted 10 lines
On second thought, we should just remove the 'select
AUTO_ZRELADDR' fromARCH_MXCand everything that is multiplatform enabled, since it's already selected byARCH_MULTIPLATFORM. An interesting question is what to do about the case where you actually wantZBOOT_ROMwith a multiplatform enabled machine. We should probably allow that, but it's not possible to express that inKconfigas long asZBOOT_ROMdepends on !AUTO_ZRELADDR. Obviously such a kernel won't be true multiplatform (it will only work on systems with the right rom address), but I think that's ok as long as it's documented well and not enabled by default. This is similar to what we need to allow non-MMU builds for multiplatform machines.
I see.. So, I confirm that above diff fixes my issue.
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
In reply to Arnd BergmannQuoted 30 lines · Arnd Bergmann
Quoted 15 lines · On Wednesday 08 January 2014 13:32:35 Viresh Kumar wrote:
Quoted 4 lines · Russell King
warning: (
ARCH_MULTIPLATFORM&&ARCH_CLPS711X&&ARCH_PXA&&
SOC_EXYNOS5440&&ARCH_EMEV2) selectsAUTO_ZRELADDRwhich has unmet direct dependencies (!ZBOOT_ROM)Quoted 8 lines
This is because it's possible to have
ZBOOT_ROMenabled, but at the same time have another option enabled which selectsAUTO_ZRELADDRoverriding the !ZBOOT_ROM dependency. Fix this by reversing the dependencies betweenZBOOT_ROMand the options which depend on !ZBOOT_ROM.Signed-off-by Russell King <[email protected]>---
Quoted 8 lines
After this patch I see these warnings with
exynos_defconfigarch/arm/Kconfig:1963:error: recursive dependency detected!
arch/arm/Kconfig:1963: symbolZBOOT_ROMdepends onAUTO_ZRELADDRarch/arm/Kconfig:2151: symbolAUTO_ZRELADDRis selected byZBOOT_ROMI am not really sure why this happened as I don't see
AUTO_ZRELADDRselected byZBOOT_ROMinKconfig:)It's a weird dependency. You need this hunk:
arch/arm/mach-imx/Kconfig config ARCH_MXC · line 9
Quoted 8 lines
arch/arm/mach-imx/Kconfig +1
-1@@ -3,7 +3,7 @@ config ARCH_MXC select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR if !ZBOOT_ROM + select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select GENERIC_ALLOCATOR
Hi Arnd,
I haven't seen this go into linux-next yet. Do you plan on sending a patch for this?
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140113/0a36b637/attachment.sig>
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 15 lines · Thierry Reding
arch/arm/mach-imx/Kconfig config ARCH_MXC · line 9
Quoted 11 lines · Arnd Bergmann
arch/arm/mach-imx/Kconfig +1
-1@@ -3,7 +3,7 @@ config ARCH_MXC select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR if !ZBOOT_ROM + select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select GENERIC_ALLOCATORHi Arnd,
Quoted 2 lines
I haven't seen this go into linux-next yet. Do you plan on sending a patch for this?
Maybe someone should respond to this comment from Arnd:
| On second thought, we should just remove the 'select AUTO_ZRELADDR' from | ARCH_MXC and everything that is multiplatform enabled, since it's already | selected by ARCH_MULTIPLATFORM.
which I think is the right way to go here. The ARCH_MXC option is hidden when multiplatform is not enabled. When it is enabled, AUTO_ZRELADDR is selected by the multiplatform option. So having a "select AUTO_ZRELADDR" of any kind under ARCH_MXC is entirely redundant.
Signature · 3 lines
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit".
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 25 lines · Russell King - ARM Linux
Quoted 15 lines · Thierry Reding
arch/arm/mach-imx/Kconfig config ARCH_MXC · line 9
Quoted 11 lines · Arnd Bergmann
arch/arm/mach-imx/Kconfig +1
-1@@ -3,7 +3,7 @@ config ARCH_MXC select ARCH_REQUIRE_GPIOLIB select ARM_CPU_SUSPEND if PM select ARM_PATCH_PHYS_VIRT - select AUTO_ZRELADDR if !ZBOOT_ROM + select AUTO_ZRELADDR select CLKSRC_MMIO select COMMON_CLK select GENERIC_ALLOCATORHi Arnd,
Quoted 2 lines
I haven't seen this go into linux-next yet. Do you plan on sending a patch for this?
Maybe someone should respond to this comment from Arnd:
| On second thought, we should just remove the 'select AUTO_ZRELADDR' from | ARCH_MXC and everything that is multiplatform enabled, since it's already | selected by ARCH_MULTIPLATFORM.
Quoted 5 lines
which I think is the right way to go here. The
ARCH_MXCoption is hidden when multiplatform is not enabled. When it is enabled,AUTO_ZRELADDRis selected by the multiplatform option. So having a "selectAUTO_ZRELADDR" of any kind underARCH_MXCis entirely redundant.
It looks like ARCH_MXC is the only one that matches Arnd's requirements. All other platforms that select AUTO_ZRELADDR seem to not support multi- platform.
Below is a patch to remove the line completely. Shall I post that to the patch tracker?
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-Remove-redundant-select-AUTO_ZRELADDR.patch
Type: text/x-diff
Size: 1302 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140113/82d5820b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140113/82d5820b/attachment-0001.sig>
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 12 lines · Thierry Reding
From
ee1347c28bb7cb56a3c178321253e38de4bbc676Mon Sep 17 00:00:00 2001
From: Thierry Reding <[email protected]>
Date: Fri, 10 Jan 2014 17:12:07 +0100
Subject: [PATCH] ARM: Remove redundant selectAUTO_ZRELADDR
ARCH_MXCdepends onARCH_MULTI_V4_V5orARCH_MULTI_V6_V7, both of which can only be enabled whenARCH_MULTIPLATFORMis selected. If so, then theAUTO_ZRELADDRwill already be selected.Removing the selection of
AUTO_ZRELADDRfromARCH_MXChas the additional benefit of getting rid of the followingKconfigerror:
Quoted 6 lines
arch/arm/Kconfig:1965:error: recursive dependency detected!
arch/arm/Kconfig:1965: symbolZBOOT_ROMdepends onAUTO_ZRELADDRarch/arm/Kconfig:2153: symbolAUTO_ZRELADDRis selected byZBOOT_ROMSuggested-by Arnd Bergmann <[email protected]>Signed-off-by Thierry Reding <[email protected]>
I'm not sure through which tree this needs to go to make sure that both the arm-soc tree and rmk's arm tree are correct by themselves as well as when they get merged.
Arnd
PATCH 1/1 Fix select-induced Kconfig warning for ZBOOT_ROM
Quoted 17 lines · Arnd Bergmann
Quoted 16 lines · Thierry Reding
From
ee1347c28bb7cb56a3c178321253e38de4bbc676Mon Sep 17 00:00:00 2001
From: Thierry Reding <[email protected]>
Date: Fri, 10 Jan 2014 17:12:07 +0100
Subject: [PATCH] ARM: Remove redundant selectAUTO_ZRELADDR
ARCH_MXCdepends onARCH_MULTI_V4_V5orARCH_MULTI_V6_V7, both of which can only be enabled whenARCH_MULTIPLATFORMis selected. If so, then theAUTO_ZRELADDRwill already be selected.Removing the selection of
AUTO_ZRELADDRfromARCH_MXChas the additional benefit of getting rid of the followingKconfigerror:arch/arm/Kconfig:1965:error: recursive dependency detected!
arch/arm/Kconfig:1965: symbolZBOOT_ROMdepends onAUTO_ZRELADDRarch/arm/Kconfig:2153: symbolAUTO_ZRELADDRis selected byZBOOT_ROM
Quoted 8 lines
Quoted 2 lines
Suggested-by Arnd Bergmann <[email protected]>Signed-off-by Thierry Reding <[email protected]>Acked-by Arnd Bergmann <[email protected]>I'm not sure through which tree this needs to go to make sure that both the arm-soc tree and rmk's arm tree are correct by themselves as well as when they get merged.
The original patch went into the arm tree, so I suppose arm-soc isn't really impacted by this unless merged with the arm tree. Therefore I think if this goes in via Russell's tree it should be fine.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140115/28f17b50/attachment.sig>