Re: [PATCH Resend] - SN: validate smp_affinity mask on intr redirect

2007-05-08 Thread Peter Chubb
Jack> } Jack> + Jack> +bool is_affinity_mask_valid(cpumask_t cpumask) Jack> +{ Jack> + if (ia64_platform_is("sn2")) { Jack> + /* Only allow one CPU to be specified in the smp_affinity mask */ Jack> + if (cpus_weight(cpumask) != 1) Jack> + return false; Why not ju

Re: [PATCH Resend] - SN: validate smp_affinity mask on intr

2007-05-08 Thread John Keller
> > On Tue, 8 May 2007 13:14:26 -0700 > "Luck, Tony" <[EMAIL PROTECTED]> 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 di

Re: [PATCH Resend] - SN: validate smp_affinity mask on intr redirect

2007-05-08 Thread Andrew Morton
On Tue, 8 May 2007 13:14:26 -0700 "Luck, Tony" <[EMAIL PROTECTED]> 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

RE: [PATCH Resend] - SN: validate smp_affinity mask on intr redirect

2007-05-08 Thread Luck, Tony
> 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,

Re: [PATCH Resend] - SN: validate smp_affinity mask on intr redirect

2007-05-08 Thread Andrew Morton
On Tue, 8 May 2007 11:03:20 -0700 "Luck, Tony" <[EMAIL PROTECTED]> wrote: > +#ifndef is_affinity_mask_valid > +#define is_affinity_mask_valid() 1 > +#endif > + > int no_irq_affinity; > static int irq_affinity_write_proc(struct file *file, const char __user > *buffer, >

RE: [PATCH Resend] - SN: validate smp_affinity mask on intr redirect

2007-05-08 Thread Luck, Tony
+#ifndef is_affinity_mask_valid +#define is_affinity_mask_valid() 1 +#endif + int no_irq_affinity; static int irq_affinity_write_proc(struct file *file, const char __user *buffer, unsigned long count, void *data) @@ -42,6 +46,9 @@ static int irq_affinity_writ

[PATCH Resend] - SN: validate smp_affinity mask on intr redirect

2007-05-08 Thread John Keller
On SN, only allow one bit to be set in the smp_affinty mask when redirecting an interrupt. Currently setting multiple bits is allowed, but only the first bit is used in determining the CPU to redirect to. This has caused confusion among some customers. Signed-off-by: John Keller <[EMAIL PROTECTED]