mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
nfp: bpf: pass dst register to ld_field instruction
ld_field instruction is a bit special because the encoding uses two source registers and one of them becomes the output. We do need to pass the dst register to our encoding helpers though, otherwise the "write both banks" flag will not be observed. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2e85d3884f
commit
2de1be1db2
1 changed files with 2 additions and 1 deletions
|
@ -408,7 +408,8 @@ emit_ld_field_any(struct nfp_prog *nfp_prog, enum shf_sc sc, u8 shift,
|
|||
struct nfp_insn_re_regs reg;
|
||||
int err;
|
||||
|
||||
err = swreg_to_restricted(reg_none(), dst, src, ®, true);
|
||||
/* Note: ld_field is special as it uses one of the src regs as dst */
|
||||
err = swreg_to_restricted(dst, dst, src, ®, true);
|
||||
if (err) {
|
||||
nfp_prog->error = err;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue