]> git.baikalelectronics.ru Git - kernel.git/commit
bpf jit: Let the powerpc jit handle negative offsets
authorJan Seiffert <kaffeemonster@googlemail.com>
Sun, 29 Apr 2012 19:02:19 +0000 (19:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Apr 2012 17:40:50 +0000 (13:40 -0400)
commit957d87df34cdaf16053c95603a380cbfafaa4821
tree4f0637e3fb5116fa259130b75a5dfdcb3e3335e7
parent1f3c406e61f0fa34d2bf52d89c9886f13d50ebd3
bpf jit: Let the powerpc jit handle negative offsets

Now the helper function from filter.c for negative offsets is exported,
it can be used it in the jit to handle negative offsets.

First modify the asm load helper functions to handle:
- know positive offsets
- know negative offsets
- any offset

then the compiler can be modified to explicitly use these helper
when appropriate.

This fixes the case of a negative X register and allows to lift
the restriction that bpf programs with negative offsets can't
be jited.

Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jan Seiffert <kaffeemonster@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/powerpc/net/bpf_jit.h
arch/powerpc/net/bpf_jit_64.S
arch/powerpc/net/bpf_jit_comp.c