[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120509093001.GD8585@gmail.com>
Date: Wed, 9 May 2012 11:30:02 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Suresh Siddha <suresh.b.siddha@...el.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: joro@...tes.org, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org,
Joerg Roedel <joerg.roedel@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 2/3] irq_remap: fix the UP build failure
* Suresh Siddha <suresh.b.siddha@...el.com> wrote:
> On Tue, 2012-05-08 at 11:09 +0200, Ingo Molnar wrote:
> > * Suresh Siddha <suresh.b.siddha@...el.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists