From: Sam Ravnborg <sam@ravnborg.org>
To: David Miller <davem@davemloft.net>
Cc: carlos@redhat.com, triegel@redhat.com,
adhemerval.zanella@linaro.org, andreas@gaisler.com,
libc-alpha@sourceware.org, software@gaisler.com
Subject: Re: Remove sparcv8 support
Date: Mon, 07 Nov 2016 21:21:00 -0000 [thread overview]
Message-ID: <20161107212050.GA27481@ravnborg.org> (raw)
In-Reply-To: <20161107.113825.631166023186879199.davem@davemloft.net>
On Mon, Nov 07, 2016 at 11:38:25AM -0500, David Miller wrote:
>
> So the following attached is what I started playing around with this
> weekend.
>
> It implements software trap "0x23" to perform a CAS operations, the
> operands are expected in registers %o0, %o1, and %o2.
>
> Since it was easiest to test I implemented this first on sparc64 which
> just executes the CAS instruction directly. I'll start working on the
> 32-bit part in the background.
>
> The capability will be advertised via the mask returned by the "get
> kernel features" system call. We could check this early in the
> crt'ish code and cache the value in a variable which the atomics can
> check.
>
> Another kernel side change I have to do is advertise the LEON CAS
> availability in the _dl_hwcaps so that we can use the LEON CAS in
> glibc when available.
>
> The first patch is the kernel side, and the second is the glibc side.
> The whole NPTL testsuite passes for the plain 32-bit sparc target with
> these changes.
Glad that you found some time to look into this!
> >From fa1cad39df7318cdb46baea5774c340322cd74f2 Mon Sep 17 00:00:00 2001
> From: "David S. Miller" <davem@davemloft.net>
> Date: Mon, 7 Nov 2016 08:27:05 -0800
> Subject: [PATCH] sparc64: Add CAS emulation trap.
>
> Older 32-bit sparc cpus (other than LEON) lack a CAS instruction, so
> we need to provide some kind of helper infrastructure in the kernel
> to emulate it.
>
> This is the first part which firstly defines the basic infrastructure
> and the simplest implementation, which is to just directly execute the
> instruction on sparc64.
>
> We make use of the window fill/spill fault unwind facilities to make
> this as simple as possible. When we take a full TSB miss, we check if
> the trap level is greater than one, and if so unwind the trap to one
> of the final 3 instructions of the interrupted trap handler's block.
> Which of the three to use is based upon whether this is a real fault,
> an unaligned access, or a data access exception (ie. bus error).
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> arch/sparc/include/uapi/asm/unistd.h | 1 +
> arch/sparc/kernel/Makefile | 1 +
> arch/sparc/kernel/sys_sparc_64.c | 2 +-
> arch/sparc/kernel/ttable_64.S | 3 ++-
> 4 files changed, 5 insertions(+), 2 deletions(-)
casemul.S is missing.
So all the fun kernel stuf was not included in the patch...
Sam
next prev parent reply other threads:[~2016-11-07 21:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 19:47 Adhemerval Zanella
2016-10-20 20:56 ` David Miller
2016-10-21 9:02 ` Andreas Larsson
2016-10-21 13:13 ` Adhemerval Zanella
2016-10-21 15:03 ` David Miller
2016-10-24 17:14 ` Torvald Riegel
2016-10-24 17:25 ` Torvald Riegel
2016-10-24 17:43 ` Adhemerval Zanella
2016-10-25 14:34 ` Andreas Larsson
2016-10-25 14:45 ` Adhemerval Zanella
2016-10-26 14:46 ` Andreas Larsson
2016-10-26 18:03 ` Adhemerval Zanella
2016-10-26 18:47 ` David Miller
2016-10-26 19:39 ` Adhemerval Zanella
2016-10-27 10:54 ` Torvald Riegel
2016-10-27 14:36 ` Carlos O'Donell
2016-11-07 16:38 ` David Miller
2016-11-07 21:21 ` Sam Ravnborg [this message]
2016-11-08 1:06 ` David Miller
2016-11-09 5:49 ` Sam Ravnborg
2016-11-10 23:33 ` David Miller
2016-11-09 17:08 ` Torvald Riegel
2016-11-09 17:16 ` David Miller
2016-11-10 5:05 ` Torvald Riegel
2016-11-10 16:41 ` Chris Metcalf
2016-11-10 17:08 ` Torvald Riegel
2016-11-10 18:22 ` Chris Metcalf
2016-11-10 23:38 ` Torvald Riegel
2016-10-27 10:38 ` Torvald Riegel
2016-11-01 15:27 ` Andreas Larsson
2016-10-25 14:34 ` Andreas Larsson
2016-10-25 16:22 ` Torvald Riegel
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=20161107212050.GA27481@ravnborg.org \
--to=sam@ravnborg.org \
--cc=adhemerval.zanella@linaro.org \
--cc=andreas@gaisler.com \
--cc=carlos@redhat.com \
--cc=davem@davemloft.net \
--cc=libc-alpha@sourceware.org \
--cc=software@gaisler.com \
--cc=triegel@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).