lib: sbi: Remove unused hartid parameters

None of these functions use their hartid parameter.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2024-08-30 08:49:16 -07:00
committed by Anup Patel
parent 3962be84d4
commit 9155024972
3 changed files with 10 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ const struct sbi_hsm_device *sbi_hsm_get_device(void);
void sbi_hsm_set_device(const struct sbi_hsm_device *dev); void sbi_hsm_set_device(const struct sbi_hsm_device *dev);
int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot); int sbi_hsm_init(struct sbi_scratch *scratch, bool cold_boot);
void __noreturn sbi_hsm_exit(struct sbi_scratch *scratch); void __noreturn sbi_hsm_exit(struct sbi_scratch *scratch);
int sbi_hsm_hart_start(struct sbi_scratch *scratch, int sbi_hsm_hart_start(struct sbi_scratch *scratch,

View File

@@ -157,7 +157,7 @@ void __noreturn sbi_hsm_hart_start_finish(struct sbi_scratch *scratch,
sbi_hart_switch_mode(hartid, next_arg1, next_addr, next_mode, false); sbi_hart_switch_mode(hartid, next_arg1, next_addr, next_mode, false);
} }
static void sbi_hsm_hart_wait(struct sbi_scratch *scratch, u32 hartid) static void sbi_hsm_hart_wait(struct sbi_scratch *scratch)
{ {
unsigned long saved_mie; unsigned long saved_mie;
struct sbi_hsm_data *hdata = sbi_scratch_offset_ptr(scratch, struct sbi_hsm_data *hdata = sbi_scratch_offset_ptr(scratch,
@@ -236,7 +236,7 @@ static void hsm_device_hart_resume(void)
hsm_dev->hart_resume(); hsm_dev->hart_resume();
} }
int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot) int sbi_hsm_init(struct sbi_scratch *scratch, bool cold_boot)
{ {
u32 i; u32 i;
struct sbi_scratch *rscratch; struct sbi_scratch *rscratch;
@@ -262,7 +262,7 @@ int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot)
ATOMIC_INIT(&hdata->start_ticket, 0); ATOMIC_INIT(&hdata->start_ticket, 0);
} }
} else { } else {
sbi_hsm_hart_wait(scratch, hartid); sbi_hsm_hart_wait(scratch);
} }
return 0; return 0;

View File

@@ -193,14 +193,14 @@ static void sbi_boot_print_hart(struct sbi_scratch *scratch, u32 hartid)
static unsigned long coldboot_done; static unsigned long coldboot_done;
static void wait_for_coldboot(struct sbi_scratch *scratch, u32 hartid) static void wait_for_coldboot(struct sbi_scratch *scratch)
{ {
/* Wait for coldboot to finish */ /* Wait for coldboot to finish */
while (!__smp_load_acquire(&coldboot_done)) while (!__smp_load_acquire(&coldboot_done))
cpu_relax(); cpu_relax();
} }
static void wake_coldboot_harts(struct sbi_scratch *scratch, u32 hartid) static void wake_coldboot_harts(struct sbi_scratch *scratch)
{ {
/* Mark coldboot done */ /* Mark coldboot done */
__smp_store_release(&coldboot_done, 1); __smp_store_release(&coldboot_done, 1);
@@ -241,7 +241,7 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
count = sbi_scratch_offset_ptr(scratch, entry_count_offset); count = sbi_scratch_offset_ptr(scratch, entry_count_offset);
(*count)++; (*count)++;
rc = sbi_hsm_init(scratch, hartid, true); rc = sbi_hsm_init(scratch, true);
if (rc) if (rc)
sbi_hart_hang(); sbi_hart_hang();
@@ -251,7 +251,7 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
* have these HARTs busy spin in wait_for_coldboot() until coldboot * have these HARTs busy spin in wait_for_coldboot() until coldboot
* path is completed. * path is completed.
*/ */
wake_coldboot_harts(scratch, hartid); wake_coldboot_harts(scratch);
rc = sbi_platform_early_init(plat, true); rc = sbi_platform_early_init(plat, true);
if (rc) if (rc)
@@ -386,7 +386,7 @@ static void __noreturn init_warm_startup(struct sbi_scratch *scratch,
(*count)++; (*count)++;
/* Note: This has to be first thing in warmboot init sequence */ /* Note: This has to be first thing in warmboot init sequence */
rc = sbi_hsm_init(scratch, hartid, false); rc = sbi_hsm_init(scratch, false);
if (rc) if (rc)
sbi_hart_hang(); sbi_hart_hang();
@@ -470,7 +470,7 @@ static void __noreturn init_warmboot(struct sbi_scratch *scratch, u32 hartid)
{ {
int hstate; int hstate;
wait_for_coldboot(scratch, hartid); wait_for_coldboot(scratch);
hstate = sbi_hsm_hart_get_state(sbi_domain_thishart_ptr(), hartid); hstate = sbi_hsm_hart_get_state(sbi_domain_thishart_ptr(), hartid);
if (hstate < 0) if (hstate < 0)