]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: bpf: relax source operands check
authorJiong Wang <jiong.wang@netronome.com>
Fri, 1 Dec 2017 05:32:54 +0000 (21:32 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Dec 2017 19:59:20 +0000 (20:59 +0100)
commite4eaa1712114b9dae24e95571a4f8fdfb7b8465b
treeb1b695ba08d72181a7e8d40c50aca0dbff29ce12
parent22a0e50851d341c99f3e8d09fe6f7523b8042d70
nfp: bpf: relax source operands check

The NFP normally requires the source operands to be difference addressing
modes, but we should rule out the very special NN_REG_NONE type.

There are instruction that ignores both A/B operands, for example:

  local_csr_rd

For these instructions, we might pass the same operand type, NN_REG_NONE,
for both A/B operands.

NOTE: in current NFP ISA, it is only possible for instructions with
unrestricted operands to take none operands, but in case there is new and
similar instructoin in restricted form, they would follow similar rules,
so swreg_to_restricted is updated as well.

Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/nfp_asm.c