Skip to content

Commit

Permalink
LoongArch: Fix the write_fcsr() macro
Browse files Browse the repository at this point in the history
[ Upstream commit 346dc92 ]

The "write_fcsr()" macro uses wrong the positions for val and dest in
asm. Fix it!

Reported-by: Miao HAO <haomiao19@mails.ucas.ac.cn>
Signed-off-by: Qi Hu <huqi@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
specialpointcentral authored and gregkh committed Sep 13, 2023
1 parent 9920a52 commit ab5c5c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/loongarch/include/asm/loongarch.h
Expand Up @@ -1488,7 +1488,7 @@ __BUILD_CSR_OP(tlbidx)
#define write_fcsr(dest, val) \
do { \
__asm__ __volatile__( \
" movgr2fcsr %0, "__stringify(dest)" \n" \
" movgr2fcsr "__stringify(dest)", %0 \n" \
: : "r" (val)); \
} while (0)

Expand Down

0 comments on commit ab5c5c1

Please sign in to comment.