diff options
author | Philippe Gerum <rpm@xenomai.org> | 2009-06-22 12:26:07 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-09-16 21:28:40 -0400 |
commit | 9ea7770fdb0d6742d6a0aba62facda4b35356cf2 (patch) | |
tree | 679027177d58a51f3e4611cfc7ac5d51892db770 /arch/blackfin | |
parent | 7a7967dc1b606f8c88e33bbec773bf82b4a52e6e (diff) |
Blackfin: sanitize manual control of IPEND[4]
Cleanup is performed in two ways:
- remove extraneous updates of IPEND[4] w/ CONFIG_IPIPE,
and document remaining use.
- substitute pop-reg-from-stack instructions with plain SP fixups in
all save-RETI-then-discard patterns.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 919f7aef0773..2c58b60ff131 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -708,8 +708,14 @@ ENTRY(_system_call) | |||
708 | #ifdef CONFIG_IPIPE | 708 | #ifdef CONFIG_IPIPE |
709 | cc = BITTST(r7, TIF_IRQ_SYNC); | 709 | cc = BITTST(r7, TIF_IRQ_SYNC); |
710 | if !cc jump .Lsyscall_no_irqsync; | 710 | if !cc jump .Lsyscall_no_irqsync; |
711 | /* | ||
712 | * Clear IPEND[4] manually to undo what resume_userspace_1 just did; | ||
713 | * we need this so that high priority domain interrupts may still | ||
714 | * preempt the current domain while the pipeline log is being played | ||
715 | * back. | ||
716 | */ | ||
711 | [--sp] = reti; | 717 | [--sp] = reti; |
712 | r0 = [sp++]; | 718 | SP += 4; /* don't merge with next insn to keep the pattern obvious */ |
713 | SP += -12; | 719 | SP += -12; |
714 | call ___ipipe_sync_root; | 720 | call ___ipipe_sync_root; |
715 | SP += 12; | 721 | SP += 12; |
@@ -721,7 +727,7 @@ ENTRY(_system_call) | |||
721 | 727 | ||
722 | /* Reenable interrupts. */ | 728 | /* Reenable interrupts. */ |
723 | [--sp] = reti; | 729 | [--sp] = reti; |
724 | r0 = [sp++]; | 730 | sp += 4; |
725 | 731 | ||
726 | SP += -12; | 732 | SP += -12; |
727 | call _schedule; | 733 | call _schedule; |
@@ -737,7 +743,7 @@ ENTRY(_system_call) | |||
737 | .Lsyscall_do_signals: | 743 | .Lsyscall_do_signals: |
738 | /* Reenable interrupts. */ | 744 | /* Reenable interrupts. */ |
739 | [--sp] = reti; | 745 | [--sp] = reti; |
740 | r0 = [sp++]; | 746 | sp += 4; |
741 | 747 | ||
742 | r0 = sp; | 748 | r0 = sp; |
743 | SP += -12; | 749 | SP += -12; |
@@ -747,10 +753,6 @@ ENTRY(_system_call) | |||
747 | .Lsyscall_really_exit: | 753 | .Lsyscall_really_exit: |
748 | r5 = [sp + PT_RESERVED]; | 754 | r5 = [sp + PT_RESERVED]; |
749 | rets = r5; | 755 | rets = r5; |
750 | #ifdef CONFIG_IPIPE | ||
751 | [--sp] = reti; | ||
752 | r5 = [sp++]; | ||
753 | #endif /* CONFIG_IPIPE */ | ||
754 | rts; | 756 | rts; |
755 | ENDPROC(_system_call) | 757 | ENDPROC(_system_call) |
756 | 758 | ||
@@ -904,14 +906,9 @@ ENDPROC(_ret_from_exception) | |||
904 | 906 | ||
905 | #ifdef CONFIG_IPIPE | 907 | #ifdef CONFIG_IPIPE |
906 | 908 | ||
907 | _sync_root_irqs: | ||
908 | [--sp] = reti; /* Reenable interrupts */ | ||
909 | r0 = [sp++]; | ||
910 | jump.l ___ipipe_sync_root | ||
911 | |||
912 | _resume_kernel_from_int: | 909 | _resume_kernel_from_int: |
913 | r0.l = _sync_root_irqs | 910 | r0.l = ___ipipe_sync_root; |
914 | r0.h = _sync_root_irqs | 911 | r0.h = ___ipipe_sync_root; |
915 | [--sp] = rets; | 912 | [--sp] = rets; |
916 | [--sp] = ( r7:4, p5:3 ); | 913 | [--sp] = ( r7:4, p5:3 ); |
917 | SP += -12; | 914 | SP += -12; |