Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Dominic Sweetman <dom@mips.com>
Cc: Andrew Isaacson <adi@broadcom.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH 8/12]  cerr-printk-not-prom-printf
Date: Thu, 20 Oct 2005 12:17:11 +0100	[thread overview]
Message-ID: <20051020111711.GM2616@linux-mips.org> (raw)
In-Reply-To: <17239.31049.107570.828550@arsenal.mips.com>

On Thu, Oct 20, 2005 at 12:02:33PM +0100, Dominic Sweetman wrote:

> > The reason for this old commit was that this code is running
> > uncached, so the operation of ll/sc in the spinlocks is undefined
> > according to the MIPS64 spec...
> 
> The answer is more complicated.  MIPS64 (elsewhere) requires that the
> ll/sc "link" is broken on an exceptin - in fact on an 'eret'
> instruction.

But in case of the code in question no eret will be executed between taking
the cache error exception and printk trying to take the lock.

> So ll/sc on an uncached location works just fine in a uniprocessor.  
> However, it's unlikely that any cache-coherent mulitprocessor system
> will snoop uncached reads and writes, so it won't work in an SMP
> system.

Fine - but at that point we could have two processors messing with the
same buffers.  Bad Thing (TM).

  Ralf

  reply	other threads:[~2005-10-20 11:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-20  6:53 [PATCH 0/12] bcm1480 support Andrew Isaacson
2005-10-20  6:54 ` [PATCH 1/12] sibyte-fixes Andrew Isaacson
2005-10-20  6:55 ` [PATCH 2/12] 1480-headers Andrew Isaacson
2005-10-20  6:55 ` [PATCH 3/12] sibyte-header-cleanup Andrew Isaacson
2005-10-20  6:56 ` [PATCH 4/12] sb1a-support Andrew Isaacson
2005-10-20  6:56 ` [PATCH 5/12] 1480-support Andrew Isaacson
2005-10-20  6:57 ` [PATCH 6/12] bigsur-support Andrew Isaacson
2005-10-20  6:57 ` [PATCH 7/12] sb1-cache-exc-handling Andrew Isaacson
2005-10-20  6:57 ` [PATCH 8/12] cerr-printk-not-prom-printf Andrew Isaacson
2005-10-20 10:49   ` Ralf Baechle
2005-10-20 11:02     ` Dominic Sweetman
2005-10-20 11:17       ` Ralf Baechle [this message]
2005-10-20  6:58 ` [PATCH 9/12] sbmac-fixes Andrew Isaacson
2005-10-20  6:58 ` [PATCH 10/12] 1480-pci-support Andrew Isaacson
2005-10-20  6:59 ` [PATCH 11/12] 1480-ht-support Andrew Isaacson
2005-10-20  6:59 ` [PATCH 12/12] pci-expmem-hack Andrew Isaacson

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=20051020111711.GM2616@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=adi@broadcom.com \
    --cc=dom@mips.com \
    --cc=linux-mips@linux-mips.org \
    /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