2004-06-09 20:49:55

by Mikael Pettersson

[permalink] [raw]
Subject: [PATCH][2.6.7-rc3-mm1] CPU_MASK_NONE fix

2.6.7-rc3-mm1 changed CPU_MASK_NONE into something that isn't
a valid rvalue (it only works inside struct initializers).
This caused compile-time errors in perfctr in UP x86 builds.

Fix below.

Signed-off-by: Mikael Pettersson <[email protected]>

diff -ruN linux-2.6.7-rc3-mm1/include/linux/cpumask.h linux-2.6.7-rc3-mm1.cpu_mask_none-fix/include/linux/cpumask.h
--- linux-2.6.7-rc3-mm1/include/linux/cpumask.h 2004-06-09 19:38:39.000000000 +0200
+++ linux-2.6.7-rc3-mm1.cpu_mask_none-fix/include/linux/cpumask.h 2004-06-09 22:01:28.470416000 +0200
@@ -248,9 +248,9 @@
#endif

#define CPU_MASK_NONE \
-{ { \
+((cpumask_t) { { \
[0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \
-} }
+} })

#define cpus_addr(src) ((src).bits)


2004-06-09 22:30:36

by Paul Jackson

[permalink] [raw]
Subject: Re: [PATCH][2.6.7-rc3-mm1] CPU_MASK_NONE fix

Maikael wrote:
> 2.6.7-rc3-mm1 changed CPU_MASK_NONE into something that isn't

I believe that Bill Irwin also snuck this fix into his irqaction->mask
patch, posted Wed, 9 Jun 2004 10:59:10 -0700.

Thanks, Bill and Mikael, for your fixes to the dreaded -;) cpumask patch.

Thanks, Andrew, for including it.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.650.933.1373