Messages in this thread | | | Date | Mon, 21 Nov 2011 18:35:34 +0000 | From | Leif Lindholm <> | Subject | Re: [PATCH] arm: Add condition code check to SWP emulator |
| |
Stepan, thank you for spotting this.
On 11/20/11 10:55, Catalin Marinas wrote: > On 20 November 2011 08:41, Russell King - ARM Linux > <linux@arm.linux.org.uk> wrote: >> There's a much better algorithm to check this. See the bottom of >> arch/arm/nwfpe/fpopcode.c. >> >> It would probably be best for there to be a common function for doing >> this kind of check, rather than having several implementations of it >> scattered around the kernel. > > That's what Leif started doing.
Yes, I put together an RFC patch set based on that. But rather than duplicating code, I was looking to break it out for generic use. And then it was pointed out to me that we also have an additional implementation in kernel/kprobes-test.c (test_check_cc()).
I forgot to add the cover message on the set I just submitted to the linux-arm-kernel list, but it was meant to say: --- There are several locations in the kernel where software needs to inspect the condition codes of trapped instructions. The original bitmask implementation in the nwfpe code does this in an efficient manner. This series breaks this code out of nwfpe/fpopcode.{ch} into a standalone file for opcode operations, and contains additional patches to kprobes and SWP eumlation to use this interface. ---
/ Leif
| |