Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH v2 bpf] mips: bpf: fix encoding bug for mm_srlv32_op
@ 2018-12-03 22:27 Jiong Wang
  2018-12-03 22:42 ` Paul Burton
  0 siblings, 1 reply; 5+ messages in thread
From: Jiong Wang @ 2018-12-03 22:27 UTC (permalink / raw)
  To: daniel, ast
  Cc: netdev, oss-drivers, Jiong Wang, Markos Chandras, Paul Burton,
	linux-mips

For micro-mips, srlv inside POOL32A encoding space should use 0x50
sub-opcode, NOT 0x90.

Some early version ISA doc describes the encoding as 0x90 for both srlv and
srav, this looks to me was a typo. I checked Binutils libopcode
implementation which is using 0x50 for srlv and 0x90 for srav.

v1->v2:
  - Keep mm_srlv32_op sorted by value.

Fixes: f31318fdf324 ("MIPS: uasm: Add srlv uasm instruction")
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
---
 arch/mips/include/uapi/asm/inst.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h
index c05dcf5..273ef58 100644
--- a/arch/mips/include/uapi/asm/inst.h
+++ b/arch/mips/include/uapi/asm/inst.h
@@ -369,8 +369,8 @@ enum mm_32a_minor_op {
 	mm_ext_op = 0x02c,
 	mm_pool32axf_op = 0x03c,
 	mm_srl32_op = 0x040,
+	mm_srlv32_op = 0x050,
 	mm_sra_op = 0x080,
-	mm_srlv32_op = 0x090,
 	mm_rotr_op = 0x0c0,
 	mm_lwxs_op = 0x118,
 	mm_addu32_op = 0x150,
-- 
2.7.4


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

* Re: [PATCH v2 bpf] mips: bpf: fix encoding bug for mm_srlv32_op
  2018-12-03 22:27 [PATCH v2 bpf] mips: bpf: fix encoding bug for mm_srlv32_op Jiong Wang
@ 2018-12-03 22:42 ` Paul Burton
  2018-12-03 23:55   ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Burton @ 2018-12-03 22:42 UTC (permalink / raw)
  To: Jiong Wang
  Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org,
	oss-drivers@netronome.com, Jiong Wang, Markos Chandras,
	Paul Burton, linux-mips@vger.kernel.org,
	linux-mips@vger.kernel.org

Hello,

Jiong Wang wrote:
> For micro-mips, srlv inside POOL32A encoding space should use 0x50
> sub-opcode, NOT 0x90.
> 
> Some early version ISA doc describes the encoding as 0x90 for both srlv and
> srav, this looks to me was a typo. I checked Binutils libopcode
> implementation which is using 0x50 for srlv and 0x90 for srav.
> 
> v1->v2:
> - Keep mm_srlv32_op sorted by value.
> 
> Fixes: f31318fdf324 ("MIPS: uasm: Add srlv uasm instruction")
> Cc: Markos Chandras <markos.chandras@imgtec.com>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: linux-mips@vger.kernel.org
> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Acked-by: Song Liu <songliubraving@fb.com>
> Signed-off-by: Jiong Wang <jiong.wang@netronome.com>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

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

* Re: [PATCH v2 bpf] mips: bpf: fix encoding bug for mm_srlv32_op
  2018-12-03 22:42 ` Paul Burton
@ 2018-12-03 23:55   ` Jakub Kicinski
  2018-12-04  0:06     ` Paul Burton
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2018-12-03 23:55 UTC (permalink / raw)
  To: Paul Burton, daniel@iogearbox.net, ast@kernel.org
  Cc: Jiong Wang, netdev@vger.kernel.org, oss-drivers@netronome.com,
	Markos Chandras, Paul Burton, linux-mips@vger.kernel.org

On Mon, 3 Dec 2018 22:42:04 +0000, Paul Burton wrote:
> Jiong Wang wrote:
> > For micro-mips, srlv inside POOL32A encoding space should use 0x50
> > sub-opcode, NOT 0x90.
> > 
> > Some early version ISA doc describes the encoding as 0x90 for both srlv and
> > srav, this looks to me was a typo. I checked Binutils libopcode
> > implementation which is using 0x50 for srlv and 0x90 for srav.
> > 
> > v1->v2:
> > - Keep mm_srlv32_op sorted by value.
> > 
> > Fixes: f31318fdf324 ("MIPS: uasm: Add srlv uasm instruction")
> > Cc: Markos Chandras <markos.chandras@imgtec.com>
> > Cc: Paul Burton <paul.burton@mips.com>
> > Cc: linux-mips@vger.kernel.org
> > Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> > Acked-by: Song Liu <songliubraving@fb.com>
> > Signed-off-by: Jiong Wang <jiong.wang@netronome.com>  
> 
> Applied to mips-fixes.

Newbie process related question - are the arch JIT patches routed via
arch trees or bpf-next?  Jiong has more (slightly conflicting) JIT
patches to send - I wonder how they'll get applied and whether to wait
for the mips -> Linus -> net -> bpf merge chain.

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

* Re: [PATCH v2 bpf] mips: bpf: fix encoding bug for mm_srlv32_op
  2018-12-03 23:55   ` Jakub Kicinski
