Re: [PATCH V2 00/14] LoongArch: Add basic LoongArch32 support

From: Arnd Bergmann
Date: Tue Nov 18 2025 - 09:18:01 EST


On Tue, Nov 18, 2025, at 12:27, Huacai Chen wrote:
> LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit
> version (LA32S) and a 64-bit version (LA64). LoongArch32 use FDT as its
> boot protocol which is already supported in LoongArch64. LoongArch32's
> ILP32 ABI use the same calling convention as LoongArch64.
>
> This patchset is adding basic LoongArch32 support in mainline kernel, it
> is the successor of Jiaxun Yang's previous work (V1):
> https://lore.kernel.org/loongarch/20250102-la32-uapi-v1-0-db32aa769b88@xxxxxxxxxxx/
>
> We can see a complete snapshot here:
> https://github.com/chenhuacai/linux/tree/loongarch-next

I looked through all the patches, and this seems completely fine
implementation-wise. I replied with a few minor comments, but
found no show-stoppers.

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>

I'm still skeptical about the usefulness overall and would warn you
that you may regret merging this in a few years: 32-bit Linux is
clearly in decline, and the amount of work in bringing up and
maintaining another ABI (or two if you count LA32R/S separately)
is substantial.

In your cover letter, I'm missing information about running LA32
code on LA64 hardware. Specifically, do you plan to add CONFIG_COMPAT
support later, and do you plan to support LA32 kernels running
on LA64-capable hardware?
I would suggest supporting COMPAT 32-bit userspace here, but not
32-bit kernels: based on the experience with x86, arm, powerpc
and mips platforms that allow both, the compat mode usually
results in a much better experience overall. Compat support should
probably be a follow-up and not part of the initial submission
though, so what you have here is fine.

Arnd