LoongArch Upstream Activities
2026.07.17-2026.07.24

This article contains LoongArch upstream community activities in the past week (as of July 24th 2026 18:00 CST), including ports, optimization, platform support, bug fixes and reports, etc. in Linux kernel, compiler toolchains, emulators and other projects.
Key upstream community activities:
- Special: PostgreSQL official APT repository now distributes official LoongArch packages
- Special: Project "Donghu", a community-driven Loongson 3B6000 motherboard is now open-source
- Linux kernel received a workaround for the backlight power state loss of 3B6000M laptops when resuming from S3 sleep, and a fix for large module loading
- EDK II received the support for LoongArch ISA V1.1 and hardware PTW (Page Table Walker)
- llama.cpp, a Large Language Model inference framework, received a LASX implementation for the Q4_0_8x8_Q8_0 repack path for Q4_0 quantized models, which can improve the performance by around 7-60%
Special: PostgreSQL Official APT Repository Now Distributes LoongArch Packages
Today, community staffs received the E-Mail from Christoph Berg, the APT repository maintainer for the PostgreSQL Global Development Group: LoongArch packages are now available in the official PostgreSQL repository!
This week, our community received an email from Christoph Berg, the maintainer of the APT repository for the PostgreSQL Global Development Group (PGDG), announcing that LoongArch packages are now available in the PostgreSQL's official APT repository.
Christoph Berge wrote in the upstream mailing list:
We have a new architecture on apt.postgresql.org: Loongson loong64, a Chinese processor architecture.
The build host for the architecture is running on a Loongson 3B6000 board provided by the loongfans.cn community.
Project "Donghu", a Community-Driven Loongson 3B6000 Motherboard is Now Open-Source
This week, Loongson Hobbyists Community officially published an overview, schematics, datasheets and references for the Loongson 3B6000 motherboard project (Project "Donghu") led by Hengrui Zhang (Harry2005). This is the first open-source motherboard based on the Loongson 3 family of processors.
This project aims to develop a motherboard design that can serve as an alternative to the Loongson XB612B0_V1.2 motherboard currently available on the market. Like the existing model, this motherboard is equipped with a Loongson 3B6000 processor but features an enhanced core power supply circuit with the potential to support overclocking. It also comes with 4 DDR4 DIMM slots, providing a more flexible upgrade path.
Most notably, the motherboard distinguishes itself by incorporating the IX7012 PCIe 3.0 bridge from Innosilicon, which has a significantly smaller physical footprint and lower power consumption than the Loongson 7A2000.
All materials of the project are licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.
Key Specifications
- Processor: Loongson 3B6000 (soldered)
- Form Factor: μATX (244×244mm)
- Key design goals
- Bolstered core power supply - 7+1 phases (MP2975 + MP85956)
- Alternative bridge chip design based on the low-power InnoSilicon IX7012 bridge chip, with 12 PCIe 4.0 downstream lanes.
- Four DDR4 DIMM slots with support for Registered ECC modules.
- Integrated slot for Wi-Fi module - m.2 NGFF + antenna assembly.
- Southbridge bypass switch for an extra PCIe 4.0 x4 NVMe slot (or PCIe 3.0 x2 as supplied by the southbridge).
Linux Kernel
This week's Linux kernel activities focus on the thermal management support for 2K3000/3B6000M laptops and 2K0300. For the KVM subsystem, there is optimization for CSR migration. For functional and feature fixes, Tiezhu Yang is continuing to attempt to fix large kernel module (e.g. amdgpu module with debug symbols) loading.
Platform Support
Zixing Liu submitted a patch to workaround the backlight power state loss on the EAECIS NL60R laptop (Loongson 3B6000M) after resuming from S3 (sleep). This issue is reproducible on EC firmware version 1.11, but irreproducible on EC firmware version 1.9. Huacai Chen has provided feedback on the patch, and Yao Zi has tested the patch working.
Hongliang Wang submitted the 8th revision of the patchset to add clock-related properties and parsing and bus speed adjustment for Loongson I2C (known to fix touchpad cursor stuttering and lagging on some 3B6000M laptops).
Haoran Jiang submitted a patchset to enforce W^X (Write XOR Execute) principle on page tables, enable STRICT_MODULE_RWX to enforce strict memory read-write-execute permissions, and add support to dump kernel page tables on LoongArch.
Binbin Zhou submitted the second revision of the patch to support thermel monitoring on 2K0300. This revision addressed code style suggestions from Conor Dooley, Huacai Chen and Sashiko AI, and splitted into multiple patches since v1. He also rennovated the patchset to add CAN-FD controller support to the sixth revision, which has been approved by Huacai Chen.
KVM Subsystem
Cui Tao submitted a patch to add support for bulk CSR (Control and Status Register) migration using KVM_GET/SET_SREGS macros. This patch has been tested to reduce the time needed for snapshotting one vCPU's core CSR range from about 2ms to about 5μs. The second revision has been submitted to address Bibo Mao's feedback.
Other Functional and Code Fixes in the Kernel
Haoran Jiang submitted a patch to fix oops errors triggered by single-setp debugging after setting breakpoints in the KDB debugger. According to the author's description, this is caused by a mismatch of macros used to analyze problems in kdb_local() and kdb_stub() (the former uses KDB_REASON_SSTEP, and the latter uses KDB_REASON_OOPS) on LoongArch. Besides, ex_vector should be 0 when determining the reason of a problem, which the current implementation on LoongArch differs from the ones on AArch64 and RISC-V. The patch is pending reviews.
Xuewen Wang submitted a patch to add a NULL check for map_bus in loongson_gpu_fixup_dma_hang() function. Huacai Chen then pointed out that the patch lacks factual support and is illogical, Xuewen Wang confirmed that the patch is based on subjective assumptions, and gave up on the patch.
Tiezhu Yang submitted a patchset to expand the virtual memory address space for kernel modules from 256MiB to 2GiB, in order to fix the insufficient memory errors when loading some large (e.g. debug symbols unstripped) kernel modules. The second revision has been submitted to address reviewers' feedback.
Tiezhu Yang submitted a patch to replace the custom cmp_3way() macro with the generic cmp_int() macro that functions the same.
Toolchains
This week's toolchain activities focus on routine maintenance: multiple fixes in GCC, glibc and LLVM, minor refactor in Rust, and further revision on the LoongArch atomic instruction support pull request in .NET.
Binutils
Correction: Last week's upstream activities (and the LoongArch Biweekly session on Jul 19) contain a mistake in the description of the fix for R_LARCH_TLS_DESC64_* relocations. The fix actually applies to the size of data points modified by these relocations, rather than the size of the relocation entries. The data points modified by these relocations are instructions, which are $4$ bytes long on LoongArch. Setting the size to $8$ caused the linker to read the following instruction after the modified instruction, and write it back as is. This is generally harmless unless that the modified instruction is at the end of a section, then the excessive read and write accesses will be out of bounds. Since BFD linker is single-threaded, and the value read out-of-bounds is written out-of-bounds as is, this behavior usually does not cause any problems. However, if the modified instruction is unfortunately also at end of a memory page, and no subsequent page is mapped, then the out-of-bounds read will trigger a segmentation fault.
Meng Qinggang proposed a patch to change the DWARF2_USE_FIX_ADVANCE_PC macro, which the architecture support code provides to the DWARF debug information processing code, to a function-like macro that accepts FROM and TO parameters. This would allow the architecture support code to determine whether there are any instructions between FROM and TO that can be removed by linker relaxation, and to inform the debug information processing code to process the relocations in the debug message in place rather than writing them into the target file if no such instruction exists, in order to reduce the size of the target file. This patch is currently open for comments.
GCC
The fix for GCC generating vshuf4i.b instructions with illegal operands has been merged into the master branch. Since the issue is not reproducible in the release version, backporting the patch to the release branch is currently not under consideration.
Zhao Zhou submitted a patch to update the expected result for a vector test case on LoongArch to accommodate a recent architecture-independent change that caused the test to fail.
glibc
The glibc 2.44 pre-release test result mentioned in the last week's activities contains a failure in resolv/tst-resolv-res_init-failure, which currently has been determined to be an architecture-independent issue limited to the test suite (and does not reflect an actual error in the code).
While testing on other architectures, Xi Ruoyao found that the test case introduced by the aforementioned change of aligning load segments to huge page boundaries did not fully consider the fact that the page size can differ depending on the kernel configuration on other architectures, causing it to fail on other architectures. According to the feedback from Andreas K. Huettel, the release manager for glibc 2.44, the fix for the issue will be deferred to the 2.45 development cycle.
While testing on other architectures, Yury Khrustalev found that the test case introduced by the aforementioned fix for the exception handling for functions such as fdiv on LoongArch did not fully consider the architectures with optional floating-point exception support, causing it to fail with UNSUPPORTED on processors that support floating-point exceptions. Yury Khrustalev also fixed this issue.
LLVM
Lei Wang implemented getConstraintRegister to allow Clang to diagnose inline assembly register clobber conflicts, matching the implementation in GCC.
hev submitted a pull request to allow using i128 value type with f inline assembly constraint when targeting LSX. Although i128 is not a legal LSX value type, it naturally maps to a single 128-bit LSX vector register in inline assembly. This enables instructions such as vadd.q to operate directly on __int128 operands without requiring explicit vector types.
Taiki Endo reported that the 128-bit cmpxchg operation using the sc.q instruction may return a corrupted value on CAS failure. Yan Tang suggested that simply replacing dbar 20 with dbar 0x700 between ll.d and ld.d would address the issue, but hev and Taiki Endo pointed out that while using aligned vld can ensure the atomicity of the loading operation, sc.q is needed on failure to ensure the semantic correctness of CAS operations.
georgejguo asked asked about the issue where the inline assembler emits a paired R_LARCH_ADD64/SUB64 relocation instead of a single R_LARCH_64_PCREL relocation for the undefined symbol sym - ., which affects objtool's livepatch build.
Rust
tangaac submitted a patch to use Rust's built-in intrinsics::simd module to refactor the implementation of vavg[r] (vector average with rounding) to simplify the code structure. tangaac also submitted a similar refactoring patch for vsat[u].
.NET
Alexander Köplinger (akoeplinger) removed the --debian-repo parameter overridden for LoongArch from the dotnet-buildtools-prereqs-docker repository that holds .NET build environment Dockerfiles, allowing LoongArch targets to build containers from the main Debian repository. The upstream has merged the change. Similarly, Adeel Mujahid (am11) modified the build process for LoongArch containers in Arcade, a tool collection providing common build infrastructure for .NET Foundation projects.
Last month, An Liu submitted support for LoongArch atomic instructions for both LoongArch ISA v1.0 and v1.1. The patchset has been under review by the JIT development team in the past week, and the team has provided a series of feedback comments. The patchset is undergoing continuous iteration.
Firmware & Emulators
For emulators, Box64 introduced several implementation optimizations, and instruction implementation and compatibility fixes; LATU fixed AOT cache and self-modifying code emulation; and EDK II introduced LoongArch ISA V1.1 feature flags and enabled Hardware Page Table Walker.
Box64
- Yang Liu submitted an optimization to merge PUSH/POP instructions, which can merge updates to the RSP register from consecutive PUSH/POP sequences to improve the performance. He refined the optimization in the subsequent commits: 1 2.
- Yang Liu submitted fast path implementations for several instructions: 1 2 3 4.
- Yang Liu submitted the COMIS instruction fusion optimization to fuse [V]COMISS/D and Jcc instruction combination into a single LoongArch FCMP.S/D instruction.
- Yang Liu submitted an optimization for non-LBT path CF flag emulation.
- Yang Liu fixed more issues introduced by the upper 32-bit zero tracking optimization: 1 2 3 4.
- Yang Liu fixed an implementation error in which CALL FAR terminates the current block when callret=2.
- Yang Liu fixed register clobbering when XADD instruction's ED contains GD.
- Yang Liu submitted an implementation for the ARPL instruction.
- Yang Liu fixed the implementation of inlined updateflags.
- Yang Liu and phorcys optimized the implementation of the SHA1 instruction together by replacing the old C helper with a LSX implementation, which resulted in a significant performance improvement for this instruction.
- Yang Liu fixed a flagging error in the VPXOR instruction regarding the upper 128-bit status.
- Yang Liu fixed scratch register shortage in certain VAES instructions.
- Yang Liu added the implementation for the 8-bit LOCK NOT instruction.
LAT (LoongArch Architecture Translator)
Hanlu Li (LaurenIsACoder) fixed the race condition in the AOT cache update mechanism, and optimized LATU's AOT cache by separating it based on loading addresses, and implementing a versioned and type-qualified cache identity for AOT files.
This week, she also fixed the unexpected readable page rejection in the SMC (Self-Modifying Code) reload mechanism.
EDK II
Chao Li submitted a patch to add LoongArch ISA V1.1 feature flags and enable Hardware Page Table Walker by default.
Linux Distributions and Operating Systems
This week's activities in Linux distributions and operating systems focus on routine updates and maintenance.
Debian
Miao Wang reported kernel module loading failures caused by unexpected R_LARCH_ALIGN relocations inserted to the modules, which was introduced by the ld -r alignment fix in Binutils 2.47-rc1. Debian is expected to ship the Binutils 2.47 stable release version soon, which contains the fix for the issue.
AOSC OS
Xi Ruoyao ported the LoongGPU 1.0.2-lnd25.1 (corresponding to Loongnix 25 stable release) kernel module to Linux 7.1; Similarly, Zixing Liu ported the LoongVPU 1.0.0-lnd25.1 kernel module to Linux 7.2.
Afterwards, Mingcong Bai pushed LoongGPU 1.0.2-lnd25.1 to the stable repository and left the LoongVPU module in the test preview state, because Zixing Liu discovered multiple issues with the driver during the test.
Other Open-Source Projects
It has been another busy week for other projects, covering container ecosystem, basic system components, and virtualization and cloud desktop areas.
Issues and Requests for Assistance
Xi Ruoyao reported to loong-fuzzycsr, a Loongson CSR fuzzing tool, that the global CSR read function is not working.
Ports, Optimizations, and Fixes
Akizon (Akizon77) added LoongArch build support for komari-agent, an agent for the lightweight server probe Komari Monitor.
Mingcong Bai submitted the flag for LoongArch seccomp audit support to OpenSSH. libseccomp started to officially support LoongArch starting with version 2.6.0 released in early 2025.
calico-cat-3333 added LoongArch build support to ArozOS, a web desktop operating system, and fixed CPU frequency and hardware model detection on LoongArch.
darkyzhou rebased AOSC's unofficial Chromium patchset to 148.0.7778.180. It is now available for Electron and other applications to use.
LiuYu3966 fixed 32-bit compressed values not sign-extended in the JavaScript engine V8.
lxh fixed IRQ redirection and SMP zone support on LoongArch for hvisor, a Type-1 bare-metal virtual machine manager, and hardened virtio IRQ and zone startup logic; lxc also added image build and zone address validations to hvboot, the UEFI bootloader for hvisor.
SkyBird (SkyBird233) fixed the incorrect array size for the community maintained fork of appimagetool, an AppImage build tool.
At the end of 2025, Xiaobai Wu (wojiushixiaobai) submitted a patch to add LoongArch support to DuckDB, a SQL database management system. After more than half a year of reviews and revisions, the upstream has officially merged the LoongArch support this week.
Xiaobai Wu (wojiushixiaobai) added LoongArch build support to the community maintained fork of BuildKit, a container build tool.
Xiaowei Xu (xuxiaowei-com-cn) added LoongArch binary (ABI 2.0) build workflow to fastfetch, a system information tool. The upstream has merged the pull request, and will release LoongArch binaries starting with the next release.
Xiaowei Xu (xuxiaowei-com-cn) added LoongArch binary distribution flags to go-containerregistry, a container registry management tool and library for the Go programming language. The upstream has merged the pull request.
ZTsubaki (ztsubaki) submitted a Q4_0_8x8_Q8_0 repack path for Q4_0 quantized models optimized based on LASX. According to the test, Q4_0 quantized models pp512 and tg128 achieved test scores of 1.66x and 1.07x, respectively, compared to the original, and also showed a slight speed boost compared to the OpenBLAS backend.