public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Luck, Tony" <tony.luck@intel.com>, Paul Jackson <pj@sgi.com>
Cc: John Keller <jpk@sgi.com>,
	linux-kernel@vger.kernel.org, steiner@sgi.com,
	linux-ia64@vger.kernel.org
Subject: Re: [PATCH Resend] - SN: validate smp_affinity mask on intr
Date: Tue, 08 May 2007 20:34:30 +0000	[thread overview]
Message-ID: <20070508133430.f5eef0c1.akpm@linux-foundation.org> (raw)
In-Reply-To: <617E1C2C70743745A92448908E030B2A01719BB8@scsmsx411.amr.corp.intel.com>

On Tue, 8 May 2007 13:14:26 -0700
"Luck, Tony" <tony.luck@intel.com> wrote:

> > It had a dopey little bug:
> >
> > -#define is_affinity_mask_valid() 1
> > +#define is_affinity_mask_valid(val) 1
> 
> That would fix warnings on non-ia64 systems (which is
> a step in the right direction).  But on ia64 I have
> the
> 
> #define is_affinity_mask_valid is_affinity_mask_valid
> 
> in play at that point, so I have a real function call
> which doesn't have an in-scope declaration, so I get:
> 
> kernel/irq/proc.c:49: warning: implicit declaration of function `is_affinity_mask_valid'
> 

hm, I wonder if John sent the right patch.

The obvious fix fixes it up for me:

--- a/include/asm-ia64/irq.h~sn-validate-smp_affinity-mask-on-intr-redirect-fix-2
+++ a/include/asm-ia64/irq.h
@@ -11,6 +11,9 @@
  * 02/29/00     D.Mosberger	moved most things into hw_irq.h
  */
 
+#include <linux/types.h>
+#include <linux/cpumask.h>
+
 #define NR_IRQS		256
 #define NR_IRQ_VECTORS	NR_IRQS
 
@@ -29,6 +32,7 @@ extern void disable_irq (unsigned int);
 extern void disable_irq_nosync (unsigned int);
 extern void enable_irq (unsigned int);
 extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
+bool is_affinity_mask_valid(cpumask_t cpumask);
 
 #define is_affinity_mask_valid is_affinity_mask_valid
 
_

but the new includes are always a worry.

We need the cpumask.h include because we went and created a stupid typedef.
 I think at the time we did this because cpumask_t could optionally be a
plain old "long".  However I don't think we ended up doing that so we could
now do:

-typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;

and then we can forward-declare `struct cpumask' in include/asm-ia64/irq.h
rather than adding the nested include.



  reply	other threads:[~2007-05-08 20:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 15:23 [PATCH Resend] - SN: validate smp_affinity mask on intr redirect John Keller
2007-05-08 18:03 ` Luck, Tony
2007-05-08 19:19   ` [PATCH Resend] - SN: validate smp_affinity mask on intr Andrew Morton
2007-05-08 20:14 ` [PATCH Resend] - SN: validate smp_affinity mask on intr redirect Luck, Tony
2007-05-08 20:34   ` Andrew Morton [this message]
2007-05-08 22:14 ` [PATCH Resend] - SN: validate smp_affinity mask on intr John Keller
2007-05-08 23:01 ` [PATCH Resend] - SN: validate smp_affinity mask on intr redirect Peter Chubb

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=20070508133430.f5eef0c1.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jpk@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=steiner@sgi.com \
    --cc=tony.luck@intel.com \
    /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