Skip to content

Commit 9c2ea4a

Browse files
mmindpalmer-dabbelt
authored andcommitted
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>
1 parent c295bc3 commit 9c2ea4a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/riscv/include/asm/errata_list.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,7 @@ asm(ALTERNATIVE_2("li %0, 0\t\nnop", \
6868
*/
6969
#define ALT_THEAD_PMA(_val) \
7070
asm volatile(ALTERNATIVE( \
71-
"nop\n\t" \
72-
"nop\n\t" \
73-
"nop\n\t" \
74-
"nop\n\t" \
75-
"nop\n\t" \
76-
"nop\n\t" \
77-
"nop", \
71+
__nops(7), \
7872
"li t3, %2\n\t" \
7973
"slli t3, t3, %4\n\t" \
8074
"and t3, %0, t3\n\t" \

0 commit comments

Comments
 (0)