[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/riscv: add temporary stub for smp_send_event_check_mask()



commit 4082de6d43885e9c16b794449e07e9256a08032f
Author:     Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
AuthorDate: Mon Feb 2 09:05:03 2026 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Feb 2 09:05:03 2026 +0100

    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@xxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/riscv/smp.c   | 7 +++++++
 xen/arch/riscv/stubs.c | 5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/xen/arch/riscv/smp.c b/xen/arch/riscv/smp.c
index 4ca6a4e892..d645364ea4 100644
--- a/xen/arch/riscv/smp.c
+++ b/xen/arch/riscv/smp.c
@@ -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)));
+}
diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c
index 29bdb65afb..acbfde79b5 100644
--- a/xen/arch/riscv/stubs.c
+++ b/xen/arch/riscv/stubs.c
@@ -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");
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.