TSOEnabler for Linux
A Linux Kernel Module that enables Total-Store-Ordering on Apple Silicon with Linux.
It was tested on linux-asahi-5.19.0-5-1-ARCH
with Apple Mac mini (M1, 2020).
How to Use?
Load the kernel module
make
sudo insmod m1tso.ko
Query status
sudo cat /sys/kernel/m1tso/status
CPU[0].TSO=0
CPU[1].TSO=0
CPU[2].TSO=0
CPU[3].TSO=0
CPU[4].TSO=0
CPU[5].TSO=0
CPU[6].TSO=0
CPU[7].TSO=0
Turn on TSO
echo s | sudo tee /sys/kernel/m1tso/status
Turn off TSO
echo c | sudo tee /sys/kernel/m1tso/status
How to Test?
See testtso in saagarjha/TSOEnabler.