From: Ralf Baechle <ralf@oss.sgi.com>
To: Jun Sun <jsun@mvista.com>
Cc: "Kevin D. Kissell" <kevink@mips.com>, "H. J. Lu" <hjl@lucon.org>,
linux-mips@oss.sgi.com,
GNU C Library <libc-alpha@sources.redhat.com>
Subject: Re: PATCH: Always use ll/sc for mips
Date: Mon, 8 Jul 2002 19:34:38 +0200 [thread overview]
Message-ID: <20020708193438.A2758@dea.linux-mips.net> (raw)
In-Reply-To: <3D29CA34.1050306@mvista.com>; from jsun@mvista.com on Mon, Jul 08, 2002 at 10:21:56AM -0700
On Mon, Jul 08, 2002 at 10:21:56AM -0700, Jun Sun wrote:
> > No, Sony's ABI isn't MP proof and will break silently on MP systems. As
> > such I can't consider it anything else but a hack. sysmips(MIPS_ATOMIC_SET,
> > ...) and ll/sc however are MP proof.
> >
>
>
> sysmips(MIPS_ATOMIC_SET, ...) as it is is not MP-safe. Two processors can
> set the variable at the same time since no spinlock is used to protect the
> access.
Note there are two cases in the code, one using ll/sc which is MP proof
and a second implementation for machines that don't have these instructions.
At least for now Linux/MIPS SMP systems by definition have ll/sc, so I
don't see any problem.
> This is also a problem when I was writing preemptiable kernel patch.
Thanks for the reminder. I'm just working on the merge with 2.5.4 which
has all the preemption stuff. Another one for the to-do list ...
Ralf
next prev parent reply other threads:[~2002-07-08 17:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-02 18:40 PATCH: Always use ll/sc for mips H. J. Lu
2002-07-02 20:06 ` Ralf Baechle
2002-07-02 21:04 ` H. J. Lu
2002-07-04 8:00 ` Maciej W. Rozycki
2002-07-04 8:47 ` Kevin D. Kissell
2002-07-04 8:47 ` Kevin D. Kissell
2002-07-04 13:57 ` Ralf Baechle
2002-07-04 14:14 ` Hiroyuki Machida
2002-07-08 17:21 ` Jun Sun
2002-07-08 17:34 ` Ralf Baechle [this message]
2002-07-16 0:59 ` Ulrich Drepper
2002-07-16 15:22 ` Maciej W. Rozycki
2002-07-16 15:42 ` H. J. Lu
2002-07-17 8:31 ` Maciej W. Rozycki
2002-07-17 15:01 ` H. J. Lu
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=20020708193438.A2758@dea.linux-mips.net \
--to=ralf@oss.sgi.com \
--cc=hjl@lucon.org \
--cc=jsun@mvista.com \
--cc=kevink@mips.com \
--cc=libc-alpha@sources.redhat.com \
--cc=linux-mips@oss.sgi.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