]> 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)
commitcc8dc62bd9ce9913e20cd5d2009f3699c25cc407
treeb1b695ba08d72181a7e8d40c50aca0dbff29ce12
parentc06c1f36dcd1e18cb35f30cc72e431b7eccf9a37
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