The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/3] LoongArch: initial 32-bit UAPI
@ 2025-01-02 18:34 Jiaxun Yang
  2025-01-02 18:34 ` [PATCH 1/3] loongarch: Wire up 32 bit syscalls Jiaxun Yang
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Jiaxun Yang @ 2025-01-02 18:34 UTC (permalink / raw)
  To: Huacai Chen, WANG Xuerui
  Cc: Arnd Bergmann, loongarch, linux-kernel, linux-arch, Jiaxun Yang

This series defines the UAPI for LoongArch32, marking my initial step
towards upstreaming support for the architecture. Once the UAPI is
ratified, we can proceed to scrutinise various kernel components to
enable 32-bit support while simultaneously addressing user-space porting.

Why am I upstreaming LoongArch32?
================================
Although 32-bit systems are experiencing declining adoption in general
computing, LoongArch32 remains highly relevant within specific niches.
Beyond embedded applications, several vendors are actively developing
application-level LoongArch32 processors. Loongson, for example, has
released two open-source reference hardware implementations: openLA500
and openLA1000 [6].

The architecture also holds considerable educational value, having been
integrated into China's national computer architecture curricula and
embedded systems courses. Additionally, the National Student Computer
System Capability Challenge (NSCSCC) [1] features LoongArch32 CPUs, where
hundreds of students design Linux-capable hardware implementations and
compete on performance. This initiative has resulted in several exciting
high-performance LoongArch32 cores, including LainCore[2], Wired[3],
NOP-Core[4], NagiCore[5]....

From an upstream perspective, we will largely reuse the infrastructure
already established for LoongArch64, ensuring that the maintenance burden
remains minimal.

Porting Status
==============
The LoongArch32 port has been available downstream for some time, with
various system components hosted on Loongson's Gitee[6]. However, these
components utilise an older downstream ABI and fall short of upstream
quality.

On the upstream front, LLVM-19 now includes experimental support for
LoongArch32 (ILP32 ABI) under the loongarch32* triple, and efforts are
underway to enable GNU toolchain support. My upstream-ready kernel port
and musl libc port can successfully boot into a minimal Buildroot
environment and execute test cases on QEMU virt machine with clang
toolchain.

Thank you for reading. I look forward to your comments and feedback.

[1]: https://www.tsinghua.edu.cn/en/info/1245/13802.htm
[2]: https://github.com/LainChip/LainCore
[3]: https://github.com/gmlayer0/wired
[4]: https://github.com/NOP-Processor/NOP-Core
[5]: https://github.com/MrAMS/NagiCore
[6]: https://gitee.com/loongson-edu

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
Jiaxun Yang (3):
      loongarch: Wire up 32 bit syscalls
      loongarch: Introduce sys_loongarch_flush_icache syscall
      loongarch: vdso: Introduce __vdso_flush_icache function

 arch/loongarch/include/asm/Kbuild          |  1 +
 arch/loongarch/include/asm/cacheflush.h    |  6 ++++
 arch/loongarch/include/asm/syscall.h       |  2 ++
 arch/loongarch/include/asm/vdso/vdso.h     | 10 ++++++
 arch/loongarch/include/asm/vdso/vsyscall.h |  1 +
 arch/loongarch/include/uapi/asm/Kbuild     |  1 +
 arch/loongarch/include/uapi/asm/unistd.h   |  6 ++++
 arch/loongarch/kernel/Makefile.syscalls    |  3 +-
 arch/loongarch/kernel/syscall.c            | 49 +++++++++++++++++++++++++++++
 arch/loongarch/kernel/vdso.c               |  2 ++
 arch/loongarch/mm/cache.c                  |  3 ++
 arch/loongarch/vdso/Makefile               |  2 +-
 arch/loongarch/vdso/flush_icache.c         | 50 ++++++++++++++++++++++++++++++
 arch/loongarch/vdso/vdso.lds.S             |  5 +++
 scripts/syscall.tbl                        |  2 ++
 15 files changed, 140 insertions(+), 3 deletions(-)
---
base-commit: 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2
change-id: 20250102-la32-uapi-8395e83a4e88

Best regards,
-- 
Jiaxun Yang <jiaxun.yang@flygoat.com>


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

end of thread, other threads:[~2025-01-05 12:03 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02 18:34 [PATCH 0/3] LoongArch: initial 32-bit UAPI Jiaxun Yang
2025-01-02 18:34 ` [PATCH 1/3] loongarch: Wire up 32 bit syscalls Jiaxun Yang
2025-01-04 15:31   ` Arnd Bergmann
2025-01-02 18:34 ` [PATCH 2/3] loongarch: Introduce sys_loongarch_flush_icache syscall Jiaxun Yang
2025-01-04  9:04   ` Jinyang Shen
2025-01-04 11:18     ` Jiaxun Yang
2025-01-04 15:07     ` Arnd Bergmann
2025-01-04 15:42       ` Jiaxun Yang
2025-01-04  9:31   ` Xi Ruoyao
2025-01-04 11:33     ` Jiaxun Yang
2025-01-02 18:34 ` [PATCH 3/3] loongarch: vdso: Introduce __vdso_flush_icache function Jiaxun Yang
2025-01-04  8:27 ` [PATCH 0/3] LoongArch: initial 32-bit UAPI Jinyang Shen
2025-01-04 15:00 ` Arnd Bergmann
2025-01-04 15:13   ` Xi Ruoyao
2025-01-04 16:03     ` Jiaxun Yang
2025-01-05  4:43       ` Arnd Bergmann
2025-01-05 10:27         ` Jiaxun Yang
2025-01-05 12:03           ` Jiaxun Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox