Skip to content

Commit 70d605c

Browse files
committed
Merge tag 'riscv-for-linus-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fix from Palmer Dabbelt: - fix the T-Head memory type errata workaround to avoid behavior that is unsupported in the LLVM assembler * tag 'riscv-for-linus-5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix ALT_THEAD_PMA's asm parameters
2 parents f6e9d01 + e830315 commit 70d605c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/riscv/include/asm/errata_list.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,20 @@ asm volatile(ALTERNATIVE( \
7575
"nop\n\t" \
7676
"nop\n\t" \
7777
"nop", \
78-
"li t3, %2\n\t" \
79-
"slli t3, t3, %4\n\t" \
78+
"li t3, %1\n\t" \
79+
"slli t3, t3, %3\n\t" \
8080
"and t3, %0, t3\n\t" \
8181
"bne t3, zero, 2f\n\t" \
82-
"li t3, %3\n\t" \
83-
"slli t3, t3, %4\n\t" \
82+
"li t3, %2\n\t" \
83+
"slli t3, t3, %3\n\t" \
8484
"or %0, %0, t3\n\t" \
8585
"2:", THEAD_VENDOR_ID, \
8686
ERRATA_THEAD_PBMT, CONFIG_ERRATA_THEAD_PBMT) \
8787
: "+r"(_val) \
88-
: "0"(_val), \
89-
"I"(_PAGE_MTMASK_THEAD >> ALT_THEAD_PBMT_SHIFT), \
88+
: "I"(_PAGE_MTMASK_THEAD >> ALT_THEAD_PBMT_SHIFT), \
9089
"I"(_PAGE_PMA_THEAD >> ALT_THEAD_PBMT_SHIFT), \
91-
"I"(ALT_THEAD_PBMT_SHIFT))
90+
"I"(ALT_THEAD_PBMT_SHIFT) \
91+
: "t3")
9292
#else
9393
#define ALT_THEAD_PMA(_val)
9494
#endif

0 commit comments

Comments
 (0)