linux-mips
[Top] [All Lists]

Re: [PATCH] vr41xx: fix problem with vr41xx_cpu_wait

To: ralf@linux-mips.org
Subject: Re: [PATCH] vr41xx: fix problem with vr41xx_cpu_wait
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Wed, 20 Aug 2008 00:02:36 +0900 (JST)
Cc: ricmm@gentoo.org, yoichi_yuasa@tripeaks.co.jp, linux-mips@linux-mips.org
In-reply-to: <20080806171531.GA5848@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080806161710.GA22957@woodpecker.gentoo.org> <20080807.021057.59650770.anemo@mba.ocn.ne.jp> <20080806171531.GA5848@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 6 Aug 2008 18:15:31 +0100, Ralf Baechle <ralf@linux-mips.org> wrote:
> > http://www.linux-mips.org/archives/linux-mips/2007-11/msg00123.html
> > 
> > To support vr41's standby instruction in same way, we might have to
> > synthesise rollback_handle_int, etc. or r4k_wait at runtime...
> 
> The infrastructure for that is now there :-)  Another question of course
> is if that stuff really deserve this ultimate degree of optimization.

Well, this patch on top of my patch might be enough.

--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -152,7 +152,7 @@ LEAF(r4k_wait)
        .set    push
        .set    noat
        MFC0    k0, CP0_EPC
-       PTR_LA  k1, r4k_wait
+       PTR_L   k1, cpu_wait
        ori     k0, 0x1f        /* 32 byte rollback region */
        xori    k0, 0x1f
        bne     k0, k1, 9f

Of course old_vr41xx_cpu_wait should be modified as like as r4k_wait
and "rollback = (cpu_wait == r4k_wait)" lines in traps.c should be
changed...

---
Atsushi Nemoto

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