mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-04 03:58:59 +00:00
lib: sbi: Use sbi_scratch_last_hartindex() in remote TLB managment
The sbi_hartid_to_scratch() involves translating hartid to hartindex which is expensive so let's use sbi_hartindex_to_scratch() instead. Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
parent
296e70d69d
commit
e632cd7c81
1 changed files with 3 additions and 3 deletions
|
@ -214,14 +214,14 @@ static void tlb_pmu_incr_fw_ctr(struct sbi_tlb_info *data)
|
||||||
|
|
||||||
static void tlb_entry_process(struct sbi_tlb_info *tinfo)
|
static void tlb_entry_process(struct sbi_tlb_info *tinfo)
|
||||||
{
|
{
|
||||||
u32 rhartid, rindex;
|
u32 rindex;
|
||||||
struct sbi_scratch *rscratch = NULL;
|
struct sbi_scratch *rscratch = NULL;
|
||||||
atomic_t *rtlb_sync = NULL;
|
atomic_t *rtlb_sync = NULL;
|
||||||
|
|
||||||
tinfo->local_fn(tinfo);
|
tinfo->local_fn(tinfo);
|
||||||
|
|
||||||
sbi_hartmask_for_each_hart(rhartid, rindex, &tinfo->smask) {
|
sbi_hartmask_for_each_hartindex(rindex, &tinfo->smask) {
|
||||||
rscratch = sbi_hartid_to_scratch(rhartid);
|
rscratch = sbi_hartindex_to_scratch(rindex);
|
||||||
if (!rscratch)
|
if (!rscratch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue