From: Helge Deller <deller@gmx.de>
To: linux-parisc@vger.kernel.org
Subject: ldcw inline assembler patch
Date: Sat, 14 Jun 2008 17:36:39 +0200 [thread overview]
Message-ID: <4853E587.9020802@gmx.de> (raw)
I'm wondering if this patch might help people who are seeing locking
problems on SMP boxes ?
Helge
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h
index ee80c92..4752684 100644
--- a/include/asm-parisc/system.h
+++ b/include/asm-parisc/system.h
@@ -168,8 +168,9 @@ static inline void set_eiem(unsigned long val)
/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */
#define __ldcw(a) ({ \
unsigned __ret; \
- __asm__ __volatile__(__LDCW " 0(%1),%0" \
- : "=r" (__ret) : "r" (a)); \
+ __asm__ __volatile__(__LDCW " 0(%2),%0" \
+ : "=r" (__ret), "=m" (*(a)) \
+ : "r" (a), "m" (*(a)) ); \
__ret; \
})
next reply other threads:[~2008-06-14 15:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 15:36 Helge Deller [this message]
2008-06-16 20:50 ` ldcw inline assembler patch Carlos O'Donell
2008-06-16 21:06 ` Helge Deller
2008-06-16 21:54 ` Carlos O'Donell
2008-06-16 21:57 ` Kyle McMartin
2008-06-16 22:03 ` Kyle McMartin
2008-06-16 22:05 ` Matthew Wilcox
2008-06-16 22:14 ` Carlos O'Donell
2008-06-17 1:56 ` Carlos O'Donell
2008-06-17 3:34 ` Carlos O'Donell
2008-06-21 18:34 ` John David Anglin
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=4853E587.9020802@gmx.de \
--to=deller@gmx.de \
--cc=linux-parisc@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