diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-03-29 03:48:37 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-03-29 05:36:14 +0300 |
commit | df4a37d8b53f9fb9af722b056da5edbd9a531768 (patch) | |
tree | 6935e2eadf67ddc371139569dce030b7dabe4cd1 /drivers/net/ethernet/netronome/nfp/nfp_asm.h | |
parent | 41aed09cf61c00ef6c3b2648d5a193cbaf2a74d0 (diff) | |
download | linux-df4a37d8b53f9fb9af722b056da5edbd9a531768.tar.xz |
nfp: bpf: add support for bpf_get_prandom_u32()
NFP has a prng register, which we can read to obtain a u32 worth
of pseudo random data. Generate code for it.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_asm.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_asm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_asm.h b/drivers/net/ethernet/netronome/nfp/nfp_asm.h index 36524dd6021b..5f2b2f24f4fa 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_asm.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_asm.h @@ -284,6 +284,7 @@ enum lcsr_wr_src { #define NFP_CSR_ACT_LM_ADDR1 0x6c #define NFP_CSR_ACT_LM_ADDR2 0x94 #define NFP_CSR_ACT_LM_ADDR3 0x9c +#define NFP_CSR_PSEUDO_RND_NUM 0x148 /* Software register representation, independent of operand type */ #define NN_REG_TYPE GENMASK(31, 24) |