diff mbox series

[v1,19/29] xen/asm-generic: introduce stub header hardirq.h

Message ID cb76190d2b0b056c6733c1f5cfc941d0201f6490.1694702259.git.oleksii.kurochko@gmail.com (mailing list archive)
State New, archived
Headers show
Series Introduce stub headers necessary for full Xen build | expand

Commit Message

Oleksii Kurochko Sept. 14, 2023, 2:56 p.m. UTC
The patch introduces header stub necessry for full Xen build.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/include/asm-generic/hardirq.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 xen/include/asm-generic/hardirq.h

Comments

Jan Beulich Oct. 19, 2023, 11:04 a.m. UTC | #1
On 14.09.2023 16:56, Oleksii Kurochko wrote:
> The patch introduces header stub necessry for full Xen build.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

I agree this one can be generalized from Arm's, but ...

> --- /dev/null
> +++ b/xen/include/asm-generic/hardirq.h
> @@ -0,0 +1,27 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ASM_GENERIC_HARDIRQ_H
> +#define __ASM_GENERIC_HARDIRQ_H
> +
> +#include <xen/smp.h>
> +
> +typedef struct {
> +        unsigned long __softirq_pending;
> +        unsigned int __local_irq_count;
> +} __cacheline_aligned irq_cpustat_t;

... where is __cacheline_aligned going to come from without inclusion
of xen/cache.h (as Arm has it)?

Jan
Oleksii Kurochko Oct. 23, 2023, 11:29 a.m. UTC | #2
On Thu, 2023-10-19 at 13:04 +0200, Jan Beulich wrote:
> On 14.09.2023 16:56, Oleksii Kurochko wrote:
> > The patch introduces header stub necessry for full Xen build.
> > 
> > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> 
> I agree this one can be generalized from Arm's, but ...
> 
> > --- /dev/null
> > +++ b/xen/include/asm-generic/hardirq.h
> > @@ -0,0 +1,27 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +#ifndef __ASM_GENERIC_HARDIRQ_H
> > +#define __ASM_GENERIC_HARDIRQ_H
> > +
> > +#include <xen/smp.h>
> > +
> > +typedef struct {
> > +        unsigned long __softirq_pending;
> > +        unsigned int __local_irq_count;
> > +} __cacheline_aligned irq_cpustat_t;
> 
> ... where is __cacheline_aligned going to come from without inclusion
> of xen/cache.h (as Arm has it)?
xen/cache.h should be added. thanks.

~ Oleksii
diff mbox series

Patch

diff --git a/xen/include/asm-generic/hardirq.h b/xen/include/asm-generic/hardirq.h
new file mode 100644
index 0000000000..b4b71a7315
--- /dev/null
+++ b/xen/include/asm-generic/hardirq.h
@@ -0,0 +1,27 @@ 
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __ASM_GENERIC_HARDIRQ_H
+#define __ASM_GENERIC_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_GENERIC_HARDIRQ_H */
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */