projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84c68cb
)
MIPS: bpf: Use the LO register to get division's quotient
author
Markos Chandras
<
[email protected]
>
Mon, 23 Jun 2014 09:38:47 +0000
(10:38 +0100)
committer
Ralf Baechle
<
[email protected]
>
Thu, 26 Jun 2014 09:48:20 +0000
(10:48 +0100)
Reading from the HI register to get the division result is wrong.
The quotient is placed in the LO register.
Signed-off-by: Markos Chandras <
[email protected]
>
Cc: "David S. Miller" <
[email protected]
>
Cc: Daniel Borkmann <
[email protected]
>
Cc: Alexei Starovoitov <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Patchwork: https://patchwork.linux-mips.org/patch/7122/
Signed-off-by: Ralf Baechle <
[email protected]
>
arch/mips/net/bpf_jit.c
patch
|
blob
|
history
diff --git
a/arch/mips/net/bpf_jit.c
b/arch/mips/net/bpf_jit.c
index f7c2064049897099c6205c5d9867ef625c5d2742..5cc92c4590cb7d03da6971f05163706a072bea17 100644
(file)
--- a/
arch/mips/net/bpf_jit.c
+++ b/
arch/mips/net/bpf_jit.c
@@
-408,7
+408,7
@@
static inline void emit_div(unsigned int dst, unsigned int src,
u32 *p = &ctx->target[ctx->idx];
uasm_i_divu(&p, dst, src);
p = &ctx->target[ctx->idx + 1];
- uasm_i_mf
hi
(&p, dst);
+ uasm_i_mf
lo
(&p, dst);
}
ctx->idx += 2; /* 2 insts */
}