diff options
author | Denis Kirjanov <kda@linux-powerpc.org> | 2015-02-17 10:04:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-20 15:19:43 -0500 |
commit | 022909482d1c97c0b70438f2727a4f286ef0d289 (patch) | |
tree | eac6551ab43c924925e02057c4f9b413a88d214a /arch/powerpc/net/bpf_jit_comp.c | |
parent | 2ddadeab07dcc9b1456891b6fe1f1ba085028433 (diff) | |
download | lwn-022909482d1c97c0b70438f2727a4f286ef0d289.tar.gz lwn-022909482d1c97c0b70438f2727a4f286ef0d289.zip |
ppc: bpf: Add SKF_AD_CPU for ppc32
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/powerpc/net/bpf_jit_comp.c')
-rw-r--r-- | arch/powerpc/net/bpf_jit_comp.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 8b2926850125..17cea18a09d3 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c @@ -411,20 +411,8 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, PPC_SRWI(r_A, r_A, 5); break; case BPF_ANC | SKF_AD_CPU: -#ifdef CONFIG_SMP - /* - * PACA ptr is r13: - * raw_smp_processor_id() = local_paca->paca_index - */ - BUILD_BUG_ON(FIELD_SIZEOF(struct paca_struct, - paca_index) != 2); - PPC_LHZ_OFFS(r_A, 13, - offsetof(struct paca_struct, paca_index)); -#else - PPC_LI(r_A, 0); -#endif + PPC_BPF_LOAD_CPU(r_A); break; - /*** Absolute loads from packet header/data ***/ case BPF_LD | BPF_W | BPF_ABS: func = CHOOSE_LOAD_FUNC(K, sk_load_word); |