Re: [PATCH] ARM: vfp: Fix up exception location in Thumb mode

From: Catalin Marinas
Date: Sun Jan 16 2011 - 06:51:52 EST


On Saturday, 15 January 2011, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Sat, Jan 15, 2011 at 03:38:16PM +0000, Catalin Marinas wrote:
>> On 14 January 2011 18:47, Russell King - ARM Linux
>> <linux@xxxxxxxxxxxxxxxx> wrote:
>> > diff -u b/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
>> > --- b/arch/arm/kernel/entry-armv.S
>> > +++ b/arch/arm/kernel/entry-armv.S
>> > @@ -499,10 +499,11 @@
>> >    Âblo   __und_usr_unknown
>> > Â3:   ldrht  r0, [r4]
>> >    Âadd   r2, r2, #2           Â@ r2 is PC + 2, make it PC + 4
>> > -    orr   r0, r0, r5, lsl #16
>> > +    str   r2, [sp, #S_PC]         @ it's a 2x16bit instr, update
>> > +    orr   r0, r0, r5, lsl #16       @ Âregs->ARM_pc
>> > Â Â Â Â@
>> > Â Â Â Â@ r0 = the two 16-bit Thumb instructions which caused the exception
>> > - Â Â Â @ r2 = PC value for the following Thumb instruction (:= regs->ARM_pc+2)
>> > + Â Â Â @ r2 = PC value for the following Thumb instruction (:= regs->ARM_pc)
>> > Â Â Â Â@ r4 = PC value for the first 16-bit Thumb instruction
>> > Â Â Â Â@
>> > Â#else
>>
>> Do we need to modify the VFP entry code to avoit the store to ARM_pc?
>
> The one after the sub #4 instruction?

No, I misread the code, we still need the one after sub #4.


--
Catalin
--
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/