diff mbox

[3/3] ARM: only select ARM_PATCH_PHYS_VIRT if MMU is enabled

Message ID 1404295043-6661-3-git-send-email-u.kleine-koenig@pengutronix.de
State New
Headers show

Commit Message

Uwe Kleine-König July 2, 2014, 9:57 a.m. UTC
This fixes the following warning:

	warning: (ARCH_MULTIPLATFORM && ARCH_INTEGRATOR && ARCH_SHMOBILE_LEGACY) selects ARM_PATCH_PHYS_VIRT which has unmet direct dependencies (!XIP_KERNEL && MMU && (!ARCH_REALVIEW || !SPARSEMEM))

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
I'm not sure why ARCH_MULTIPLATFORM appears here. It depends on MMU,
isn't selectable at the same time as ARCH_REALVIEW and XIP_KERNEL
depends on !ARCH_MULTIPLATFORM.

An alternative for ARCH_SHMOBILE_LEGACY is to let it depend on MMU, too.

*shrug*
---
 arch/arm/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Russell King - ARM Linux July 2, 2014, 10:35 a.m. UTC | #1
On Wed, Jul 02, 2014 at 11:57:23AM +0200, Uwe Kleine-König wrote:
> This fixes the following warning:
> 
> 	warning: (ARCH_MULTIPLATFORM && ARCH_INTEGRATOR && ARCH_SHMOBILE_LEGACY) selects ARM_PATCH_PHYS_VIRT which has unmet direct dependencies (!XIP_KERNEL && MMU && (!ARCH_REALVIEW || !SPARSEMEM))
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> I'm not sure why ARCH_MULTIPLATFORM appears here. It depends on MMU,
> isn't selectable at the same time as ARCH_REALVIEW and XIP_KERNEL
> depends on !ARCH_MULTIPLATFORM.

The message is extremely confusing.  It would read better if those
&& were || - because ARM_PATCH_PHYS_VIRT is selected by
ARCH_MULTIPLATFORM _or_ ARCH_INTEGRATOR _or_ ARCH_SHMOBILE_LEGACY:

config ARCH_MULTIPLATFORM
        select ARM_PATCH_PHYS_VIRT

config ARCH_INTEGRATOR
        select ARM_PATCH_PHYS_VIRT

config ARCH_SHMOBILE_LEGACY
        select ARM_PATCH_PHYS_VIRT
Uwe Kleine-König July 7, 2014, 6:51 a.m. UTC | #2
Hello,

(adding Yann and linux-kbuild to recipents)

On Wed, Jul 02, 2014 at 11:35:12AM +0100, Russell King - ARM Linux wrote:
> On Wed, Jul 02, 2014 at 11:57:23AM +0200, Uwe Kleine-König wrote:
> > This fixes the following warning:
> > 
> > 	warning: (ARCH_MULTIPLATFORM && ARCH_INTEGRATOR && ARCH_SHMOBILE_LEGACY) selects ARM_PATCH_PHYS_VIRT which has unmet direct dependencies (!XIP_KERNEL && MMU && (!ARCH_REALVIEW || !SPARSEMEM))
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> > I'm not sure why ARCH_MULTIPLATFORM appears here. It depends on MMU,
> > isn't selectable at the same time as ARCH_REALVIEW and XIP_KERNEL
> > depends on !ARCH_MULTIPLATFORM.
> 
> The message is extremely confusing.  It would read better if those
> && were || - because ARM_PATCH_PHYS_VIRT is selected by
> ARCH_MULTIPLATFORM _or_ ARCH_INTEGRATOR _or_ ARCH_SHMOBILE_LEGACY:
right, so there are two things that could be improved here. The
resolution I'd prefer is to make this two warnings:

   ARCH_INTEGRATOR selects ARM_PATCH_PHYS_VIRT which has unmet direct dependencies (!XIP_KERNEL && MMU)
   ARCH_SHMOBILE_LEGACY selects ARM_PATCH_PHYS_VIRT which has unmet direct dependencies (!XIP_KERNEL && MMU)

ARCH_REALVIEW cannot be selected at the same time as ARCH_INTEGRATOR or
ARCH_SHMOBILE_LEGACY, so that can be dropped. And as stated above
ARCH_MULTIPLATFORM isn't an issue.

This doesn't have the natural language problem that ARCH_MULTIPLATFORM
*and* ARCH_INTEGRATOR *and* ARCH_SHMOBILE_LEGACY all select
ARM_PATCH_PHYS_VIRT.

> config ARCH_MULTIPLATFORM
>         select ARM_PATCH_PHYS_VIRT
> 
> config ARCH_INTEGRATOR
>         select ARM_PATCH_PHYS_VIRT
> 
> config ARCH_SHMOBILE_LEGACY
>         select ARM_PATCH_PHYS_VIRT
> 
(For reference, the patch did:

	-       select ARM_PATCH_PHYS_VIRT
	+       select ARM_PATCH_PHYS_VIRT if MMU

for ARCH_INTEGRATOR and ARCH_SHMOBILE_LEGACY)

Best regards
Uwe
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6dab0604b911..ecfaf489cc95 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -320,7 +320,7 @@  config ARCH_MULTIPLATFORM
 config ARCH_INTEGRATOR
 	bool "ARM Ltd. Integrator family"
 	select ARM_AMBA
-	select ARM_PATCH_PHYS_VIRT
+	select ARM_PATCH_PHYS_VIRT if MMU
 	select AUTO_ZRELADDR
 	select COMMON_CLK
 	select COMMON_CLK_VERSATILE
@@ -665,7 +665,7 @@  config ARCH_MSM
 config ARCH_SHMOBILE_LEGACY
 	bool "Renesas ARM SoCs (non-multiplatform)"
 	select ARCH_SHMOBILE
-	select ARM_PATCH_PHYS_VIRT
+	select ARM_PATCH_PHYS_VIRT if MMU
 	select CLKDEV_LOOKUP
 	select GENERIC_CLOCKEVENTS
 	select HAVE_ARM_SCU if SMP