Mailing List Archive

[RFC XEN PATCH 13/23] riscv: Add smp.c
From: Alistair Francis <alistair.francis@wdc.com>

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
xen/arch/riscv/smp.c | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 xen/arch/riscv/smp.c

diff --git a/xen/arch/riscv/smp.c b/xen/arch/riscv/smp.c
new file mode 100644
index 0000000000..735da22cd2
--- /dev/null
+++ b/xen/arch/riscv/smp.c
@@ -0,0 +1,41 @@
+#include <xen/mm.h>
+#include <xen/smp.h>
+#include <asm/system.h>
+#include <asm/smp.h>
+#include <asm/page.h>
+#include <asm/flushtlb.h>
+
+volatile unsigned long start_secondary_pen_release = HARTID_INVALID;
+
+void flush_tlb_mask(const cpumask_t *mask)
+{
+ flush_all_guests_tlb();
+}
+
+void smp_send_event_check_mask(const cpumask_t *mask)
+{
+ /* TODO */
+}
+
+void smp_send_call_function_mask(const cpumask_t *mask)
+{
+ cpumask_t target_mask;
+
+ cpumask_andnot(&target_mask, mask, cpumask_of(smp_processor_id()));
+
+ if ( cpumask_test_cpu(smp_processor_id(), mask) )
+ {
+ local_irq_disable();
+ smp_call_function_interrupt();
+ local_irq_enable();
+ }
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
2.25.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel