[Top] [All Lists]

Re: [PATCH] TX49 MFC0 bug workaround

Subject: Re: [PATCH] TX49 MFC0 bug workaround
From: Atsushi Nemoto <>
Date: Fri, 03 Feb 2006 02:04:28 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
>>>>> On Thu, 2 Feb 2006 16:56:56 +0000, Ralf Baechle <> 
>>>>> said:

>> Hmm, wouldn't that "nop" alternative be simpler?

ralf> Simpler maybe - but this variant has zero runtime overhead.

Yes.  I do not want do add extra cycles.

However, It can be more readable since we can safely mask bit[5:1] (as
local_irq_enable() does).  Like this:

__asm__ (
        "       .macro  local_irq_disable\n"
        "       .set    push                                            \n"
        "       .set    noat                                            \n"
        "       di                                                      \n"
        "       mfc0    $1,$12                                          \n"
        "       ori     $1,0x1f                                         \n"
        "       xori    $1,0x1f                                         \n"
        "       .set    noreorder                                       \n"
        "       mtc0    $1,$12                                          \n"
        "       irq_disable_hazard                                      \n"
        "       .set    pop                                             \n"
        "       .endm                                                   \n");

Is this preferred?  We can get rid of all TX49XX_MFC0_WAR on this way.

Atsushi Nemoto

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