From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752883AbbDCNmZ (ORCPT ); Fri, 3 Apr 2015 09:42:25 -0400 Received: from lb2-smtp-cloud6.xs4all.net ([194.109.24.28]:42184 "EHLO lb2-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbbDCNmW (ORCPT ); Fri, 3 Apr 2015 09:42:22 -0400 Message-ID: <1428068538.2491.14.camel@tiscali.nl> Subject: Re: [PATCH] x86/Kconfig: Fix allnoconfig without explicitly specified ARCH From: Paul Bolle To: Borislav Petkov Cc: Ingo Molnar , X86 ML , LKML Date: Fri, 03 Apr 2015 15:42:18 +0200 In-Reply-To: <1428058828-19302-1-git-send-email-bp@alien8.de> References: <1428058828-19302-1-git-send-email-bp@alien8.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Borislav Petkov schreef op vr 03-04-2015 om 13:00 [+0200]: > From: Borislav Petkov > > Doing > > $ make allnoconfig > > I get a 32-bit allnoconfig: > > $ grep -i x86 .config > # Linux/x86 4.0.0-rc6 Kernel Configuration > CONFIG_X86_32=y > CONFIG_X86=y > CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" > > The same if I do: > > $ make ARCH=i386 allnoconfig > $ grep -i x86 .config | head -20 > CONFIG_X86_32=y > CONFIG_X86=y > CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" > > Make allnoconfig without ARCH specified on the command line default to > 64-bit. > > Signed-off-by: Borislav Petkov > --- > arch/x86/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0a37094e458e..04dfb4e7aeff 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -2,6 +2,7 @@ > config 64BIT > bool "64-bit kernel" if ARCH = "x86" > default ARCH != "i386" > + option allnoconfig_y > ---help--- > Say yes to build a 64-bit kernel - formerly known as x86_64 > Say no to build a 32-bit kernel - formerly known as i386 A side effect of this patch is that allnoconfig when building on 32 bits now also requires to set ARCH=i386, which is surprising. This seems to help with that: --- a/Makefile +++ b/Makefile @@ -221,7 +221,7 @@ export srctree objtree VPATH # then ARCH is assigned, getting whatever value it gets normally, and # SUBARCH is subsequently ignored. -SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ +SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/x86_64/x86/ \ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ And that will also set 64BIT to 'n' when doing an allyesconfig on 32 bits. So it removes another surprising configuration one can currently generate. (I think that has no further side effects. But I need to double check.) Would some solution that pins 64BIT to 'y' for x86_64 and to 'n' for i386 - even for allnoconfig and allyesconfig - do what you want? Paul Bolle