diff options
| author | Samuel Holland <[email protected]> | 2024-08-30 08:49:15 -0700 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2024-09-26 16:29:27 +0530 |
| commit | 3962be84d4e3997beaf739475d9d504d274517d8 (patch) | |
| tree | 61facba62c029b27b078f501a5765a8d847ccde5 /lib | |
| parent | 9f86524b589531ecacd818ed2c6ea725eee3c89b (diff) | |
lib: sbi: Update sbi_{entry,init}_count() to take a hart index
All callers already have the hartindex available, so this removes a
hartid to hartindex conversion.
Signed-off-by: Samuel Holland <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sbi/sbi_hsm.c | 4 | ||||
| -rw-r--r-- | lib/sbi/sbi_init.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/sbi/sbi_hsm.c b/lib/sbi/sbi_hsm.c index e7e31ad5..5679819c 100644 --- a/lib/sbi/sbi_hsm.c +++ b/lib/sbi/sbi_hsm.c @@ -324,8 +324,8 @@ int sbi_hsm_hart_start(struct sbi_scratch *scratch, if (!hsm_start_ticket_acquire(hdata)) return SBI_EINVAL; - init_count = sbi_init_count(hartid); - entry_count = sbi_entry_count(hartid); + init_count = sbi_init_count(hartindex); + entry_count = sbi_entry_count(hartindex); rscratch->next_arg1 = arg1; rscratch->next_addr = saddr; diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index 7443010e..18d33088 100644 --- a/lib/sbi/sbi_init.c +++ b/lib/sbi/sbi_init.c @@ -551,7 +551,7 @@ void __noreturn sbi_init(struct sbi_scratch *scratch) init_warmboot(scratch, hartid); } -unsigned long sbi_entry_count(u32 hartid) +unsigned long sbi_entry_count(u32 hartindex) { struct sbi_scratch *scratch; unsigned long *entry_count; @@ -559,7 +559,7 @@ unsigned long sbi_entry_count(u32 hartid) if (!entry_count_offset) return 0; - scratch = sbi_hartid_to_scratch(hartid); + scratch = sbi_hartindex_to_scratch(hartindex); if (!scratch) return 0; @@ -568,7 +568,7 @@ unsigned long sbi_entry_count(u32 hartid) return *entry_count; } -unsigned long sbi_init_count(u32 hartid) +unsigned long sbi_init_count(u32 hartindex) { struct sbi_scratch *scratch; unsigned long *init_count; @@ -576,7 +576,7 @@ unsigned long sbi_init_count(u32 hartid) if (!init_count_offset) return 0; - scratch = sbi_hartid_to_scratch(hartid); + scratch = sbi_hartindex_to_scratch(hartindex); if (!scratch) return 0; |
