xen/riscv: add temporary stub for smp_send_event_check_mask()

RISC-V SMP support is not yet implemented, but smp_send_event_check_mask()
is required by common code and vcpu_kick(), which is introduced later.
Provide a temporary stub implementation that asserts the mask only targets
CPU0.

cpumask_subset() is used instead of cpumask_equal() because some callers
(e.g. cpumask_raise_softirq() or cpu_raise_softirq_batch_finish()) may
legitimately pass an empty mask, which would otherwise cause false
failures.

The BUG_ON() ensures that attempts to use this function with multiple CPUs
are caught early once SMP support is introduced.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Oleksii Kurochko authored and Jan Beulich committed 2026-02-02 09:05:03 +01:00
1 parent 1df11ccceb
commit 4082de6d43
2 files changed
+7 -5

No files matched your search

+7
View File
@@ -1,3 +1,4 @@
#include <xen/cpumask.h>
#include <xen/smp.h>
/*
@@ -13,3 +14,9 @@
struct pcpu_info pcpu_info[NR_CPUS] = { [0 ... NR_CPUS - 1] = {
.processor_id = NR_CPUS,
}};
void smp_send_event_check_mask(const cpumask_t *mask)
{
/* Catch missing implementation once SMP support is introduced */
BUG_ON(!cpumask_subset(mask, cpumask_of(0)));
}
-5
View File
@@ -65,11 +65,6 @@ int arch_monitor_domctl_event(struct domain *d,
/* smp.c */
void smp_send_event_check_mask(const cpumask_t *mask)
{
BUG_ON("unimplemented");
}
void smp_send_call_function_mask(const cpumask_t *mask)
{
BUG_ON("unimplemented");
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.