public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	linux-kbuild@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Borislav Petkov <bp@alien8.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Will Deacon <will@kernel.org>, Waiman Long <longman@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH] x86/config: Make the x86 defconfigs a bit more usable
Date: Fri, 2 Sep 2022 10:50:28 +0200	[thread overview]
Message-ID: <YxHD1MkulyL3yB9y@gmail.com> (raw)
In-Reply-To: <YkHXQTKImf7Wr+Sk@dev-arch.thelio-3990X>


* Nathan Chancellor <nathan@kernel.org> wrote:

> On Sun, Mar 27, 2022 at 09:03:14PM +0200, Ingo Molnar wrote:
> > Yeah, good catch! ...
> > 
> > I use defconfigs by explicitly adding in the architecture:
> > 
> >   kepler:~/tip> make ARCH=i386 defconfig
> > 
> >   kepler:~/tip> kconfig-arch
> >   i386
> > 
> > ... so never I noticed this bug.
> 
> Ah, good point!
> 
> > I fixed this in the latest version (attached).
> > 
> > Arguably 'make ARCH=i386 savedefconfig' should preserve this, so that 
> > refreshing defconfigs on bi-arch architectures is idempotent, but that's no 
> > excuse to regress the existing defconfig behavior.
> 
> Hmmm, I thought that it would, but I think the behavior of savedefconfig
> is actually correct with regards to how it handles CONFIG_64BIT in the
> presence of an explicit ARCH value, based on how CONFIG_64BIT is
> defined:
> 
> config 64BIT
> 	bool "64-bit kernel" if "$(ARCH)" = "x86"
> 	default "$(ARCH)" != "i386"
> 	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
> 
> As the default is no when ARCH == i386 and there is no prompt in that
> situation, "# CONFIG_64BIT is not set" gets dropped, as that is the
> default. Using savedefconfig without the ARCH variable would do the
> right thing.
> 
> I tried playing around with these Kconfig symbols to see if I could get
> something that would work for savedefconfig with or without ARCH, but I
> could not really come up with anything. I did not try super hard though,
> it might still be possible.

Unfortunately, even without the ARCH=i386 'make savedefconfig' doesn't seem 
to be doing the right thing & is dropping the '# CONFIG_64BIT is not set' 
line:

 kepler:~/tip> make ARCH=i386 defconfig
 *** Default configuration is based on 'i386_defconfig'
 #
 # configuration written to .config
 #
 kepler:~/tip> make savedefconfig
 kepler:~/tip> diff -up arch/x86/configs/i386_defconfig defconfig
 --- arch/x86/configs/i386_defconfig	2022-09-02 10:45:43.117430882 +0200
 +++ defconfig	2022-09-02 10:46:56.663864901 +0200
 @@ -282,4 +282,3 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
  CONFIG_EARLY_PRINTK_DBGP=y
  CONFIG_DEBUG_BOOT_PARAMS=y
  CONFIG_UNWINDER_FRAME_POINTER=y
 -# CONFIG_64BIT is not set
 kepler:~/tip> 

This is annoying in that every time I modify the i386 defconfig and use 
'make savedefconfig', I have to manually revert that change ...

This reduces the usability of 'make savedefconfig' quite a bit.

Maybe Masahiro-san can tell me how I'm doing this wrong?

Thanks,

	Ingo

       reply	other threads:[~2022-09-02  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <YjhdcJB4FaLfsoyO@gmail.com>
     [not found] ` <CAHk-=wjS6ptr5=JqmmyEb_qTjDz_68+S=h1o1bL1fEyArVOymA@mail.gmail.com>
     [not found]   ` <YjpLiKRUIB4TGJm0@zn.tnic>
     [not found]     ` <CAHk-=wifoM9VOp-55OZCRcO9MnqQ109UTuCiXeZ-eyX_JcNVGg@mail.gmail.com>
     [not found]       ` <YjsCpoRK7W4l6tSh@zn.tnic>
     [not found]         ` <CAHk-=wi9pLxm+dXoCaiGO+f0EbhyfAR_L510vD0c2=hj6rbMXg@mail.gmail.com>
     [not found]           ` <YjwsUT/6PkRPjnHE@gmail.com>
     [not found]             ` <YjySjys3QZAWFlfo@dev-arch.thelio-3990X>
     [not found]               ` <YkC08gKqJOUM7CA8@gmail.com>
     [not found]                 ` <YkHXQTKImf7Wr+Sk@dev-arch.thelio-3990X>
2022-09-02  8:50                   ` Ingo Molnar [this message]
2022-09-02  9:18                     ` [PATCH] x86/config: Make the x86 defconfigs a bit more usable Masahiro Yamada
2022-09-04  9:48                       ` Ingo Molnar
2022-09-05  2:16                         ` Masahiro Yamada
2022-09-05  9:54                           ` Ingo Molnar
     [not found]                             ` <CAK7LNAQyiNpbLuVjjQ8-GOQECtfQZqsNS8xH0E2ZkLAHYtXt7A@mail.gmail.com>
2022-09-10 17:28                               ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YxHD1MkulyL3yB9y@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox