From: Jun Sun <jsun@mvista.com>
To: Florian Lohoff <flo@rfc822.org>, ralf@oss.sgi.com
Cc: Pete Popov <ppopov@mvista.com>,
George Gensure <werkt@csh.rit.edu>,
linux-mips@oss.sgi.com
Subject: MIPS_ATOMIC_SET again (Re: newest kernel
Date: Tue, 22 May 2001 15:46:41 -0700 [thread overview]
Message-ID: <3B0AEC51.B0C477E1@mvista.com> (raw)
In-Reply-To: 20010522143330.B9891@paradigm.rfc822.org
Florian Lohoff wrote:
>
> On Mon, May 21, 2001 at 04:23:52PM -0700, Jun Sun wrote:
> > The patch seems to be just a fast implementation of sysmips(). Why would it
> > solve an otherwise illegal instruction problem?
> >
> > George, what was exactly the error and the faulty instruction?
>
> Wrong - Its not only a "fast" path sysmips. It solves the illegal instruction
> case as it carefully doesnt touch registers it should not touch.
>
> The sysmips illegal instruction stuff came from the early exit
> needed to skip the -EXXXX case in the scall32.S which did not
> restore the modified registers. This needed fixing and there was
> no clean way of doing this in C thus i wrote an asm sysmips/MIPS_ATOMIC_SET
> and called it "fast_sysmips" which itself would go into the old
> sysmips function when not MIPS_ATOMIC_SET.
>
I see.
I took a look of MIPS ABI in system V and found that the spec only specifies
this extended call in C prototype:
int _test_and_set(int *p, int v);
It seems perfectly legal for us to add one more argument to store the return
value while still have the function returns error. Of course, doing that will
break binary compatibility.
Otherwise, I think Flo's patch is the best fix to satisfy the spec and binary
compatibility although it is a little clunky.
A third possibility is the have a MIPS_NEW_ATOMIC_SET that take three
arguments. If that approach is taken, I would take out the inline assembly
that jumps to o32_ret_from_sys_call and documents MIPS_ATOMIC_SET as
deprecated and valnerable.
My preference, in the decreasing order, is 3), 2) and 1).
Ralf, what do you think? We cannot let the bug sit around in the CVS tree for
long. Have to have some fix.
Jun
next prev parent reply other threads:[~2001-05-22 22:47 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-21 22:45 newest kernel George Gensure
2001-05-21 23:10 ` Pete Popov
2001-05-21 23:23 ` Jun Sun
2001-05-21 23:25 ` Pete Popov
2001-05-22 12:33 ` Florian Lohoff
2001-05-22 17:04 ` George Gensure
2001-05-22 17:04 ` George Gensure
2001-05-22 22:46 ` Jun Sun [this message]
2001-05-23 6:37 ` MIPS_ATOMIC_SET again (Re: " Joe deBlaquiere
2001-05-23 13:34 ` Maciej W. Rozycki
2001-05-23 17:48 ` Joe deBlaquiere
2001-05-23 18:20 ` Kevin D. Kissell
2001-05-23 18:20 ` Kevin D. Kissell
2001-05-23 19:37 ` Maciej W. Rozycki
2001-05-23 23:49 ` Kevin D. Kissell
2001-05-23 23:49 ` Kevin D. Kissell
2001-05-24 4:11 ` Joe deBlaquiere
2001-05-24 10:56 ` Maciej W. Rozycki
2001-05-24 10:44 ` Maciej W. Rozycki
2001-05-24 15:15 ` Kevin D. Kissell
2001-05-24 15:15 ` Kevin D. Kissell
2001-05-24 16:21 ` Maciej W. Rozycki
2001-05-24 22:46 ` Joe deBlaquiere
2001-05-25 17:19 ` Maciej W. Rozycki
2001-05-25 22:02 ` Surprise! (Re: " Jun Sun
2001-05-25 23:56 ` Jun Sun
2001-05-28 15:34 ` Maciej W. Rozycki
2001-05-29 22:32 ` Jun Sun
2001-05-30 6:46 ` Kevin D. Kissell
2001-05-30 6:46 ` Kevin D. Kissell
2001-05-30 13:42 ` Maciej W. Rozycki
2001-05-30 17:39 ` Jun Sun
2001-05-31 8:37 ` Maciej W. Rozycki
2001-05-31 11:54 ` Ralf Baechle
2001-05-31 19:16 ` Jun Sun
2001-05-23 18:41 ` Jun Sun
2001-05-23 18:54 ` Florian Lohoff
2001-05-23 18:55 ` Florian Lohoff
2001-05-23 20:04 ` Joe deBlaquiere
2001-05-24 9:32 ` Maciej W. Rozycki
2001-05-26 13:14 ` Florian Lohoff
2001-05-28 15:37 ` Maciej W. Rozycki
2001-05-26 13:15 ` Florian Lohoff
2001-05-28 15:43 ` Maciej W. Rozycki
2001-05-28 16:25 ` Kevin D. Kissell
2001-05-28 16:25 ` Kevin D. Kissell
2001-05-28 17:10 ` Maciej W. Rozycki
2001-05-29 6:57 ` Geert Uytterhoeven
2001-05-29 10:45 ` Maciej W. Rozycki
2001-05-29 13:02 ` Joe deBlaquiere
2001-05-29 15:45 ` Mike McDonald
2001-05-30 1:32 ` Mike McDonald
2001-05-30 7:09 ` Kevin D. Kissell
2001-05-30 7:09 ` Kevin D. Kissell
2001-05-30 14:48 ` J. Scott Kasten
2001-05-30 14:48 ` J. Scott Kasten
2001-05-29 22:37 ` Jun Sun
2001-05-30 12:01 ` Maciej W. Rozycki
2001-05-30 17:54 ` Jun Sun
2001-05-31 7:39 ` Maciej W. Rozycki
2001-05-23 19:44 ` Maciej W. Rozycki
2001-05-24 4:25 ` Keith M Wesolowski
2001-05-23 21:06 ` Jun Sun
2001-05-23 19:29 ` Maciej W. Rozycki
2001-05-23 17:10 ` Jun Sun
2001-05-23 13:18 ` Maciej W. Rozycki
2001-05-23 17:38 ` Jun Sun
2001-05-23 18:47 ` Maciej W. Rozycki
2001-05-23 20:58 ` Jun Sun
2001-05-23 13:45 ` wrt irc joshua
2001-05-23 15:19 ` porting from headers Keith M Wesolowski
2001-05-23 15:55 ` wrt irc nick
2001-05-23 15:57 ` Keith M Wesolowski
2001-05-23 16:03 ` nick
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=3B0AEC51.B0C477E1@mvista.com \
--to=jsun@mvista.com \
--cc=flo@rfc822.org \
--cc=linux-mips@oss.sgi.com \
--cc=ppopov@mvista.com \
--cc=ralf@oss.sgi.com \
--cc=werkt@csh.rit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.