summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/netronome/nfp/nfp_asm.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-01-10 15:26:00 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-10 15:49:35 +0300
commit488feeaf6d2f9189bdb65f31094a8cff5fcd6c58 (patch)
tree635d27a12d0d09171a494dfb44ec42717d419782 /drivers/net/ethernet/netronome/nfp/nfp_asm.h
parent1549921da3e8efb6c95e39444c67ed1729a0ccaf (diff)
downloadlinux-488feeaf6d2f9189bdb65f31094a8cff5fcd6c58.tar.xz
nfp: bpf: add helpers for modifying branch addresses
In preparation for better handling of relocations move existing helper for setting branch offset to nfp_asm.c and add two more. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_asm.h')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_asm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_asm.h b/drivers/net/ethernet/netronome/nfp/nfp_asm.h
index a24daeab1a77..a50240ab0ce2 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_asm.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_asm.h
@@ -93,6 +93,10 @@ enum br_ctx_signal_state {
BR_CSS_NONE = 2,
};
+u16 br_get_offset(u64 instr);
+void br_set_offset(u64 *instr, u16 offset);
+void br_add_offset(u64 *instr, u16 offset);
+
#define OP_BBYTE_BASE 0x0c800000000ULL
#define OP_BB_A_SRC 0x000000000ffULL
#define OP_BB_BYTE 0x00000000300ULL