x86: allow 64bit setting in Kconfig
PATCH 1/1 x86: allow 64bit setting in Kconfig
Recently someone told me he had a bug on x86 and to reproduce it I should "'make allyesconfig' and disable CONFIG_HOTPLUG=y".
But I didn't see it.
"make allyesconfig" is ambiguous on x86 and he had a 64bit computer.
There go another two hours compile time.
It makes sense to have the Kconfig default and the defconfig based on whether you are on a 32bit or a 64bit machine, but it's complete nonsense to not offer the Kconfig variable unless you had explicitely given ARCH=x86 (in which case you could as well immediately set the ARCH to i386 or x86_64).
---fcf848366a166812fa32b2a22f2631fcd4982cb4
arch/x86/Kconfig +1 -1
@@ -3,7 +3,7 @@ mainmenu "Linux Kernel Configuration for x86" # Select 32 or 64 bit config 64BIT - bool "64-bit kernel" if ARCH = "x86" + bool "64-bit kernel" default ARCH = "x86_64" help Say yes to build a 64-bit kernel - formerly known as x86_64
arch/x86/Kconfig mainmenu "Linux Kernel Configuration for x86" · line 9
Quoted 7 lines · Adrian Bunk
# Select 32 or 64 bit
config 64BITarch/x86/Kconfig +1
-1- bool "64-bit kernel" if ARCH = "x86" + bool "64-bit kernel" default ARCH = "x86_64" help Say yes to build a 64-bit kernel - formerly known as x86_64
thx, i've added this to x86.git.
Ingo
Quoted 11 lines · Ingo Molnar
arch/x86/Kconfig mainmenu "Linux Kernel Configuration for x86" · line 9
Quoted 7 lines · Adrian Bunk
# Select 32 or 64 bit
config 64BITarch/x86/Kconfig +1
-1- bool "64-bit kernel" if ARCH = "x86" + bool "64-bit kernel" default ARCH = "x86_64" help Say yes to build a 64-bit kernel - formerly known as x86_64thx, i've added this to x86.git.
Style question, would the following be preferred?
config 64BIT
def_bool ARCH = "x86_64" prompt "64-bit kernel" help...
Cheers,
Harvey
Quoted 14 lines · Harvey Harrison
Quoted 11 lines · Ingo Molnar
arch/x86/Kconfig mainmenu "Linux Kernel Configuration for x86" · line 9
Quoted 7 lines · Adrian Bunk
# Select 32 or 64 bit
config 64BITarch/x86/Kconfig +1
-1- bool "64-bit kernel" if ARCH = "x86" + bool "64-bit kernel" default ARCH = "x86_64" help Say yes to build a 64-bit kernel - formerly known as x86_64thx, i've added this to x86.git.
Quoted 6 lines
Style question, would the following be preferred?
config 64BIT
def_bool ARCH = "x86_64" prompt "64-bit kernel" help...
No.
It is most common to let the prompt follow the type and not as a separate property.
Sam
Quoted 14 lines · Harvey Harrison
Quoted 11 lines · Ingo Molnar
arch/x86/Kconfig mainmenu "Linux Kernel Configuration for x86" · line 9
Quoted 7 lines · Adrian Bunk
# Select 32 or 64 bit
config 64BITarch/x86/Kconfig +1
-1- bool "64-bit kernel" if ARCH = "x86" + bool "64-bit kernel" default ARCH = "x86_64" help Say yes to build a 64-bit kernel - formerly known as x86_64thx, i've added this to x86.git.
Quoted 6 lines
Style question, would the following be preferred?
config 64BIT
def_bool ARCH = "x86_64" prompt "64-bit kernel" help...
sure, we could do that too.
Ingo
Quoted 10 lines · Sam Ravnborg
Quoted 6 lines
Style question, would the following be preferred?
config 64BIT
def_bool ARCH = "x86_64" prompt "64-bit kernel" help...No.
It is most common to let the prompt follow the type and not as a separate property.
hm, ok. I guess there's not much cleanliness difference between:
bool "64-bit kernel"
default ARCH = "x86_64"
and:
def_bool ARCH = "x86_64"
prompt "64-bit kernel"
Ingo
Quoted 16 lines · Ingo Molnar
Quoted 10 lines · Sam Ravnborg
Quoted 6 lines
Style question, would the following be preferred?
config 64BIT
def_bool ARCH = "x86_64" prompt "64-bit kernel" help...No.
It is most common to let the prompt follow the type and not as a separate property.hm, ok. I guess there's not much cleanliness difference between:
Quoted 7 lines
bool "64-bit kernel"
default ARCH = "x86_64"and:
def_boolARCH = "x86_64"
prompt "64-bit kernel"
At least for me it's clear what the former does while I had to try the latter for understanding what it does exactly...
Quoted 1 line
Ingo
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 12 lines · Ingo Molnar
arch/x86/Kconfig mainmenu "Linux Kernel Configuration for x86" · line 9
Quoted 7 lines · Adrian Bunk
# Select 32 or 64 bit
config 64BITarch/x86/Kconfig +1
-1- bool "64-bit kernel" if ARCH = "x86" + bool "64-bit kernel" default ARCH = "x86_64" help Say yes to build a 64-bit kernel - formerly known as x86_64thx, i've added this to x86.git.
this broke "make ARCH=i386 randconfig" from working when there's a 64-bit .config present. (it will not properly generate a 32-bit config, but still a 64-bit config)
Ingo
Quoted 16 lines · Ingo Molnar
Quoted 12 lines · Ingo Molnar
arch/x86/Kconfig mainmenu "Linux Kernel Configuration for x86" · line 9
Quoted 7 lines · Adrian Bunk
# Select 32 or 64 bit
config 64BITarch/x86/Kconfig +1
-1- bool "64-bit kernel" if ARCH = "x86" + bool "64-bit kernel" default ARCH = "x86_64" help Say yes to build a 64-bit kernel - formerly known as x86_64thx, i've added this to x86.git.
Quoted 3 lines
this broke "make ARCH=i386 randconfig" from working when there's a 64-bit .config present. (it will not properly generate a 32-bit config, but still a 64-bit config)
Does it always generate a 64bit .config or randomly a 32bit or 64bit .config?
As far as I see it's the latter.
If the unified x86 architecture should be presented as one architecture in kconfig that's expected - and it might even reduce the amount of 32bit compile errors that recently occured in the git-x86 tree...
Quoted 1 line
Ingo
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 10 lines · Adrian Bunk
Quoted 5 lines
Quoted 1 line
thx, i've added this to x86.git.
this broke "make ARCH=i386 randconfig" from working when there's a 64-bit .config present. (it will not properly generate a 32-bit config, but still a 64-bit config)
Does it always generate a 64bit .config or randomly a 32bit or 64bit .config?
As far as I see it's the latter.
it inherits the existing .config's arch setting - and that's what people expect. I use a tree either in 64-bit mode or in 32-bit mode, fully driven via the .config alone. The Kbuild magic picks up the right arch variant and it all just works fine.
Ingo
Quoted 12 lines · Ingo Molnar
Quoted 9 lines · Adrian Bunk
Quoted 5 lines
Quoted 1 line
thx, i've added this to x86.git.
this broke "make ARCH=i386 randconfig" from working when there's a 64-bit .config present. (it will not properly generate a 32-bit config, but still a 64-bit config)
Does it always generate a 64bit .config or randomly a 32bit or 64bit .config?
Quoted 6 lines
Quoted 1 line
As far as I see it's the latter.
it inherits the existing .config's arch setting - and that's what people expect. I use a tree either in 64-bit mode or in 32-bit mode, fully driven via the .config alone. The
Kbuildmagic picks up the right arch variant and it all just works fine.
If you think anything was "fully driven via the .config alone" you seem to neither understand how it works without my patch nor how it works with my patch.
What drives your build without my patch is _not_ the .config but your ARCH=i386.
When understand this, you might start understanding why I bang my head against the wall each time a "make" fails on a 64bit .config when I try to reproduce some compile or section mismatch problem someone reported and kconfig automatically forces CONFIG_64BIT=n since I'm on a 32bit computer.
Can we please get my patch into 2.6.24 so that we'll get _one_ architecture in kconfig and not the current mess with three different situations in kconfig based on the ARCH setting (and the 32/64bit of your userspace forcing a CONFIG_64BIT setting you have to override with ARCH= on the command line)?
Quoted 1 line
Ingo
cu
Adrian
BTW: The correct way to drive your randconfigs (that is not limited to
to 32/64bit) is to use KCONFIG_ALLCONFIG.
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed