]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix cpu_test_and_set() on UP
authorGuillaume Morin <guillaume@morinfr.org>
Tue, 9 Sep 2003 07:32:54 +0000 (00:32 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 9 Sep 2003 07:32:54 +0000 (00:32 -0700)
cpumask_up.h is broken. It tries to access the "mask" member although
that cpumask_t is an ulong on UP. This breaks archs which uses cpumask
functions even on UP such as s390.

include/asm-generic/cpumask_up.h

index 51e3f3d419f2dcd054e778e65a8fbb26bb5894f8..a486c3414d04bcee31e76818b6109e22776de943 100644 (file)
@@ -6,7 +6,7 @@
 #define cpu_set(cpu, map)              do { (void)(cpu); cpus_coerce(map) = 1UL; } while (0)
 #define cpu_clear(cpu, map)            do { (void)(cpu); cpus_coerce(map) = 0UL; } while (0)
 #define cpu_isset(cpu, map)            ((void)(cpu), cpus_coerce(map) != 0UL)
-#define cpu_test_and_set(cpu, map)     ((void)(cpu), test_and_set_bit(0, (map).mask))
+#define cpu_test_and_set(cpu, map)     ((void)(cpu), test_and_set_bit(0, &(map)))
 
 #define cpus_and(dst, src1, src2)                                      \
        do {                                                            \