From: Ian Wienand <ianw@gelato.unsw.edu.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] _raw_write_trylock() missing
Date: Wed, 05 Feb 2003 01:46:37 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805814@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805809@msgid-missing>
On Tue, Feb 04, 2003 at 03:18:22PM +0100, Joel GUILLET wrote:
> What the macro is doing : (at least, what I think it is doing)
>
> - if the actual lock value is equal to "0",
> change the lock value to "00.....0001"
> else do nothing
>
> The code for this : (in include/asm-ia64/spinlock.h)
> "dep r29 = -1, r0, 31, 1\n"
doesn't this make the value of r29 0x80000000? i.e the 1 is at the
wrong end.
> "cmpxchg4.acq result = [rw], r29, ar.ccv\n"
so here you end up swapping 0x8000000 into rw if rw=0
i think maybe just making doing mov r29 = 1 above will do what you
want.
-i
ianw@gelato.unsw.edu.au
http://www.gelato.unsw.edu.au
next prev parent reply other threads:[~2003-02-05 1:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-04 2:53 [Linux-ia64] _raw_write_trylock() missing Peter Chubb
2003-02-04 14:18 ` Joel GUILLET
2003-02-05 1:46 ` Ian Wienand [this message]
2003-02-05 8:39 ` Joel GUILLET
2003-03-04 19:57 ` David Mosberger
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=marc-linux-ia64-105590709805814@msgid-missing \
--to=ianw@gelato.unsw.edu.au \
--cc=linux-ia64@vger.kernel.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