diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-10-12 12:31:20 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-14 05:33:05 -0400 |
commit | a771fe6e4e3e58f2056823ef9c30a554ec48f453 (patch) | |
tree | 06f60c5b96bd4b7c1690f86b0e44d74f6e3ffcc9 /arch/arm/kernel/entry-armv.S | |
parent | 80f506918fdaaca6b574ba931536a58ce015c7be (diff) |
ARM: 5757/1: Thumb-2: Correct "mov.w pc, lr" instruction which is unpredictable
The 32-bit wide variant of "mov pc, reg" in Thumb-2 is unpredictable
causing improper handling of the undefined instructions not caught by
the kernel. This patch adds a movw_pc macro for such situations
(currently only used in call_fpe).
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-armv.S')
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 322410be573c..0022b4d57f8b 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -608,33 +608,33 @@ call_fpe: | |||
608 | THUMB( add pc, r8 ) | 608 | THUMB( add pc, r8 ) |
609 | nop | 609 | nop |
610 | 610 | ||
611 | W(mov) pc, lr @ CP#0 | 611 | movw_pc lr @ CP#0 |
612 | W(b) do_fpe @ CP#1 (FPE) | 612 | W(b) do_fpe @ CP#1 (FPE) |
613 | W(b) do_fpe @ CP#2 (FPE) | 613 | W(b) do_fpe @ CP#2 (FPE) |
614 | W(mov) pc, lr @ CP#3 | 614 | movw_pc lr @ CP#3 |
615 | #ifdef CONFIG_CRUNCH | 615 | #ifdef CONFIG_CRUNCH |
616 | b crunch_task_enable @ CP#4 (MaverickCrunch) | 616 | b crunch_task_enable @ CP#4 (MaverickCrunch) |
617 | b crunch_task_enable @ CP#5 (MaverickCrunch) | 617 | b crunch_task_enable @ CP#5 (MaverickCrunch) |
618 | b crunch_task_enable @ CP#6 (MaverickCrunch) | 618 | b crunch_task_enable @ CP#6 (MaverickCrunch) |
619 | #else | 619 | #else |
620 | W(mov) pc, lr @ CP#4 | 620 | movw_pc lr @ CP#4 |
621 | W(mov) pc, lr @ CP#5 | 621 | movw_pc lr @ CP#5 |
622 | W(mov) pc, lr @ CP#6 | 622 | movw_pc lr @ CP#6 |
623 | #endif | 623 | #endif |
624 | W(mov) pc, lr @ CP#7 | 624 | movw_pc lr @ CP#7 |
625 | W(mov) pc, lr @ CP#8 | 625 | movw_pc lr @ CP#8 |
626 | W(mov) pc, lr @ CP#9 | 626 | movw_pc lr @ CP#9 |
627 | #ifdef CONFIG_VFP | 627 | #ifdef CONFIG_VFP |
628 | W(b) do_vfp @ CP#10 (VFP) | 628 | W(b) do_vfp @ CP#10 (VFP) |
629 | W(b) do_vfp @ CP#11 (VFP) | 629 | W(b) do_vfp @ CP#11 (VFP) |
630 | #else | 630 | #else |
631 | W(mov) pc, lr @ CP#10 (VFP) | 631 | movw_pc lr @ CP#10 (VFP) |
632 | W(mov) pc, lr @ CP#11 (VFP) | 632 | movw_pc lr @ CP#11 (VFP) |
633 | #endif | 633 | #endif |
634 | W(mov) pc, lr @ CP#12 | 634 | movw_pc lr @ CP#12 |
635 | W(mov) pc, lr @ CP#13 | 635 | movw_pc lr @ CP#13 |
636 | W(mov) pc, lr @ CP#14 (Debug) | 636 | movw_pc lr @ CP#14 (Debug) |
637 | W(mov) pc, lr @ CP#15 (Control) | 637 | movw_pc lr @ CP#15 (Control) |
638 | 638 | ||
639 | #ifdef CONFIG_NEON | 639 | #ifdef CONFIG_NEON |
640 | .align 6 | 640 | .align 6 |