@@ -87,6 +87,7 @@ struct sbiret sbi_hart_get_status(unsigned long hartid);
struct sbiret sbi_send_ipi(unsigned long hart_mask, unsigned long hart_mask_base);
struct sbiret sbi_send_ipi_cpu(int cpu);
struct sbiret sbi_send_ipi_cpumask(const cpumask_t *mask);
+struct sbiret sbi_send_ipi_broadcast(void);
struct sbiret sbi_set_timer(unsigned long stime_value);
long sbi_probe(int ext);
@@ -62,13 +62,18 @@ struct sbiret sbi_send_ipi_cpu(int cpu)
return sbi_send_ipi(1UL, cpus[cpu].hartid);
}
+struct sbiret sbi_send_ipi_broadcast(void)
+{
+ return sbi_send_ipi(0, -1UL);
+}
+
struct sbiret sbi_send_ipi_cpumask(const cpumask_t *mask)
{
struct sbiret ret;
cpumask_t tmp;
if (cpumask_full(mask))
- return sbi_send_ipi(0, -1UL);
+ return sbi_send_ipi_broadcast();
cpumask_copy(&tmp, mask);
Coming SBI IPI tests will use this, but as it could be useful for other tests too, add it to the library. Signed-off-by: Andrew Jones <andrew.jones@linux.dev> --- lib/riscv/asm/sbi.h | 1 + lib/riscv/sbi.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)