+4
−0
arch/loongarch/include/asm/atomic-amo.h
0 → 100644
+206
−0
arch/loongarch/include/asm/atomic-llsc.h
0 → 100644
+100
−0
+10
−187
Loading
LoongArch64 has both AMO and LL/SC instructions, while LoongArch32 only has LL/SC intstructions. So we add a Kconfig option CPU_HAS_AMO here and implement atomic operations (also including local operations and percpu operations) for both 32BIT and 64BIT platforms. Reviewed-by:Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by:
Huacai Chen <chenhuacai@loongson.cn>