summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuifeng Wang <ruifeng.wang@arm.com>2019-11-15 14:47:54 +0800
committerThomas Monjalon <thomas@monjalon.net>2019-11-21 00:30:39 +0100
commitbb2a9973c0e596aa6c845c21ee3228c43c7c04cf (patch)
treee208a05e533e4b546cc31e2d6abe7b3be5afdbc3
parent83b301e8bcf4db4c8275fdc97f49035ad72c43f8 (diff)
downloaddpdk-next-net-intel-bb2a9973c0e596aa6c845c21ee3228c43c7c04cf.zip
dpdk-next-net-intel-bb2a9973c0e596aa6c845c21ee3228c43c7c04cf.tar.gz
dpdk-next-net-intel-bb2a9973c0e596aa6c845c21ee3228c43c7c04cf.tar.xz
bpf/arm: fix clang build
Clang has different prototype for __builtin___clear_cache(). It requires 'char *' parameters while gcc requires 'void *'. Clang version 8.0 was used. Warning messages during build: ../lib/librte_bpf/bpf_jit_arm64.c:1438:26: warning: incompatible pointer types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'char *' [-Wincompatible-pointer-types] __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx); ^~~~~~~ ../lib/librte_bpf/bpf_jit_arm64.c:1438:35: warning: incompatible pointer types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'char *' [-Wincompatible-pointer-types] __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx); ^~~~~~~~~~~~~~~~~ Fixes: f3e516772464 ("bpf/arm: add prologue and epilogue") Cc: jerinj@marvell.com Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Gavin Hu <gavin.hu@arm.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
-rw-r--r--lib/librte_bpf/bpf_jit_arm64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_bpf/bpf_jit_arm64.c b/lib/librte_bpf/bpf_jit_arm64.c
index 8882fee..a5a5d46 100644
--- a/lib/librte_bpf/bpf_jit_arm64.c
+++ b/lib/librte_bpf/bpf_jit_arm64.c
@@ -1435,7 +1435,7 @@ bpf_jit_arm64(struct rte_bpf *bpf)
}
/* Flush the icache */
- __builtin___clear_cache(ctx.ins, ctx.ins + ctx.idx);
+ __builtin___clear_cache((char *)ctx.ins, (char *)(ctx.ins + ctx.idx));
bpf->jit.func = (void *)ctx.ins;
bpf->jit.sz = size;