diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-10-09 07:04:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-09 19:51:03 +0300 |
commit | 1c03e03f9b5278701d4a0e3444b2de3b9ddc244b (patch) | |
tree | 54fbfffb46aa588cd7c4e99175ec5297ab16618c /drivers/net/ethernet/netronome/nfp/nfp_asm.h | |
parent | fd068ddc888355dccd90ad610104e4addf23b7a3 (diff) | |
download | linux-1c03e03f9b5278701d4a0e3444b2de3b9ddc244b.tar.xz |
nfp: bpf: pad code with valid nops
We need to append up to 8 nops after last instruction to make
sure the CPU will not fetch garbage instructions with invalid
ECC if the code store was not initialized.
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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_asm.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_asm.h b/drivers/net/ethernet/netronome/nfp/nfp_asm.h index d95087e5fb73..c4c18dd5630a 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_asm.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_asm.h @@ -362,6 +362,8 @@ int swreg_to_unrestricted(swreg dst, swreg lreg, swreg rreg, int swreg_to_restricted(swreg dst, swreg lreg, swreg rreg, struct nfp_insn_re_regs *reg, bool has_imm8); +#define NFP_USTORE_PREFETCH_WINDOW 8 + int nfp_ustore_check_valid_no_ecc(u64 insn); u64 nfp_ustore_calc_ecc_insn(u64 insn); |