linux-mips
[Top] [All Lists]

Re: Once again: test_and_set for CPUs w/o LL/SC

To: Johannes Stezenbach <js@convergence.de>, "Kevin D. Kissell" <kevink@mips.com>, linux-mips@linux-mips.org
Subject: Re: Once again: test_and_set for CPUs w/o LL/SC
From: Daniel Jacobowitz <dan@debian.org>
Date: Mon, 7 Oct 2002 14:51:36 -0400
In-reply-to: <20021007184344.GA17548@convergence.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20020916164034.GA12489@convergence.de> <20021007144749.GB16641@convergence.de> <01fd01c26e1d$add77240$10eca8c0@grendel> <20021007184344.GA17548@convergence.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.1i
On Mon, Oct 07, 2002 at 08:43:44PM +0200, Johannes Stezenbach wrote:
> The question is how the glibc can detect if
> a) the CPU does not have LL/SC
> b) the kernel guarantees k1 != MAGIC
> 
> I think the kernel should announce this explicitly.
> In my patch from Sep 16 I used a sysctl, but that's
> probably bad because glibc would rely on a real new
> include/linux/sysctl.h.
> 
> I need some advice on this (maybe add a line to /proc/cpuinfo,
> or create a new /proc entry? or add a sysmips call to get
> this info?).

You should be using an "aux vector"; see how PowerPC provides current
glibc with the size of a cache line.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

<Prev in Thread] Current Thread [Next in Thread>