Re: [PATCH] arm: Add condition code check to SWP emulator

From: Leif Lindholm
Date: Mon Nov 21 2011 - 13:35:43 EST


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@xxxxxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/