riscv: convert the t-head pbmt errata to use the __nops

A patch from »riscv: Add macro for multiple nop instructions« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Tue, 17 May 2022 17:23:27 +0200

Commit-Message

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@...>

Patch-Comment

arch/riscv/include/asm/errata_list.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)

Statistics

  • 1 lines added
  • 7 lines removed

Changes

--------------------- arch/riscv/include/asm/errata_list.h ---------------------
index 416ead0f9a65..398e351e7002 100644
@@ -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, %1\n\t" \
"slli t3, t3, %3\n\t" \
"and t3, %0, t3\n\t" \
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...