linux-mips
[Top] [All Lists]

Re: O2 RM7000 Issues

To: David Daney <ddaney@avtrex.com>
Subject: Re: O2 RM7000 Issues
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 18 Sep 2007 09:47:08 +0100
Cc: Sergey Rogozhkin <rogozhkin@niisi.msk.ru>, Linux MIPS List <linux-mips@linux-mips.org>, "Gleb O. Raiko" <raiko@niisi.msk.ru>, Kumba <kumba@gentoo.org>
In-reply-to: <46EF0BBC.3020302@avtrex.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4687DCE2.8070302@gentoo.org> <468825BE.6090001@gmx.net> <50451.70.107.91.207.1183381723.squirrel@webmail.wesleyan.edu> <20070704152729.GA2925@linux-mips.org> <20070704192208.GA7873@linux-mips.org> <469C8600.7090208@niisi.msk.ru> <20070717122711.GA19977@linux-mips.org> <46EF0BBC.3020302@avtrex.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.14 (2007-02-12)
On Mon, Sep 17, 2007 at 04:20:28PM -0700, David Daney wrote:

Hi David,

> Ralf Baechle wrote:
> 
> >Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> >
> >diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
> >index f599e79..7ee0cb0 100644
> >--- a/arch/mips/kernel/cpu-probe.c
> >+++ b/arch/mips/kernel/cpu-probe.c
> >@@ -75,6 +75,26 @@ static void r4k_wait_irqoff(void)
> >     local_irq_enable();
> > }
> > 
> >+/*
> >+ * The RM7000 variant has to handle erratum 38.  The workaround is to not
> >+ * have any pending stores when the WAIT instruction is executed.
> >+ */
> >+static void rm7k_wait_irqoff(void)
> >+{
> >+    local_irq_disable();
> >+    if (!need_resched())
> >+            __asm__(
> >+            "       .set    push            \n"
> >+            "       .set    mips3           \n"
> >+            "       .set    noat            \n"
> >+            "       mfc0    $1, $12         \n"
> >+            "       sync                    \n"
> >+            "       mtc0    $1, $12         \n"
> >+            "       wait                    \n"
> >+            "       .set    pop             \n");
> >+    local_irq_enable();
> >+}
> >+
> 
> Technically, shouldn't that __asm__ be volatile?

Gcc won't delete this asm because it has no return value that is it will
treat it like a volatile asm.

  Ralf

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