linux-mips
[Top] [All Lists]

Re: [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in

To: Sanjay Lal <sanjayl@kymasys.com>
Subject: Re: [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for saving regs.
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Thu, 01 Nov 2012 16:10:31 +0400
Cc: kvm@vger.kernel.org, linux-mips@linux-mips.org
In-reply-to: <6BC12683-224F-4867-818C-FE4CF722B272@kymasys.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <6BC12683-224F-4867-818C-FE4CF722B272@kymasys.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
Hello.

On 31-10-2012 19:20, Sanjay Lal wrote:

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
---
  arch/mips/include/asm/stackframe.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/stackframe.h 
b/arch/mips/include/asm/stackframe.h
index cb41af5..59c9245 100644
--- a/arch/mips/include/asm/stackframe.h
+++ b/arch/mips/include/asm/stackframe.h
[...]
@@ -162,9 +162,9 @@
                .set    noat
                .set    reorder
                mfc0    k0, CP0_STATUS
-               sll     k0, 3           /* extract cu0 bit */
+               andi    k0,k0,0x10              /* check user mode bit*/
                .set    noreorder
-               bltz    k0, 8f
+         beq     k0, $0, 8f

   Use tabs, not spaces to indent the code, same as above.

WBR, Sergei


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