Re: [PATCH] RFC: arm: eBPF JIT compiler

From: Andrew Lunn
Date: Thu May 25 2017 - 13:01:07 EST


On Thu, May 25, 2017 at 02:01:36AM +0530, Shubham Bansal wrote:
> Hi Andrew,
>
> I am attaching the latest patch which should work on ARMv5 , ARMv6 and ARMv7.
>
> Please test on your machines. Apologies for the last patch. This patch
> should work though.

andrew@shuttle:~/linux$ make -s -j 16
arch/arm/net/bpf_jit_32.c:1755:12: warning: â??validate_codeâ?? defined but not used [-Wunused-function]
static int validate_code(struct jit_ctx *ctx)
^~~~~~~~~~~~~
arch/arm/net/bpf_jit_32.c:1724:12: warning: â??build_bodyâ?? defined but not used [-Wunused-function]
static int build_body(struct jit_ctx *ctx)
^~~~~~~~~~
arch/arm/net/bpf_jit_32.c:1122:13: warning: â??build_epilogueâ?? defined but not used [-Wunused-function]
static void build_epilogue(struct jit_ctx *ctx)
^~~~~~~~~~~~~~
arch/arm/net/bpf_jit_32.c:1049:13: warning: â??build_prologueâ?? defined but not used [-Wunused-function]
static void build_prologue(struct jit_ctx *ctx)
^~~~~~~~~~~~~~
arch/arm/net/bpf_jit_32.c:174:13: warning: â??jit_fill_holeâ?? defined but not used [-Wunused-function]
static void jit_fill_hole(void *area, unsigned int size)
^~~~~~~~~~~~~

I _think_ this is because CONFIG_CPU_LITTLE_ENDIAN is not set. But it
is a little endian machine/configuration. ARM does not seem to use
CONFIG_CPU_LITTLE_ENDIAN, it just has CPU_BIG_ENDIAN.

Andrew