Ian Campbell
2012-Oct-17 08:39 UTC
[PATCH 05/10] xen: events: pirq_check_eoi_map is X86 specific
On ARM I see: drivers/xen/events.c:280:13: warning: ''pirq_check_eoi_map'' defined but not used [-Wunused-function] Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- drivers/xen/events.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 59e10a1..912ac81 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -115,7 +115,9 @@ struct irq_info { #define PIRQ_SHAREABLE (1 << 1) static int *evtchn_to_irq; +#ifdef CONFIG_X86 static unsigned long *pirq_eoi_map; +#endif static bool (*pirq_needs_eoi)(unsigned irq); static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], @@ -277,10 +279,12 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn) return ret; } +#ifdef CONFIG_X86 static bool pirq_check_eoi_map(unsigned irq) { return test_bit(pirq_from_irq(irq), pirq_eoi_map); } +#endif static bool pirq_needs_eoi_flag(unsigned irq) { -- 1.7.2.5
Stefano Stabellini
2012-Oct-17 17:06 UTC
Re: [PATCH 05/10] xen: events: pirq_check_eoi_map is X86 specific
On Wed, 17 Oct 2012, Ian Campbell wrote:> On ARM I see: > drivers/xen/events.c:280:13: warning: ''pirq_check_eoi_map'' defined but not used > [-Wunused-function] > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>I hate the proliferation of #ifdefs but in this case it might be the only thing to do> drivers/xen/events.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/xen/events.c b/drivers/xen/events.c > index 59e10a1..912ac81 100644 > --- a/drivers/xen/events.c > +++ b/drivers/xen/events.c > @@ -115,7 +115,9 @@ struct irq_info { > #define PIRQ_SHAREABLE (1 << 1) > > static int *evtchn_to_irq; > +#ifdef CONFIG_X86 > static unsigned long *pirq_eoi_map; > +#endif > static bool (*pirq_needs_eoi)(unsigned irq); > > static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], > @@ -277,10 +279,12 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn) > return ret; > } > > +#ifdef CONFIG_X86 > static bool pirq_check_eoi_map(unsigned irq) > { > return test_bit(pirq_from_irq(irq), pirq_eoi_map); > } > +#endif > > static bool pirq_needs_eoi_flag(unsigned irq) > { > -- > 1.7.2.5 >
Ian Campbell
2012-Oct-18 07:29 UTC
Re: [PATCH 05/10] xen: events: pirq_check_eoi_map is X86 specific
On Wed, 2012-10-17 at 18:06 +0100, Stefano Stabellini wrote:> On Wed, 17 Oct 2012, Ian Campbell wrote: > > On ARM I see: > > drivers/xen/events.c:280:13: warning: ''pirq_check_eoi_map'' defined but not used > > [-Wunused-function] > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > I hate the proliferation of #ifdefs but in this case it might be the > only thing to doI wondered if there was any chance that ARM might want need an eoi map in the future? I suppose the real question is whether any future port might want it -- to which the answer is unknowable until one shows up but probably "yes" given enough architectures ;-) Ian.> > > > drivers/xen/events.c | 4 ++++ > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/xen/events.c b/drivers/xen/events.c > > index 59e10a1..912ac81 100644 > > --- a/drivers/xen/events.c > > +++ b/drivers/xen/events.c > > @@ -115,7 +115,9 @@ struct irq_info { > > #define PIRQ_SHAREABLE (1 << 1) > > > > static int *evtchn_to_irq; > > +#ifdef CONFIG_X86 > > static unsigned long *pirq_eoi_map; > > +#endif > > static bool (*pirq_needs_eoi)(unsigned irq); > > > > static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], > > @@ -277,10 +279,12 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn) > > return ret; > > } > > > > +#ifdef CONFIG_X86 > > static bool pirq_check_eoi_map(unsigned irq) > > { > > return test_bit(pirq_from_irq(irq), pirq_eoi_map); > > } > > +#endif > > > > static bool pirq_needs_eoi_flag(unsigned irq) > > { > > -- > > 1.7.2.5 > >