Skip to contentSkip to conversation

xxen/riscv: introduce asm/hardirq.h

PATCH New Oleksii Kurochko 1 participant 3 messages Aug 16, 2023 1 message not in the archive RISC-V

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 21/56 xxen/riscv: introduce asm/xenoprof.h

---
 xen/arch/riscv/include/asm/xenoprof.h | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/xenoprof.h
xen/arch/riscv/include/asm/xenoprof.h new file +4 -0
new file mode 100644
index 0000000000..e3fc625932
@@ -0,0 +1,4 @@
+#ifndef __ASM_RISCV_XENOPROF_H__
+#define __ASM_RISCV_XENOPROF_H__
+
+#endif /* __ASM_RISCV_XENOPROF_H__ */
\ No newline at end of file
Signature · 1 line
2.41.0
#2 lore raw

PATCH 29/56 xxen/riscv: introduce asm/hardirq.h

In reply to a message not in the archive
---
 xen/arch/riscv/include/asm/hardirq.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/hardirq.h
xen/arch/riscv/include/asm/hardirq.h new file +26 -0
new file mode 100644
index 0000000000..467421849a
@@ -0,0 +1,26 @@
+#ifndef __ASM_RISCV_HARDIRQ_H
+#define __ASM_RISCV_HARDIRQ_H
+
+#include <xen/smp.h>
+
+typedef struct {
+        unsigned long __softirq_pending;
+        unsigned int __local_irq_count;
+} __cacheline_aligned irq_cpustat_t;
+
+#include <xen/irq_cpustat.h>    /* Standard mappings for irq_cpustat_t above */
+
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
+
+#define irq_enter()     (local_irq_count(smp_processor_id())++)
+#define irq_exit()      (local_irq_count(smp_processor_id())--)
+
+#endif /* __ASM_RISCV_HARDIRQ_H */
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
Signature · 1 line
2.41.0
#3 lore raw

PATCH 41/56 xxen/riscv: introduce asm/regs.h

In reply to a message not in the archive
---
 xen/arch/riscv/include/asm/regs.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/regs.h
xen/arch/riscv/include/asm/regs.h new file +27 -0
new file mode 100644
index 0000000000..33ae759a3e
@@ -0,0 +1,27 @@
+#ifndef __ARM_RISCV_REGS_H__
+#define __ARM_RISCV_REGS_H__
+
+#ifndef __ASSEMBLY__
+
+#include <xen/lib.h>
+#include <asm/current.h>
+
+#define hyp_mode(r)     (0)
+
+static inline bool guest_mode(const struct cpu_user_regs *r)
+{
+    BUG();
+}
+
+#endif
+
+
+#endif /* __ARM_RISCV_REGS_H__ */
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
Signature · 1 line
2.41.0