diff options
author | Mark Brown <broonie@linaro.org> | 2014-02-10 17:37:43 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-10 17:37:43 +0000 |
commit | 4b9c8ddadce3ec70fa5d93875adeda861b21c84e (patch) | |
tree | 6ed53e819e5c763f751ff968a650b236d2d02545 /arch/powerpc/net/bpf_jit_comp.c | |
parent | 51ad557e21b8713f3abc286c14bca4ed01b8e56d (diff) | |
parent | 1569265782ef26ed77ce45ebeb0676f11d4c114a (diff) |
Merge tag 'v3.10.29' into linux-linaro-lsk
This is the 3.10.29 stable release
Diffstat (limited to 'arch/powerpc/net/bpf_jit_comp.c')
-rw-r--r-- | arch/powerpc/net/bpf_jit_comp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index c427ae36374..a012a9747cd 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c @@ -209,10 +209,11 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image, } PPC_DIVWU(r_A, r_A, r_X); break; - case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K); */ + case BPF_S_ALU_DIV_K: /* A /= K */ + if (K == 1) + break; PPC_LI32(r_scratch1, K); - /* Top 32 bits of 64bit result -> A */ - PPC_MULHWU(r_A, r_A, r_scratch1); + PPC_DIVWU(r_A, r_A, r_scratch1); break; case BPF_S_ALU_AND_X: ctx->seen |= SEEN_XREG; |