[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H4Df+c47ocBn2SN3iHDbFWGg9-i2+wY27TvtcpBa=pp7Q@mail.gmail.com>
Date: Sat, 22 Nov 2025 22:13:29 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Thomas Weißschuh <thomas@...ch.de>,
Huacai Chen <chenhuacai@...ngson.cn>, loongarch@...ts.linux.dev,
Linux-Arch <linux-arch@...r.kernel.org>, Xuefeng Li <lixuefeng@...ngson.cn>,
guoren <guoren@...nel.org>, WANG Xuerui <kernel@...0n.name>,
Jiaxun Yang <jiaxun.yang@...goat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 13/14] LoongArch: Adjust default config files for 32BIT/64BIT
Hi, Arnd,
On Sat, Nov 22, 2025 at 7:57 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Sat, Nov 22, 2025, at 10:45, Thomas Weißschuh wrote:
> > On 2025-11-22 12:36:33+0800, Huacai Chen wrote:
> >> Add loongson32_defconfig (for 32BIT) and rename loongson3_defconfig to
> >> loongson64_defconfig (for 64BIT).
> >>
> >> Also adjust graphics drivers, such as FB_EFI is replaced with EFIDRM.
> >>
> >> Reviewed-by: Arnd Bergmann <arnd@...db.de>
> >> Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
> >> Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> >> ---
> >> arch/loongarch/Makefile | 7 +-
> >> arch/loongarch/configs/loongson32_defconfig | 1104 +++++++++++++++++
> >> ...ongson3_defconfig => loongson64_defconfig} | 6 +-
> >> 3 files changed, 1113 insertions(+), 4 deletions(-)
> >> create mode 100644 arch/loongarch/configs/loongson32_defconfig
> >> rename arch/loongarch/configs/{loongson3_defconfig => loongson64_defconfig} (99%)
> >>
> >> diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
> >> index 96ca1a688984..cf9373786969 100644
> >> --- a/arch/loongarch/Makefile
> >> +++ b/arch/loongarch/Makefile
> >> @@ -5,7 +5,12 @@
> >>
> >> boot := arch/loongarch/boot
> >>
> >> -KBUILD_DEFCONFIG := loongson3_defconfig
> >> +ifdef CONFIG_32BIT
> >
> > Testing for CONFIG options here doesn't make sense, as the config is not yet
> > created.
>
> Right
>
> > Either test for $(ARCH) or uname or just use one unconditionally.
>
> I don't really like the $(ARCH) hacks, nobody is going to build kernels
> natively on loongarch32, and for the rest it's fine to set the option.
OK, I will use 'uname -m' for checking. Though native builds on
loongarch32 will hardly happen, we can give a small chance to use
loongson32_defconfig, in all other cases, let's use
loongson64_defconfig.
>
> > Also as mentioned before, snippets can reduce the duplication.
> >
> >> +KBUILD_DEFCONFIG := loongson32_defconfig
> >> +else
> >> +KBUILD_DEFCONFIG := loongson64_defconfig
> >> +endif
> >> +
>
> This is also not the change I had suggested in my review. I think this
> should be a fragment along the lines of arch/mips/configs/generic/32r2.config
> and arch/powerpc/configs/book3s_32.config.
Sorry for that. I know that the default config file is usually
generated by 'make savedefconfig', and the main purpose is
significantly reducing file size. I did that, but manually add some
lines such as CONFIG_LOONGARCH, CONFIG_32BIT/64BIT, CONFIG_ACPI,
CONFIG_EFI, etc. My original goal of doing this is to let users easily
know those fundamental options without reading Kconfig files (of
course we should not increase the defconfig too much).
Sorry again for not explaining about this in the previous version.
Huacai
>
> See arch/powerpc/Makefile for the integration into the build system.
>
> Arnd
Powered by blists - more mailing lists