Commit 2d4b6c9a authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM] 5221/1: fix ldm/stm emulation for kprobes

Logic for the p bit was reversed.
Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d81030a1
......@@ -488,7 +488,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
if (!ubit)
addr -= reg_count;
addr += (!pbit ^ !ubit);
addr += (!pbit == !ubit);
reg_bit_vector = insn & 0xffff;
while (reg_bit_vector) {
......@@ -503,7 +503,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
if (wbit) {
if (!ubit)
addr -= reg_count;
addr -= (!pbit ^ !ubit);
addr -= (!pbit == !ubit);
regs->uregs[rn] = (long)addr;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment