From: <benh@kernel.crashing.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: <torvalds@transmeta.com>, <linux-kernel@vger.kernel.org>,
Hubertus Franke <frankeh@watson.ibm.com>
Subject: Re: [PATCH] Fast Userspace Mutexes.
Date: Fri, 1 Mar 2002 01:46:19 +0100 [thread overview]
Message-ID: <20020301004619.5314@mailhost.mipsys.com> (raw)
In-Reply-To: <E16gmF8-00057N-00@wagner.rustcorp.com.au>
In-Reply-To: <E16gmF8-00057N-00@wagner.rustcorp.com.au>
There seem to be a problem with PPC, you didn't put back the
PPC405_ERR77 macro in your new implementation. That means you
may hit a PPC 405gp CPU bugs and lose atomicity of lwarx/stwcx.
+#define __HAVE_ARCH_UPDATE_COUNT
+static inline int __update_count(atomic_t *count, int incr)
+{
+ int old_count, tmp;
+
+ __asm__ __volatile__("\n"
+"1: lwarx %0,0,%3\n"
+" srawi %1,%0,31\n"
+" andc %1,%0,%1\n"
+" add %1,%1,%4\n"
++ PPC405_ERR77(0,%3)
+" stwcx. %1,0,%3\n"
+" bne 1b"
+ : "=&r" (old_count), "=&r" (tmp), "=m" (*count)
+ : "r" (count), "r" (incr), "m" (*count)
+ : "cc");
Ben.
next prev parent reply other threads:[~2002-03-01 14:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-01 12:34 [PATCH] Fast Userspace Mutexes Rusty Russell
2002-03-01 0:46 ` benh [this message]
2002-03-01 23:34 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2002-02-28 14:34 Rusty Russell
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=20020301004619.5314@mailhost.mipsys.com \
--to=benh@kernel.crashing.org \
--cc=frankeh@watson.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@transmeta.com \
/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