summaryrefslogtreecommitdiffstats
path: root/arch/riscv
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2022-06-07 16:30:59 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2022-07-21 17:18:24 -0700
commit9c2ea4a36364bfb5cf068c6fbea5c40292b119a5 (patch)
tree45cd9cd128423629b6343c328b3168e22440e222 /arch/riscv
parentc295bc34ab58e917e2f2f789dd82b66fd2e2e299 (diff)
downloadlinux-9c2ea4a36364bfb5cf068c6fbea5c40292b119a5.tar.bz2
riscv: convert the t-head pbmt errata to use the __nops macro
Instead of manually inserting the list of nops, use the recently introduced __nops(n) macro to make everything more readable. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/include/asm/errata_list.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/riscv/include/asm/errata_list.h b/arch/riscv/include/asm/errata_list.h
index 9e2888dbb5b1..e4ee53551343 100644
--- a/arch/riscv/include/asm/errata_list.h
+++ b/arch/riscv/include/asm/errata_list.h
@@ -68,13 +68,7 @@ asm(ALTERNATIVE_2("li %0, 0\t\nnop", \
*/
#define ALT_THEAD_PMA(_val) \
asm volatile(ALTERNATIVE( \
- "nop\n\t" \
- "nop\n\t" \
- "nop\n\t" \
- "nop\n\t" \
- "nop\n\t" \
- "nop\n\t" \
- "nop", \
+ __nops(7), \
"li t3, %2\n\t" \
"slli t3, t3, %4\n\t" \
"and t3, %0, t3\n\t" \