mips: bpf: Fix broken BPF_MOD
authorDenis Kirjanov <kda@linux-powerpc.org>
Mon, 1 Dec 2014 09:57:02 +0000 (12:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 01:22:30 +0000 (20:22 -0500)
commit2e46477a12f6fd273e31a220b155d66e8352198c
treea106c2e098157aa845fdc5d86ff7aae7fed5e7db
parentf2a01517f2a1040a0b156f171a7cefd748f2fd03
mips: bpf: Fix broken BPF_MOD

Remove optimize_div() from BPF_MOD | BPF_K case
since we don't know the dividend and fix the
emit_mod() by reading the mod operation result from HI register

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/mips/net/bpf_jit.c