Loongson's LA664 CPU Has a Hardware Bug That Silently Loses Atomic Updates
The Lost Atomic Update on Loongson CPU

While packaging normaliz for Debian on LoongArch, Wang Miao hit an infinite loop: OpenMP's atomic counter never reached its target. Six months later, using AI to find a minimal reproducer, the root cause emerged—the LA664 core's atomic add instruction occasionally fails to be atomic when LASX vector reads interleave with barrier-less atomics on different physical cores. Loongson fixed it in two weeks with test firmware expected before October 1.
The CPU's atomic add instruction occasionally fails to be atomic.
- TazeTSchnitzel
> The fix is to set bit 13 of MCSR24 to 1. MCSR24 is an internal CSR whose function is not described in the manual. After setting this bit, the lost update no longer occurs. Testing showed the performance loss is very small: single-core performance is unaffected, and multi-core performance drops only slightly.
Presumably this is a so-called “chicken bit”.