Re: [PATCH 07/12] Xen: Make events.c portable for ia64/xen support.

From: Isaku Yamahata
Date: Mon Mar 31 2008 - 05:34:36 EST


On Fri, Mar 28, 2008 at 01:27:58PM -0700, Jeremy Fitzhardinge wrote:
> Isaku Yamahata wrote:
> >+/* macro to avoid header inclusion dependncy hell */
> >+#define xen_irqs_disabled(regs) (!((regs)->flags & X86_EFLAGS_IF))
> >
>
> This seems pretty generic. Is there no suitable existing function?
> Could irqs_disabled_flags() be pressed into service? I guess it depends
> on how ia64 (and other architectures) can get the saved flags state from
> the interrupt context.

Unfortunately ia64 doesn't support CONFIG_TRACE_IRQFLAGS_SUPPORT.
I couldn't found any generic one.

> >+
> >+/* macro to avoid header inclusion dependncy hell */
> >+#define xen_do_IRQ(irq, regs) \
> >+ do { \
> >+ (regs)->orig_ax = ~(irq); \
> >+ do_IRQ(regs); \
> >+ } while (0)
> >
>
> It's not possible to put this somewhere it could be an inline function?
> It might be better to make it an out of line function then.

I revised events.c again so that I found that enum ipi_vector needs to
be arch specific because ia64/xen needs 4 vectors for ipi.
Thus I reached this one.

Changes before
- inetroduced include/asm/xen/events.h
- make enum ipi_vector arch spefic
- make xen_irqs_disabled() static inline.
- make xen_do_IRQ() static inline