linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: microMIPS: Fix incorrect mask in insn_table_MM
@ 2017-10-31  5:35 Gustavo A. R. Silva
  2017-10-31  7:08 ` James Hogan
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-31  5:35 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, linux-kernel, Gustavo A. R. Silva, Julia Lawal

It seems that this is a typo error and the proper bit masking is
"RT | RS" instead of "RS | RS".

This issue was detected with the help of Coccinelle.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 arch/mips/mm/uasm-micromips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/mm/uasm-micromips.c b/arch/mips/mm/uasm-micromips.c
index c28ff53..cdb5a19 100644
--- a/arch/mips/mm/uasm-micromips.c
+++ b/arch/mips/mm/uasm-micromips.c
@@ -80,7 +80,7 @@ static const struct insn const insn_table_MM[insn_invalid] = {
 	[insn_jr]	= {M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS},
 	[insn_lb]	= {M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
 	[insn_ld]	= {0, 0},
-	[insn_lh]	= {M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM},
+	[insn_lh]	= {M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
 	[insn_ll]	= {M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM},
 	[insn_lld]	= {0, 0},
 	[insn_lui]	= {M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM},
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: microMIPS: Fix incorrect mask in insn_table_MM
  2017-10-31  5:35 [PATCH] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Gustavo A. R. Silva
@ 2017-10-31  7:08 ` James Hogan
  2017-10-31 22:00   ` James Hogan
  0 siblings, 1 reply; 3+ messages in thread
From: James Hogan @ 2017-10-31  7:08 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Ralf Baechle, linux-mips, linux-kernel, Julia Lawal

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

On Tue, Oct 31, 2017 at 12:35:03AM -0500, Gustavo A. R. Silva wrote:
> It seems that this is a typo error and the proper bit masking is
> "RT | RS" instead of "RS | RS".
> 
> This issue was detected with the help of Coccinelle.
> 
> Reported-by: Julia Lawall <julia.lawall@lip6.fr>

May I suggest adding:
Fixes: d6b3314b49e1 ("MIPS: uasm: Add lh uam instruction")

> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Reviewed-by: James Hogan <jhogan@@kernel.org>

Probably worthy of a stable tag too (though there will be conflicts with
ce807d5f67ed309a6f357b88cc93185d89e921d3 before 4.13):
Cc: <stable@vger.kernel.org> # 3.16+

Thanks
James

> ---
>  arch/mips/mm/uasm-micromips.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/mm/uasm-micromips.c b/arch/mips/mm/uasm-micromips.c
> index c28ff53..cdb5a19 100644
> --- a/arch/mips/mm/uasm-micromips.c
> +++ b/arch/mips/mm/uasm-micromips.c
> @@ -80,7 +80,7 @@ static const struct insn const insn_table_MM[insn_invalid] = {
>  	[insn_jr]	= {M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS},
>  	[insn_lb]	= {M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
>  	[insn_ld]	= {0, 0},
> -	[insn_lh]	= {M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM},
> +	[insn_lh]	= {M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
>  	[insn_ll]	= {M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM},
>  	[insn_lld]	= {0, 0},
>  	[insn_lui]	= {M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM},
> -- 
> 2.7.4
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: microMIPS: Fix incorrect mask in insn_table_MM
  2017-10-31  7:08 ` James Hogan
@ 2017-10-31 22:00   ` James Hogan
  0 siblings, 0 replies; 3+ messages in thread
From: James Hogan @ 2017-10-31 22:00 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Ralf Baechle, linux-mips, linux-kernel, Julia Lawal

On Tue, Oct 31, 2017 at 07:08:04AM +0000, James Hogan wrote:
> On Tue, Oct 31, 2017 at 12:35:03AM -0500, Gustavo A. R. Silva wrote:
> > Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> 
> Reviewed-by: James Hogan <jhogan@@kernel.org>

That should of course be:

Reviewed-by: James Hogan <jhogan@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-31 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31  5:35 [PATCH] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Gustavo A. R. Silva
2017-10-31  7:08 ` James Hogan
2017-10-31 22:00   ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).