diff options
| author | Anup Patel <[email protected]> | 2023-09-01 16:59:58 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-09-24 11:39:35 +0530 |
| commit | e632cd7c816736dc9dab7597b59f9f77a7925fb3 (patch) | |
| tree | 3b8d2043c6332113551eb3a75b16075353328f90 | |
| parent | 296e70d69da74b09426e4f565306f26e9a6c79f8 (diff) | |
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 <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_tlb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sbi/sbi_tlb.c b/lib/sbi/sbi_tlb.c index 0573bb19..bfcb4d83 100644 --- a/lib/sbi/sbi_tlb.c +++ b/lib/sbi/sbi_tlb.c @@ -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) { - u32 rhartid, rindex; + u32 rindex; struct sbi_scratch *rscratch = NULL; atomic_t *rtlb_sync = NULL; tinfo->local_fn(tinfo); - sbi_hartmask_for_each_hart(rhartid, rindex, &tinfo->smask) { - rscratch = sbi_hartid_to_scratch(rhartid); + sbi_hartmask_for_each_hartindex(rindex, &tinfo->smask) { + rscratch = sbi_hartindex_to_scratch(rindex); if (!rscratch) continue; |
