From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: <linux-mips@linux-mips.org>,
Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Subject: Re: [PATCH] MIPS: Print correct PC in trace dump after NMI exception
Date: Tue, 8 Oct 2013 13:31:28 +0100 [thread overview]
Message-ID: <5253FB20.7050909@imgtec.com> (raw)
In-Reply-To: <20131008121546.GI1615@linux-mips.org>
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?
WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Subject: Re: [PATCH] MIPS: Print correct PC in trace dump after NMI exception
Date: Tue, 8 Oct 2013 13:31:28 +0100 [thread overview]
Message-ID: <5253FB20.7050909@imgtec.com> (raw)
Message-ID: <20131008123128.MZrPPb6yMzYyxt8b2D3WwvrxK3LTqs-9X_eL2ITXbck@z> (raw)
In-Reply-To: <20131008121546.GI1615@linux-mips.org>
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?
next prev parent reply other threads:[~2013-10-08 12:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 11:39 [PATCH] MIPS: Print correct PC in trace dump after NMI exception Markos Chandras
2013-10-08 11:39 ` Markos Chandras
2013-10-08 11:48 ` thomas.langer
2013-10-08 11:48 ` thomas.langer
2013-10-08 12:21 ` Markos Chandras
2013-10-08 12:21 ` Markos Chandras
2013-10-08 12:29 ` Ralf Baechle
2013-10-08 12:57 ` thomas.langer
2013-10-08 12:57 ` thomas.langer
2013-10-08 12:15 ` Ralf Baechle
2013-10-08 12:31 ` Markos Chandras [this message]
2013-10-08 12:31 ` Markos Chandras
2013-10-08 12:38 ` Ralf Baechle
2013-10-08 12:43 ` Markos Chandras
2013-10-08 12:43 ` Markos Chandras
2013-10-08 12:55 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5253FB20.7050909@imgtec.com \
--to=markos.chandras@imgtec.com \
--cc=Leonid.Yegoshin@imgtec.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox