summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sbi/sbi_hsm.h3
-rw-r--r--lib/sbi/sbi_ecall_legacy.c2
-rw-r--r--lib/sbi/sbi_hsm.c4
-rw-r--r--lib/sbi/sbi_ipi.c4
-rw-r--r--lib/sbi/sbi_system.c4
5 files changed, 7 insertions, 10 deletions
diff --git a/include/sbi/sbi_hsm.h b/include/sbi/sbi_hsm.h
index 65aff9f..f2f39ba 100644
--- a/include/sbi/sbi_hsm.h
+++ b/include/sbi/sbi_hsm.h
@@ -28,8 +28,7 @@ int sbi_hsm_hart_stop(struct sbi_scratch *scratch, bool exitnow);
int sbi_hsm_hart_get_state(u32 hartid);
int sbi_hsm_hart_state_to_status(int state);
bool sbi_hsm_hart_started(u32 hartid);
-int sbi_hsm_hart_started_mask(struct sbi_scratch *scratch,
- ulong hbase, ulong *out_hmask);
+int sbi_hsm_hart_started_mask(ulong hbase, ulong *out_hmask);
void sbi_hsm_prepare_next_jump(struct sbi_scratch *scratch, u32 hartid);
#endif
diff --git a/lib/sbi/sbi_ecall_legacy.c b/lib/sbi/sbi_ecall_legacy.c
index cffef23..bd7ee5a 100644
--- a/lib/sbi/sbi_ecall_legacy.c
+++ b/lib/sbi/sbi_ecall_legacy.c
@@ -33,7 +33,7 @@ static int sbi_load_hart_mask_unpriv(struct sbi_scratch *scratch,
if (uptrap->cause)
return SBI_ETRAP;
} else {
- sbi_hsm_hart_started_mask(scratch, 0, &mask);
+ sbi_hsm_hart_started_mask(0, &mask);
}
*hmask = mask;
diff --git a/lib/sbi/sbi_hsm.c b/lib/sbi/sbi_hsm.c
index 906a8eb..4a457ce 100644
--- a/lib/sbi/sbi_hsm.c
+++ b/lib/sbi/sbi_hsm.c
@@ -80,14 +80,12 @@ bool sbi_hsm_hart_started(u32 hartid)
/**
* Get ulong HART mask for given HART base ID
- * @param scratch the per-HART scratch pointer
* @param hbase the HART base ID
* @param out_hmask the output ulong HART mask
* @return 0 on success and SBI_Exxx (< 0) on failure
* Note: the output HART mask will be set to zero on failure as well.
*/
-int sbi_hsm_hart_started_mask(struct sbi_scratch *scratch,
- ulong hbase, ulong *out_hmask)
+int sbi_hsm_hart_started_mask(ulong hbase, ulong *out_hmask)
{
ulong i;
ulong hcount = SBI_HARTMASK_MAX_BITS;
diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c
index 78db752..c60d34b 100644
--- a/lib/sbi/sbi_ipi.c
+++ b/lib/sbi/sbi_ipi.c
@@ -80,7 +80,7 @@ int sbi_ipi_send_many(struct sbi_scratch *scratch, ulong hmask, ulong hbase,
ulong i, m;
if (hbase != -1UL) {
- rc = sbi_hsm_hart_started_mask(scratch, hbase, &m);
+ rc = sbi_hsm_hart_started_mask(hbase, &m);
if (rc)
return rc;
m &= hmask;
@@ -92,7 +92,7 @@ int sbi_ipi_send_many(struct sbi_scratch *scratch, ulong hmask, ulong hbase,
}
} else {
hbase = 0;
- while (!sbi_hsm_hart_started_mask(scratch, hbase, &m)) {
+ while (!sbi_hsm_hart_started_mask(hbase, &m)) {
/* Send IPIs */
for (i = hbase; m; i++, m >>= 1) {
if (m & 1UL)
diff --git a/lib/sbi/sbi_system.c b/lib/sbi/sbi_system.c
index 061cbf6..46ec36f 100644
--- a/lib/sbi/sbi_system.c
+++ b/lib/sbi/sbi_system.c
@@ -43,7 +43,7 @@ void __noreturn sbi_system_reboot(struct sbi_scratch *scratch, u32 type)
u32 cur_hartid = current_hartid();
/* Send HALT IPI to every hart other than the current hart */
- while (!sbi_hsm_hart_started_mask(scratch, hbase, &hmask)) {
+ while (!sbi_hsm_hart_started_mask(hbase, &hmask)) {
if (hbase <= cur_hartid)
hmask &= ~(1UL << (cur_hartid - hbase));
if (hmask)
@@ -67,7 +67,7 @@ void __noreturn sbi_system_shutdown(struct sbi_scratch *scratch, u32 type)
u32 cur_hartid = current_hartid();
/* Send HALT IPI to every hart other than the current hart */
- while (!sbi_hsm_hart_started_mask(scratch, hbase, &hmask)) {
+ while (!sbi_hsm_hart_started_mask(hbase, &hmask)) {
if (hbase <= cur_hartid)
hmask &= ~(1UL << (cur_hartid - hbase));
if (hmask)