* Suresh Siddha <[email protected]> wrote:
> On Tue, 2012-05-08 at 11:09 +0200, Ingo Molnar wrote:
> > * Suresh Siddha <[email protected]> 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
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu