Commit 04816c15 authored by Huacai Chen's avatar Huacai Chen
Browse files

LoongArch: Add debugfs entries to switch SFB/TSO state



We need to switch SFB (Store Fill Buffer) and TSO (Total Store Order)
state at runtime to debug memory management and KVM virtualization, so
add two debugfs entries "sfb_state" and "tso_state" under the directory
/sys/kernel/debug/loongarch.

Query SFB:
cat /sys/kernel/debug/loongarch/sfb_state

Enable SFB:
echo 1 > /sys/kernel/debug/loongarch/sfb_state

Disable SFB:
echo 0 > /sys/kernel/debug/loongarch/sfb_state

Query TSO:
cat /sys/kernel/debug/loongarch/tso_state

Switch TSO:
echo [TSO] > /sys/kernel/debug/loongarch/tso_state

Available [TSO] states:
0 (No Load No Store)    1 (All Load No Store)   3 (Same Load No Store)
4 (No Load All Store)   5 (All Load All Store)  7 (Same Load All Store)

Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 26c0a2d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment