linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Suresh Siddha <suresh.b.siddha@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: joro@8bytes.org, linux-kernel@vger.kernel.org,
	iommu@lists.linux-foundation.org,
	Joerg Roedel <joerg.roedel@amd.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 2/3] irq_remap: fix the UP build failure
Date: Wed, 9 May 2012 11:30:02 +0200	[thread overview]
Message-ID: <20120509093001.GD8585@gmail.com> (raw)
In-Reply-To: <1336531035.22618.23.camel@sbsiddha-desk.sc.intel.com>


* 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

  reply	other threads:[~2012-05-09  9:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 13:54 [git pull] irq remapping ops for x86 Joerg Roedel
2012-05-08  3:51 ` Ingo Molnar
2012-05-08  7:08   ` [PATCH 1/3] irq_remap: fix compiler warning with !CONFIG_IRQ_REMAP Suresh Siddha
2012-05-08 10:01     ` [tip:core/iommu] irq_remap: Fix compiler warning with CONFIG_IRQ_REMAP=y tip-bot for Suresh Siddha
2012-05-08  7:08   ` [PATCH 2/3] irq_remap: fix the UP build failure Suresh Siddha
2012-05-08  9:09     ` Ingo Molnar
2012-05-09  2:37       ` Suresh Siddha
2012-05-09  9:30         ` Ingo Molnar [this message]
2012-05-09 18:46           ` [PATCH 1/2] kconfig: change config_enabled() to accept X instead of CONFIG_X Suresh Siddha
2012-05-09 18:46             ` [PATCH 2/2] irq: use config_enabled(SMP) checks to cleanup irq_set_affinity() for UP Suresh Siddha
2012-05-09 19:58               ` Suresh Siddha
2012-05-10  7:50                 ` Ingo Molnar
2012-05-10 18:19                   ` Suresh Siddha
2012-06-06 23:29                   ` [patch] " Suresh Siddha
2012-06-07  1:36                     ` Yinghai Lu
2012-06-07 20:31                       ` Suresh Siddha
2012-06-07 20:36                         ` Yinghai Lu
2012-06-07 20:56                           ` Suresh Siddha
2012-06-07 13:03                     ` Paul Gortmaker
2012-06-07 22:34                       ` Suresh Siddha
2012-06-15  1:28                       ` [patch] irq: use config_enabled(CONFIG_SMP) " Suresh Siddha
2012-06-15 14:23                         ` [tip:x86/apic] irq/apic: Use config_enabled(CONFIG_SMP) checks to clean up " tip-bot for Suresh Siddha
2012-05-09 18:56             ` [PATCH 1/2] kconfig: change config_enabled() to accept X instead of CONFIG_X Sam Ravnborg
2012-05-09 19:29               ` Suresh Siddha
2012-05-09 20:05                 ` Sam Ravnborg
2012-05-10  6:05               ` Geert Uytterhoeven
2012-05-09 19:05             ` Linus Torvalds
2012-05-08 10:02     ` [tip:core/iommu] irq_remap: Fix UP build failure tip-bot for Suresh Siddha
2012-05-08  7:08   ` [PATCH 3/3] irq_remap: fix the 'sub_handle' uninitialized warning Suresh Siddha
2012-05-08  9:15     ` Ingo Molnar
2012-05-08 10:03     ` [tip:core/iommu] irq_remap: Fix " tip-bot for Suresh Siddha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120509093001.GD8585@gmail.com \
    --to=mingo@kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joerg.roedel@amd.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).