diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-03-18 12:50:12 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-03-19 06:53:12 +0300 |
commit | db187d616c6bfd9f01bbc566117bf5a6241660c1 (patch) | |
tree | 0a2ece0447e963d8ebe04fb31e0196a0331a49e8 /lib | |
parent | 680b09872dd9fe43adfaa29dd95d0d035f5e0ac2 (diff) | |
download | opensbi-db187d616c6bfd9f01bbc566117bf5a6241660c1.tar.xz |
lib: sbi_hsm: Remove scratch parameter from hart_started_mask() API
The scratch parameter in sbi_hsm_hart_started_mask() API is now
redundant hence removing it.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbi/sbi_ecall_legacy.c | 2 | ||||
-rw-r--r-- | lib/sbi/sbi_hsm.c | 4 | ||||
-rw-r--r-- | lib/sbi/sbi_ipi.c | 4 | ||||
-rw-r--r-- | lib/sbi/sbi_system.c | 4 |
4 files changed, 6 insertions, 8 deletions
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) |