[Top] [All Lists]

Re: [PATCH] MIPS: Print correct PC in trace dump after NMI exception

To: Ralf Baechle <>
Subject: Re: [PATCH] MIPS: Print correct PC in trace dump after NMI exception
From: Markos Chandras <>
Date: Tue, 8 Oct 2013 13:31:28 +0100
Cc: <>, Leonid Yegoshin <>
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0
On 10/08/13 13:15, Ralf Baechle wrote:
On Tue, Oct 08, 2013 at 12:39:31PM +0100, Markos Chandras wrote:

+       /*
+        * Clear ERL - restore segment mapping
+        * Clear BEV - required for page fault exception handler to work
+        */
+       mfc0    k0, CP0_STATUS
+       ori     k0, k0, ST0_EXL
+       lui     k1, %hi(~ST0_BEV)
+       ori     k1, k1, %lo(~ST0_ERL)

Why not:

        li      k1 ~(ST0_BEV | ST0_ERL)

I have no answer to that :) Looks good to me.

If you were afraid gas might use $1 expanding this macro instruction - no,
it won't.  A belt & suspenders approach might be to drop in a ".set noat";
it would make the assembler throw an error if should ever see the need to
use $1.

yeah i don't think the assembler would pick $1 in this case but we could add ".set noat" just to be safe i suppose.

Thanks for the review. Could you fix these problems for me or should i submit a new patch?

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