6d041dc
From patchwork Sun Jul 22 10:01:43 2012
6d041dc
Content-Type: text/plain; charset="utf-8"
6d041dc
MIME-Version: 1.0
6d041dc
Content-Transfer-Encoding: 7bit
6d041dc
Subject: arm-allnoconfig error: '__LINUX_ARM_ARCH__' undeclared
6d041dc
Date: Sun, 22 Jul 2012 10:01:43 -0000
6d041dc
From: Arnd Bergmann <arnd@arndb.de>
6d041dc
X-Patchwork-Id: 1224201
6d041dc
Message-Id: <201207221001.43528.arnd@arndb.de>
6d041dc
To: Fengguang Wu <fengguang.wu@intel.com>
6d041dc
Cc: Russell King <linux@arm.linux.org.uk>,
6d041dc
 LKML <linux-kernel@vger.kernel.org>, linux-arm-kernel@lists.infradead.org
6d041dc
6d041dc
On Sunday 22 July 2012, Fengguang Wu wrote:
6d041dc
> Kernel build failed on arm-allnoconfig:
6d041dc
> 
6d041dc
> include/linux/math64.h:55:15: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function)
6d041dc
> arch/arm/include/asm/glue-cache.h:129:2: error: #error Unknown cache maintenance model
6d041dc
> arch/arm/include/asm/glue-df.h:99:2: error: #error Unknown data abort handler type
6d041dc
> arch/arm/include/asm/glue-pf.h:54:2: error: #error Unknown prefetch abort handler type
6d041dc
> 
6d041dc
> Do you think this allnoconfig test meaningful at all?
6d041dc
6d041dc
The allno/mod/yesconfig tests on ARM are somewhat limited in their
6d041dc
usefulness at the moment because they always pick the same platform
6d041dc
type (versatile) and don't really cover the cases that most people
6d041dc
are interested in.
6d041dc
6d041dc
The particular problem with allnoconfig is that the logic to determine
6d041dc
the architecture level depends on at least one platform being selected,
6d041dc
and there are also problems with nommu kernels that tend to not work
6d041dc
if certain other options are not set correctly. 
6d041dc
6d041dc
We can make the nommu case go away if we make hide the option for
6d041dc
non-expert configurations including allnoconfig. I suggested adding
6d041dc
some logic to all the subarch Kconfig files that forces at least
6d041dc
one of the boards to be enabled like the patch below, but a number
6d041dc
of people didn't like it.
6d041dc
6d041dc
For reference, here is what I would use in order to get 'make
6d041dc
allnoconfig' to work on ARM. My impression is at the moment that
6d041dc
we should make a more serious attempt at fixing all the possible
6d041dc
configurations when we get to 'multiplatform' configurations,
6d041dc
because that will be more interesting than doing it just for
6d041dc
the versatile platform.
6d041dc
6d041dc
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
6d041dc
6d041dc
6d041dc
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
6d041dc
index a306d6d..e43e743 100644
6d041dc
--- a/arch/arm/Kconfig
6d041dc
+++ b/arch/arm/Kconfig
6d041dc
@@ -236,7 +236,7 @@ source "kernel/Kconfig.freezer"
6d041dc
 menu "System Type"
6d041dc
 
6d041dc
 config MMU
6d041dc
-	bool "MMU-based Paged Memory Management Support"
6d041dc
+	bool "MMU-based Paged Memory Management Support" if EXPERT
6d041dc
 	default y
6d041dc
 	help
6d041dc
 	  Select if you want MMU-based virtualised addressing space
6d041dc
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
6d041dc
index c1f38f6..455f20a 100644
6d041dc
--- a/arch/arm/mach-versatile/Kconfig
6d041dc
+++ b/arch/arm/mach-versatile/Kconfig
6d041dc
@@ -25,4 +25,13 @@ config MACH_VERSATILE_DT
6d041dc
 	  Include support for the ARM(R) Versatile/PB platform,
6d041dc
 	  using the device tree for discovery
6d041dc
 
6d041dc
+config MACH_VERSATILE_AUTO
6d041dc
+	def_bool y
6d041dc
+	depends on !ARCH_VERSATILE_PB
6d041dc
+	depends on !MACH_VERSATILE_AB
6d041dc
+	select MACH_VERSATILE_DT
6d041dc
+	help
6d041dc
+	  We autoselect MACH_VERSATILE_DT if both PB and AB are
6d041dc
+	  disabled, to ensure that at least one platform is enabled.
6d041dc
+
6d041dc
 endmenu