[PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386

Ingo Molnar posted 15 patches 7 months, 2 weeks ago
[PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
Posted by Ingo Molnar 7 months, 2 weeks ago
Editing the defconfigs with shell filename completion is unnecessarily
hard due to bad naming: if one remembers 'arch/x86/config/defconfig',
it won't lead to the right files, because the defconfigs are
prefixed with $(ARCH)_.

Under the principle of 'higher order names should go first', prefix
them with 'defconfig' and postfix them with .$(ARCH), and thus make
all x86 configs match the arch/x86/config/defconfig.* pattern.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
---
 Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst | 2 +-
 arch/x86/Makefile                                                | 6 +++---
 arch/x86/configs/{i386_defconfig => defconfig.i386}              | 0
 arch/x86/configs/{x86_64_defconfig => defconfig.x86_64}          | 0
 drivers/gpu/drm/ci/build.yml                                     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
index 03c55151346c..bcd2bdf6c076 100644
--- a/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
+++ b/Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
@@ -426,7 +426,7 @@ machine; if you want to compile the kernel on another system, check
   Look out for a line starting with '# using defaults found in'. It should be
   followed by a path to a file in '/boot/' that contains the release identifier
   of your currently working kernel. If the line instead continues with something
-  like 'arch/x86/configs/x86_64_defconfig', then the build infra failed to find
+  like 'arch/x86/configs/defconfig.x86_64', then the build infra failed to find
   the .config file for your running kernel -- in which case you have to put one
   there manually, as explained in the reference section.
 
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 594723005d95..bae2c7bbb8db 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -4,12 +4,12 @@
 # select defconfig based on actual architecture
 ifeq ($(ARCH),x86)
   ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
-        KBUILD_DEFCONFIG := i386_defconfig
+        KBUILD_DEFCONFIG := defconfig.i386
   else
-        KBUILD_DEFCONFIG := x86_64_defconfig
+        KBUILD_DEFCONFIG := defconfig.x86_64
   endif
 else
-        KBUILD_DEFCONFIG := $(ARCH)_defconfig
+        KBUILD_DEFCONFIG := defconfig.$(ARCH)
 endif
 
 ifdef CONFIG_CC_IS_GCC
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/defconfig.i386
similarity index 100%
rename from arch/x86/configs/i386_defconfig
rename to arch/x86/configs/defconfig.i386
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/defconfig.x86_64
similarity index 100%
rename from arch/x86/configs/x86_64_defconfig
rename to arch/x86/configs/defconfig.x86_64
diff --git a/drivers/gpu/drm/ci/build.yml b/drivers/gpu/drm/ci/build.yml
index 274f118533a7..2e0ce38d73cd 100644
--- a/drivers/gpu/drm/ci/build.yml
+++ b/drivers/gpu/drm/ci/build.yml
@@ -35,7 +35,7 @@
     - .build
     - .use-debian/x86_64_build
   variables:
-    DEFCONFIG: "arch/x86/configs/x86_64_defconfig"
+    DEFCONFIG: "arch/x86/configs/defconfig.x86_64"
     KERNEL_IMAGE_NAME: "bzImage"
     KERNEL_ARCH: "x86_64"
 
-- 
2.45.2
Re: [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
Posted by Arnd Bergmann 7 months, 2 weeks ago
On Tue, May 6, 2025, at 19:09, Ingo Molnar wrote:
> Editing the defconfigs with shell filename completion is unnecessarily
> hard due to bad naming: if one remembers 'arch/x86/config/defconfig',
> it won't lead to the right files, because the defconfigs are
> prefixed with $(ARCH)_.
>
> Under the principle of 'higher order names should go first', prefix
> them with 'defconfig' and postfix them with .$(ARCH), and thus make
> all x86 configs match the arch/x86/config/defconfig.* pattern.

I think this patch should be dropped completely, it as it causes
multiple problems:

- it breaks existing scripts that use 'make x86_64_defconfig'
- it breaks 'make help' automatically printing the names
  of the defconfigs
- it's inconsistent with the other architectures

       Arnd
Re: [PATCH 03/15] x86/kconfig: Rename x86_64_defconfig to defconfig.x86_64 and i386_defconfig to defconfig.i386
Posted by Ingo Molnar 7 months, 1 week ago
* Arnd Bergmann <arnd@arndb.de> wrote:

> On Tue, May 6, 2025, at 19:09, Ingo Molnar wrote:
> > Editing the defconfigs with shell filename completion is unnecessarily
> > hard due to bad naming: if one remembers 'arch/x86/config/defconfig',
> > it won't lead to the right files, because the defconfigs are
> > prefixed with $(ARCH)_.
> >
> > Under the principle of 'higher order names should go first', prefix
> > them with 'defconfig' and postfix them with .$(ARCH), and thus make
> > all x86 configs match the arch/x86/config/defconfig.* pattern.
> 
> I think this patch should be dropped completely, it as it causes
> multiple problems:
> 
> - it breaks existing scripts that use 'make x86_64_defconfig'
> - it breaks 'make help' automatically printing the names
>   of the defconfigs
> - it's inconsistent with the other architectures

Oh well, I've removed patches #3 and #4.

Thanks,

	Ingo