From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Ingo Molnar <mingo@elte.hu>, Peter Anvin <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: x86-32: clean up rwsem inline asm statements
Date: Tue, 12 Jan 2010 17:26:47 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.1001121725110.17145@localhost.localdomain> (raw)
In-Reply-To: <m2fx6ahly3.fsf@igel.home>
On Wed, 13 Jan 2010, Andreas Schwab wrote:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> > @@ -249,7 +249,7 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
> > {
> > int tmp = delta;
> >
> > - asm volatile(LOCK_PREFIX "xadd %0,%1"
> > + asm volatile(LOCK_PREFIX "xadd%z0 %0,%1"
> > : "+r" (tmp), "+m" (sem->count)
> > : : "memory");
>
> I think %z0 should be %z1 here.
You're right, but Peter made it all a non-issue anyway.
Thanks for noticing, though, since it implies that somebody read the patch
carefully. It's always a bit scary to change fundamental inline asms,
especially for something like a locking routine where the core _semantics_
are so subtle (and if you get locking wrong, things may still work - you
just end up with some really odd race conditions).
Linus
next prev parent reply other threads:[~2010-01-13 1:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 0:21 Linus Torvalds
2010-01-13 0:45 ` Andreas Schwab
2010-01-13 1:26 ` Linus Torvalds [this message]
2010-01-13 0:48 ` H. Peter Anvin
2010-01-13 0:59 ` Linus Torvalds
2010-01-13 1:24 ` x86: avoid read-cycle on down_read_trylock Linus Torvalds
2010-01-13 1:57 ` x86: clean up rwsem type system Linus Torvalds
2010-01-13 2:16 ` Linus Torvalds
2010-01-14 7:03 ` H. Peter Anvin
2010-01-17 6:05 ` Ingo Molnar
2010-01-17 18:24 ` Linus Torvalds
2010-01-21 17:14 ` Ingo Molnar
2010-01-13 5:03 ` [tip:x86/asm] x86-32: clean up rwsem inline asm statements tip-bot for Linus Torvalds
2010-01-13 19:58 George Spelvin
2010-01-13 21:04 ` H. Peter Anvin
2010-01-14 0:27 ` George Spelvin
2010-01-14 0:39 ` H. Peter Anvin
2010-01-14 1:05 ` Linus Torvalds
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=alpine.LFD.2.00.1001121725110.17145@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwab@linux-m68k.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®