From: Andreas Schwab <schwab@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Chuck Ebbert <76306.1226@compuserve.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
Ingo Molnar <mingo@redhat.com>,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: set_bit() is broken on i386?
Date: Sat, 21 Jan 2006 02:49:53 +0100 [thread overview]
Message-ID: <jek6cu73jy.fsf@sykes.suse.de> (raw)
In-Reply-To: <1137806107.8691.25.camel@lade.trondhjem.org> (Trond Myklebust's message of "Fri, 20 Jan 2006 20:15:07 -0500")
Trond Myklebust <trond.myklebust@fys.uio.no> writes:
> On Fri, 2006-01-20 at 19:53 -0500, Chuck Ebbert wrote:
>
>> #define ADDR (*(volatile long *) addr)
>> static inline void set_bit(int nr, volatile unsigned long * addr)
>> {
>> __asm__ __volatile__( "lock ; "
>> "btsl %1,%0"
>> :"=m" (ADDR)
>> :"Ir" (nr));
>> }
>
> The asm needs a memory clobber in order to avoid reordering with the
> assignment to b[1]:
Check out 2.6.16-rc1, this has already been fixed.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2006-01-21 1:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-21 0:53 Chuck Ebbert
2006-01-21 1:15 ` Trond Myklebust
2006-01-21 1:49 ` Andreas Schwab [this message]
2006-01-21 2:38 ` Andrew Morton
2006-01-21 19:26 ` Trond Myklebust
2006-01-21 1:32 ` Valdis.Kletnieks
2006-01-21 2:01 ` Grzegorz Kulewski
2006-01-21 1:48 ` Andrew Morton
2006-01-21 1:38 Kenny Simpson
2006-01-21 1:46 Kenny Simpson
2006-01-21 2:07 Kenny Simpson
2006-01-21 7:43 Chuck Ebbert
2006-01-21 20:49 Chuck Ebbert
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=jek6cu73jy.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=76306.1226@compuserve.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=torvalds@osdl.org \
--cc=trond.myklebust@fys.uio.no \
/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
Powered by JetHome