[PATCH v4 19/30] xen/riscv: introduce event.h

Oleksii Kurochko posted 30 patches 7 months ago
There is a newer version of this series
[PATCH v4 19/30] xen/riscv: introduce event.h
Posted by Oleksii Kurochko 7 months ago
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
Changes in V4:
 - s/BUG()/BUG_ON("unimplemented")
 - s/xen\/bug.h/xen\/lib.h as BUG_ON is defined in xen/lib.h.
---
Changes in V3:
 - add SPDX
 - add BUG() inside stubs.
 - update the commit message
---
Changes in V2:
 - Nothing changed. Only rebase.
---
 xen/arch/riscv/include/asm/event.h | 40 ++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 xen/arch/riscv/include/asm/event.h

diff --git a/xen/arch/riscv/include/asm/event.h b/xen/arch/riscv/include/asm/event.h
new file mode 100644
index 0000000000..b6a76c0f5d
--- /dev/null
+++ b/xen/arch/riscv/include/asm/event.h
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __ASM_RISCV_EVENT_H__
+#define __ASM_RISCV_EVENT_H__
+
+#include <xen/lib.h>
+
+void vcpu_mark_events_pending(struct vcpu *v);
+
+static inline int vcpu_event_delivery_is_enabled(struct vcpu *v)
+{
+    BUG_ON("unimplemented");
+    return 0;
+}
+
+static inline int local_events_need_delivery(void)
+{
+    BUG_ON("unimplemented");
+    return 0;
+}
+
+static inline void local_event_delivery_enable(void)
+{
+    BUG_ON("unimplemented");
+}
+
+/* No arch specific virq definition now. Default to global. */
+static inline bool arch_virq_is_global(unsigned int virq)
+{
+    return true;
+}
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
2.43.0
Re: [PATCH v4 19/30] xen/riscv: introduce event.h
Posted by Jan Beulich 6 months, 4 weeks ago
On 05.02.2024 16:32, Oleksii Kurochko wrote:
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
again with a nit, though:

> --- /dev/null
> +++ b/xen/arch/riscv/include/asm/event.h
> @@ -0,0 +1,40 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ASM_RISCV_EVENT_H__
> +#define __ASM_RISCV_EVENT_H__
> +
> +#include <xen/lib.h>
> +
> +void vcpu_mark_events_pending(struct vcpu *v);
> +
> +static inline int vcpu_event_delivery_is_enabled(struct vcpu *v)
> +{
> +    BUG_ON("unimplemented");
> +    return 0;
> +}
> +
> +static inline int local_events_need_delivery(void)
> +{
> +    BUG_ON("unimplemented");
> +    return 0;
> +}
> +
> +static inline void local_event_delivery_enable(void)
> +{
> +    BUG_ON("unimplemented");
> +}
> +
> +/* No arch specific virq definition now. Default to global. */
> +static inline bool arch_virq_is_global(unsigned int virq)
> +{
> +    return true;
> +}
> +
> +#endif

This want to gain the usual comment.

Jan
Re: [PATCH v4 19/30] xen/riscv: introduce event.h
Posted by Oleksii 6 months, 3 weeks ago
On Mon, 2024-02-12 at 16:20 +0100, Jan Beulich wrote:
> On 05.02.2024 16:32, Oleksii Kurochko wrote:
> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> again with a nit, though:
> 
> > --- /dev/null
> > +++ b/xen/arch/riscv/include/asm/event.h
> > @@ -0,0 +1,40 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +#ifndef __ASM_RISCV_EVENT_H__
> > +#define __ASM_RISCV_EVENT_H__
> > +
> > +#include <xen/lib.h>
> > +
> > +void vcpu_mark_events_pending(struct vcpu *v);
> > +
> > +static inline int vcpu_event_delivery_is_enabled(struct vcpu *v)
> > +{
> > +    BUG_ON("unimplemented");
> > +    return 0;
> > +}
> > +
> > +static inline int local_events_need_delivery(void)
> > +{
> > +    BUG_ON("unimplemented");
> > +    return 0;
> > +}
> > +
> > +static inline void local_event_delivery_enable(void)
> > +{
> > +    BUG_ON("unimplemented");
> > +}
> > +
> > +/* No arch specific virq definition now. Default to global. */
> > +static inline bool arch_virq_is_global(unsigned int virq)
> > +{
> > +    return true;
> > +}
> > +
> > +#endif
> 
> This want to gain the usual comment.
Do you mean that commit messag should be updated?

~ Oleksii
Re: [PATCH v4 19/30] xen/riscv: introduce event.h
Posted by Jan Beulich 6 months, 3 weeks ago
On 14.02.2024 13:16, Oleksii wrote:
> On Mon, 2024-02-12 at 16:20 +0100, Jan Beulich wrote:
>> On 05.02.2024 16:32, Oleksii Kurochko wrote:
>>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
>>
>> Acked-by: Jan Beulich <jbeulich@suse.com>
>> again with a nit, though:
>>
>>> --- /dev/null
>>> +++ b/xen/arch/riscv/include/asm/event.h
>>> @@ -0,0 +1,40 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +#ifndef __ASM_RISCV_EVENT_H__
>>> +#define __ASM_RISCV_EVENT_H__
>>> +
>>> +#include <xen/lib.h>
>>> +
>>> +void vcpu_mark_events_pending(struct vcpu *v);
>>> +
>>> +static inline int vcpu_event_delivery_is_enabled(struct vcpu *v)
>>> +{
>>> +    BUG_ON("unimplemented");
>>> +    return 0;
>>> +}
>>> +
>>> +static inline int local_events_need_delivery(void)
>>> +{
>>> +    BUG_ON("unimplemented");
>>> +    return 0;
>>> +}
>>> +
>>> +static inline void local_event_delivery_enable(void)
>>> +{
>>> +    BUG_ON("unimplemented");
>>> +}
>>> +
>>> +/* No arch specific virq definition now. Default to global. */
>>> +static inline bool arch_virq_is_global(unsigned int virq)
>>> +{
>>> +    return true;
>>> +}
>>> +
>>> +#endif
>>
>> This want to gain the usual comment.
> Do you mean that commit messag should be updated?

No, I indeed mean "comment". Just go look what I committed yesterday.

Jan