This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Remove sparcv8 support
- From: Torvald Riegel <triegel at redhat dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: carlos at redhat dot com, adhemerval dot zanella at linaro dot org, andreas at gaisler dot com, libc-alpha at sourceware dot org, software at gaisler dot com
- Date: Wed, 09 Nov 2016 09:08:15 -0800
- Subject: Re: Remove sparcv8 support
- Authentication-results: sourceware.org; auth=none
- References: <20161026.144741.1659367414224835783.davem@davemloft.net> <1477565575.7146.199.camel@localhost.localdomain> <502720f6-3057-41f5-7832-4b219f5f729f@redhat.com> <20161107.113825.631166023186879199.davem@davemloft.net>
On Mon, 2016-11-07 at 11:38 -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.
What approach are you going to use in the kernel to emulate the CAS if
the hardware doesn't offer one? If you are not stopping all threads,
then there could be concurrent stores to the same memory location
targeted by the CAS; to make such stores atomic wrt. the CAS, you would
need to implement atomic stores in glibc to also use the kernel (eg, to
do a CAS).
I didn't see this in the glibc patch you sent, so I thought I'd ask.