LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6.24 patch] x86: allow 64bit setting in Kconfig
@ 2008-01-17 21:43 Adrian Bunk
  2008-01-18 10:44 ` Ingo Molnar
  0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2008-01-17 21:43 UTC (permalink / raw)
  To: Sam Ravnborg, tglx, mingo, hpa; +Cc: linux-kernel

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).

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
fcf848366a166812fa32b2a22f2631fcd4982cb4 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 80b7ba4..0e6e74d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-17 21:43 [2.6.24 patch] x86: allow 64bit setting in Kconfig Adrian Bunk
@ 2008-01-18 10:44 ` Ingo Molnar
  2008-01-18 10:50   ` Harvey Harrison
  2008-01-18 17:00   ` Ingo Molnar
  0 siblings, 2 replies; 11+ messages in thread
From: Ingo Molnar @ 2008-01-18 10:44 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Sam Ravnborg, tglx, mingo, hpa, linux-kernel


* Adrian Bunk <bunk@kernel.org> wrote:

>  # 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

thx, i've added this to x86.git.

	Ingo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 10:44 ` Ingo Molnar
@ 2008-01-18 10:50   ` Harvey Harrison
  2008-01-18 11:37     ` Sam Ravnborg
  2008-01-18 11:48     ` Ingo Molnar
  2008-01-18 17:00   ` Ingo Molnar
  1 sibling, 2 replies; 11+ messages in thread
From: Harvey Harrison @ 2008-01-18 10:50 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Adrian Bunk, Sam Ravnborg, tglx, mingo, hpa, linux-kernel


On Fri, 2008-01-18 at 11:44 +0100, Ingo Molnar wrote:
> * Adrian Bunk <bunk@kernel.org> wrote:
> 
> >  # 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
> 
> thx, 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 10:50   ` Harvey Harrison
@ 2008-01-18 11:37     ` Sam Ravnborg
  2008-01-18 12:02       ` Ingo Molnar
  2008-01-18 11:48     ` Ingo Molnar
  1 sibling, 1 reply; 11+ messages in thread
From: Sam Ravnborg @ 2008-01-18 11:37 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Ingo Molnar, Adrian Bunk, tglx, mingo, hpa, linux-kernel

On Fri, Jan 18, 2008 at 02:50:48AM -0800, Harvey Harrison wrote:
> 
> On Fri, 2008-01-18 at 11:44 +0100, Ingo Molnar wrote:
> > * Adrian Bunk <bunk@kernel.org> wrote:
> > 
> > >  # 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
> > 
> > thx, 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...

No.
It is most common to let the prompt follow the type and not
as a separate property.

	Sam

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 10:50   ` Harvey Harrison
  2008-01-18 11:37     ` Sam Ravnborg
@ 2008-01-18 11:48     ` Ingo Molnar
  1 sibling, 0 replies; 11+ messages in thread
From: Ingo Molnar @ 2008-01-18 11:48 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: Adrian Bunk, Sam Ravnborg, tglx, mingo, hpa, linux-kernel


* Harvey Harrison <harvey.harrison@gmail.com> wrote:

> 
> On Fri, 2008-01-18 at 11:44 +0100, Ingo Molnar wrote:
> > * Adrian Bunk <bunk@kernel.org> wrote:
> > 
> > >  # 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
> > 
> > thx, 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...

sure, we could do that too.

	Ingo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 11:37     ` Sam Ravnborg
@ 2008-01-18 12:02       ` Ingo Molnar
  2008-01-18 12:09         ` Adrian Bunk
  0 siblings, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2008-01-18 12:02 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Harvey Harrison, Adrian Bunk, tglx, mingo, hpa, linux-kernel


* Sam Ravnborg <sam@ravnborg.org> wrote:

> > 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 12:02       ` Ingo Molnar
@ 2008-01-18 12:09         ` Adrian Bunk
  0 siblings, 0 replies; 11+ messages in thread
From: Adrian Bunk @ 2008-01-18 12:09 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Sam Ravnborg, Harvey Harrison, tglx, mingo, hpa, linux-kernel

On Fri, Jan 18, 2008 at 01:02:48PM +0100, Ingo Molnar wrote:
> 
> * Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > > 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"

At least for me it's clear what the former does while I had to try the 
latter for understanding what it does exactly...

> 	Ingo

cu
Adrian

-- 

       "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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 10:44 ` Ingo Molnar
  2008-01-18 10:50   ` Harvey Harrison
@ 2008-01-18 17:00   ` Ingo Molnar
  2008-01-18 17:26     ` Adrian Bunk
  1 sibling, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2008-01-18 17:00 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Sam Ravnborg, tglx, mingo, hpa, linux-kernel


* Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Adrian Bunk <bunk@kernel.org> wrote:
> 
> >  # 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
> 
> 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)

	Ingo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 17:00   ` Ingo Molnar
@ 2008-01-18 17:26     ` Adrian Bunk
  2008-01-18 21:06       ` Ingo Molnar
  0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2008-01-18 17:26 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Sam Ravnborg, tglx, mingo, hpa, linux-kernel

On Fri, Jan 18, 2008 at 06:00:37PM +0100, Ingo Molnar wrote:
> 
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > 
> > * Adrian Bunk <bunk@kernel.org> wrote:
> > 
> > >  # 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
> > 
> > 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.

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...

> 	Ingo

cu
Adrian

-- 

       "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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 17:26     ` Adrian Bunk
@ 2008-01-18 21:06       ` Ingo Molnar
  2008-01-18 21:23         ` Adrian Bunk
  0 siblings, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2008-01-18 21:06 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Sam Ravnborg, tglx, mingo, hpa, linux-kernel


* Adrian Bunk <bunk@kernel.org> wrote:

> > > 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [2.6.24 patch] x86: allow 64bit setting in Kconfig
  2008-01-18 21:06       ` Ingo Molnar
@ 2008-01-18 21:23         ` Adrian Bunk
  0 siblings, 0 replies; 11+ messages in thread
From: Adrian Bunk @ 2008-01-18 21:23 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Sam Ravnborg, tglx, mingo, hpa, linux-kernel

On Fri, Jan 18, 2008 at 10:06:33PM +0100, Ingo Molnar wrote:
> 
> * Adrian Bunk <bunk@kernel.org> wrote:
> 
> > > > 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.

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)?

> 	Ingo

cu
Adrian

BTW: The correct way to drive your randconfigs (that is not limited to
     to 32/64bit) is to use KCONFIG_ALLCONFIG.


-- 

       "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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-01-18 21:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-17 21:43 [2.6.24 patch] x86: allow 64bit setting in Kconfig Adrian Bunk
2008-01-18 10:44 ` Ingo Molnar
2008-01-18 10:50   ` Harvey Harrison
2008-01-18 11:37     ` Sam Ravnborg
2008-01-18 12:02       ` Ingo Molnar
2008-01-18 12:09         ` Adrian Bunk
2008-01-18 11:48     ` Ingo Molnar
2008-01-18 17:00   ` Ingo Molnar
2008-01-18 17:26     ` Adrian Bunk
2008-01-18 21:06       ` Ingo Molnar
2008-01-18 21:23         ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).