Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: "Kevin D. Kissell" <kevink@mips.com>
Cc: Linux SGI <linux@cthulhu.engr.sgi.com>
Subject: Re: Kernel Semaphores
Date: Mon, 6 Dec 1999 17:08:32 -0200	[thread overview]
Message-ID: <19991206170831.A15350@uni-koblenz.de> (raw)
In-Reply-To: <00b901bf4003$3f583c50$0ceca8c0@satanas.mips.com>

On Mon, Dec 06, 1999 at 05:02:06PM +0100, Kevin D. Kissell wrote:

> Some time ago, I fixed the assembler macros
> for waking_non_zero_interruptable and down_trylock
> to be correct(ish) for MIPSEL and MIPSEB, but
> there remained the issue of their requiring the use
> of 64-bit instructions to work - they "cheat" by using
> the same ll/sc pair to update both the count and the
> waking field of the semaphore.

Btw, we have two variants for all the semaphore code as you know.  We
can eleminate the little endian variant by just swapping the order of
the two atomic_t members in struct semaphore which will eleminate the
maintenance problems.

> To make it work on 32-bit CPUs, I looked at using
> the x386 model, but that one uses interrupt disables
> and is intrinsically SMP-unsafe.

semaphore-helper.h uses spin_lock_irqsave which is smp-safe.  The way
we do things for 64-bit MIPS is just more performant.

  Ralf

  reply	other threads:[~1999-12-06 19:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-06 16:02 Kernel Semaphores Kevin D. Kissell
1999-12-06 19:08 ` Ralf Baechle [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-12-06 20:33 Kevin D. Kissell
1999-12-06 21:13 ` Ralf Baechle

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=19991206170831.A15350@uni-koblenz.de \
    --to=ralf@oss.sgi.com \
    --cc=kevink@mips.com \
    --cc=linux@cthulhu.engr.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