On Mon, 2011-07-04 at 16:10 -0400, Nicolas Pitre wrote:
On Mon, 4 Jul 2011, Tixy wrote:
On Mon, 2011-07-04 at 15:45 -0400, Nicolas Pitre wrote:
On Mon, 4 Jul 2011, Tixy wrote:
We've been talking about data-processing instructions but I've also done similar for "ldr pc, [...]" as Arnd suggested that we might have single kernel binaries that execute on both ARMv4 and v5 hardware.
Sure, and I think we already do with some configurations. But in that case nothing should ever use Thumb mode in the kernel.
Nicolas, I thought you meant by this that for the ldr pc,[...] case we didn't have to worry about interworking. I.e. don't code for the possibility.
Should an ARMv7 kernel have code running in Thumb mode if it wasn't configured with CONFIG_THUMB2_KERNEL?
I would say no.
If I was right about your meaning for the ARMv4/v5 statement, then doesn't the same hold true for ARMv7 with no CONFIG_THUMB2_KERNEL? I.e. don't worry about interworking? Where "don't worry" means either
a) ignore bit 0 of PC or b) OOPs if bit 0 is set
rather than
c) switch to Thumb mode if the real instruction would have done that on the current hardware
I like the idea of b) and throw away my code which checks interworking behaviour of instructions.