@ 2018-12-04  0:06     ` Paul Burton
  2018-12-04  0:23       ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Burton @ 2018-12-04  0:06 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: daniel@iogearbox.net, ast@kernel.org, Jiong Wang,
	netdev@vger.kernel.org, oss-drivers@netronome.com,
	Markos Chandras, Paul Burton, linux-mips@vger.kernel.org

Hi Jakub,

On Mon, Dec 03, 2018 at 03:55:45PM -0800, Jakub Kicinski wrote:
> On Mon, 3 Dec 2018 22:42:04 +0000, Paul Burton wrote:
> > Jiong Wang wrote:
> > > For micro-mips, srlv inside POOL32A encoding space should use 0x50
> > > sub-opcode, NOT 0x90.
> > > 
> > > Some early version ISA doc describes the encoding as 0x90 for both srlv and
> > > srav, this looks to me was a typo. I checked Binutils libopcode
> > > implementation which is using 0x50 for srlv and 0x90 for srav.
> > > 
> > > v1->v2:
> > > - Keep mm_srlv32_op sorted by value.
> > > 
> > > Fixes: f31318fdf324 ("MIPS: uasm: Add srlv uasm instruction")
> > > Cc: Markos Chandras <markos.chandras@imgtec.com>
> > > Cc: Paul Burton <paul.burton@mips.com>
> > > Cc: linux-mips@vger.kernel.org
> > > Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> > > Acked-by: Song Liu <songliubraving@fb.com>
> > > Signed-off-by: Jiong Wang <jiong.wang@netronome.com>  
> > 
> > Applied to mips-fixes.
> 
> Newbie process related question - are the arch JIT patches routed via
> arch trees or bpf-next?  Jiong has more (slightly conflicting) JIT
> patches to send - I wonder how they'll get applied and whether to wait
> for the mips -> Linus -> net -> bpf merge chain.

I'd expect that to be a case-by-case "what makes most sense this time?"
sort of question.

In this particular patch the code you're changing isn't specifically
BPF-related code, it's part of the MIPS uasm assembler which MIPS BPF
happens to use behind the scenes, so since it seemed like a pretty
standalone patch taking it through the MIPS tree made sense to me.

If you have related patches the best thing to do would be to submit them
together as a series. Then after the maintainers involved can see the
patches we can figure out the best way to apply them.

Thanks,
    Paul

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

* Re: [PATCH v2 bpf] mips: bpf: fix encoding bug for mm_srlv32_op
  2018-12-04  0:06     ` Paul Burton
@ 2018-12-04  0:23       ` Jakub Kicinski
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2018-12-04  0:23 UTC (permalink / raw)
  To: Paul Burton
  Cc: daniel@iogearbox.net, ast@kernel.org, Jiong Wang,
	netdev@vger.kernel.org, oss-drivers@netronome.com,
	Markos Chandras, Paul Burton, linux-mips@vger.kernel.org

On Tue, 4 Dec 2018 00:06:24 +0000, Paul Burton wrote:
> If you have related patches the best thing to do would be to submit them
> together as a series. Then after the maintainers involved can see the
> patches we can figure out the best way to apply them.

Right, in hindsight that could've worked better, but for netdev/bpf
patches posting fixes and features in one series is a no-no :)

I guess the best way forward would be for Jiong to post the dependent
set (BPF_ALU | BPF_ARSH support) as an RFC and then decide.  The
conflict will be trivial, yet avoidable if we wait for this to
propagate to bpf-next.

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

end of thread, other threads:[~2018-12-04  0:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-03 22:27 [PATCH v2 bpf] mips: bpf: fix encoding bug for mm_srlv32_op Jiong Wang
2018-12-03 22:42 ` Paul Burton
2018-12-03 23:55   ` Jakub Kicinski
2018-12-04  0:06     ` Paul Burton
2018-12-04  0:23       ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox