summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/netronome/nfp/nfp_asm.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-03-29 03:48:37 +0300
committerAlexei Starovoitov <ast@kernel.org>2018-03-29 05:36:14 +0300
commitdf4a37d8b53f9fb9af722b056da5edbd9a531768 (patch)
tree6935e2eadf67ddc371139569dce030b7dabe4cd1 /drivers/net/ethernet/netronome/nfp/nfp_asm.h
parent41aed09cf61c00ef6c3b2648d5a193cbaf2a74d0 (diff)
downloadlinux-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.h1
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)