risc-v: replace fence.i with __ISB for instruction sync
Summary: - Replace direct use of `fence.i` instruction with `__ISB()` macro for instruction synchronization - This change improves portability while maintaining the same functionality Impact: - No functional changes - both `fence.i` and `__ISB()` ensure instruction synchronization on RISC-V - Makes the code more maintainable by using the architecture abstraction layer Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
56415a0275
commit
bac2df6bc8
1 changed files with 2 additions and 1 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include <nuttx/elf.h>
|
||||
#include <arch/barriers.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
|
@ -129,7 +130,7 @@ static void _set_val(uint16_t *addr, uint32_t val)
|
|||
|
||||
/* NOTE: Ensure relocation before execution */
|
||||
|
||||
asm volatile ("fence.i");
|
||||
__ISB();
|
||||
}
|
||||
|
||||
static void _add_val(uint16_t *addr, uint32_t val)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue