Skip to contentSkip to conversation

fix cpu_test_and_set() on UP

PATCH New Guillaume Morin 1 participant 1 message Sep 9, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix cpu_test_and_set() on UP

Hi Linus and Andrew,

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.

asm-generic/cpumask_up.h 9 Sep 2003 21:12:21 -0000 renamed from asm-generic/cpumask_up.h 28 Aug 2003 16:23:00 -0000 1.1 +1 -1
@@ -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 {                                                            \

Please apply.

Signature · 3 lines
Guillaume Morin <[email protected]>

                    Sometimes I find I need to scream (RHCP)