aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-01-27 15:46:20 -0800
committerDima Zavin <dima@android.com>2011-02-03 14:11:40 -0800
commit357d63299a828b4b25c5ada15d0d8ca455e6c1c0 (patch)
tree552ba1f404965b2903c60da0228f490f78786c3a
parent1fdabcaa037f4d7df8da1ccdefacb8f7055153bb (diff)
downloadexperimental-sandbox/dima/android-2.6.38.tar.gz
ARM: vfp: Move exception address fixup into vfphw.Ssandbox/dima/android-2.6.38
If the PC on the stack is updated in entry-armv.S, do_undefinstr can get called after the fixup. do_undefinstr does its own fixup, and doing both causes the PC to point to half way through an instruction. Instead, do the fixup in do_vfp, where only the vfp code can get called. Change-Id: I6d966887adc8ed58d88bfe0cb3c0ba29213be488 Signed-off-by: Colin Cross <ccross@android.com>
-rw-r--r--arch/arm/kernel/entry-armv.S3
-rw-r--r--arch/arm/vfp/entry.S3
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index b3ec6f92770..94fbf2c72ab 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -491,8 +491,7 @@ __und_usr:
blo __und_usr_unknown
3: ldrht r0, [r4]
add r2, r2, #2 @ r2 is PC + 2, make it PC + 4
- str r2, [sp, #S_PC] @ it's a 2x16bit instr, update
- orr r0, r0, r5, lsl #16 @ regs->ARM_pc
+ orr r0, r0, r5, lsl #16
#else
b __und_usr_unknown
#endif
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index 4fa9903b83c..c1a97840258 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -10,7 +10,7 @@
*
* Basic entry code, called from the kernel's undefined instruction trap.
* r0 = faulted instruction
- * r5 = faulted PC+4
+ * r2 = faulted PC+4
* r9 = successful return
* r10 = thread_info structure
* lr = failure return
@@ -26,6 +26,7 @@ ENTRY(do_vfp)
str r11, [r10, #TI_PREEMPT]
#endif
enable_irq
+ str r2, [sp, #S_PC] @ update regs->ARM_pc for Thumb 2 case
ldr r4, .LCvfp
ldr r11, [r10, #TI_CPU] @ CPU number
add r10, r10, #TI_VFPSTATE @ r10 = workspace