lkml.org 
[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] irq_remap: fix the UP build failure

* Suresh Siddha <suresh.b.siddha@intel.com> wrote:

> On Tue, 2012-05-08 at 11:09 +0200, Ingo Molnar wrote:
> > * Suresh Siddha <suresh.b.siddha@intel.com> wrote:
> >
> > > Fix the below UP build failure with CONFIG_IRQ_REMAP enabled.
> > >
> > > drivers/iommu/intel_irq_remapping.c:955:19: error: ‘struct irq_data’ has no member named ‘affinity’
> >
> > hm:
> >
> > > +++ b/drivers/iommu/intel_irq_remapping.c
> > > +#ifdef CONFIG_SMP
> > > +#endif
> > > +#ifdef CONFIG_SMP
> > > +#endif
> > > +#ifdef CONFIG_SMP
> > > +#endif
> > > +#ifdef CONFIG_SMP
> > > +#endif
> >
> > Adding this many #ifdefs is a bit sad. Could we not make the UP
> > side have the (supposedly zero length!) affinity cpumask
> > instead, or so, and make sure that the SMP functions compile to
> > something sensible on UP?
> >
>
> How about using config_enabled() to clean this up? Something
> like the appended?
>
> I first tried config_enabled(SMP) with out closely looking at
> the macro definition and didn't work. I had to use
> config_enabled(CONFIG_SMP) to really get this working. So in
> the appended patch I fixed config_enabled macro to accept
> config_enabled(SMP). If this all sounds ok, then I can split
> the appended patch into multiple patches.

Looks a lot cleaner!

Please split out the config_enabled() change into a separate
patch and Cc: Linus on the resend.

I like your idea of allowing config_enabled(SMP) as well,
there's no reason to say 'config' twice. It's too easy to get
this wrong and AFAICS there's no build error if we are using a
non-existent config flag, right?

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-05-09 12:02    [W:0.129 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site