forked from Mirrors/opensbi
include: Make sbi_current_hartid() as macro in riscv_asm.h
The sbi_current_hartid() being a regular function is quite expensive because for callers it is a function call instead of a direct CSR read. This patch converts sbi_current_hartid() into a macro in riscv_asm.h. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -319,7 +319,7 @@ static int sbi_tlb_update(struct sbi_scratch *scratch,
|
||||
int ret;
|
||||
struct sbi_fifo *tlb_fifo_r;
|
||||
struct sbi_tlb_info *tinfo = data;
|
||||
u32 curr_hartid = sbi_current_hartid();
|
||||
u32 curr_hartid = current_hartid();
|
||||
|
||||
/*
|
||||
* If address range to flush is too big then simply
|
||||
|
Reference in New Issue
Block a user