public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Morin <guillaume@morinfr.org>
To: torvalds@osdl.org, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix cpu_test_and_set() on UP
Date: Tue, 9 Sep 2003 17:14:42 -0400	[thread overview]
Message-ID: <20030909211441.GF1937@siri.morinfr.org> (raw)

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.


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

-- 
Guillaume Morin <guillaume@morinfr.org>

                    Sometimes I find I need to scream (RHCP)

                 reply	other threads:[~2003-09-09 21:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030909211441.GF1937@siri.morinfr.org \
    --to=guillaume@morinfr.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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