diff options
Diffstat (limited to 'arch/blackfin/kernel/entry.S')
-rw-r--r-- | arch/blackfin/kernel/entry.S | 55 |
1 files changed, 8 insertions, 47 deletions
diff --git a/arch/blackfin/kernel/entry.S b/arch/blackfin/kernel/entry.S index f33792cc1a0d..4071265fc4fe 100644 --- a/arch/blackfin/kernel/entry.S +++ b/arch/blackfin/kernel/entry.S | |||
@@ -46,53 +46,14 @@ ENTRY(_ret_from_fork) | |||
46 | SP += -12; | 46 | SP += -12; |
47 | pseudo_long_call _schedule_tail, p5; | 47 | pseudo_long_call _schedule_tail, p5; |
48 | SP += 12; | 48 | SP += 12; |
49 | r0 = [sp + PT_IPEND]; | 49 | p1 = [sp++]; |
50 | cc = bittst(r0,1); | 50 | r0 = [sp++]; |
51 | if cc jump .Lin_kernel; | 51 | cc = p1 == 0; |
52 | if cc jump .Lfork; | ||
53 | sp += -12; | ||
54 | call (p1); | ||
55 | sp += 12; | ||
56 | .Lfork: | ||
52 | RESTORE_CONTEXT | 57 | RESTORE_CONTEXT |
53 | rti; | 58 | rti; |
54 | .Lin_kernel: | ||
55 | bitclr(r0,1); | ||
56 | [sp + PT_IPEND] = r0; | ||
57 | /* do a 'fake' RTI by jumping to [RETI] | ||
58 | * to avoid clearing supervisor mode in child | ||
59 | */ | ||
60 | r0 = [sp + PT_PC]; | ||
61 | [sp + PT_P0] = r0; | ||
62 | |||
63 | RESTORE_ALL_SYS | ||
64 | jump (p0); | ||
65 | ENDPROC(_ret_from_fork) | 59 | ENDPROC(_ret_from_fork) |
66 | |||
67 | ENTRY(_sys_vfork) | ||
68 | r0 = sp; | ||
69 | r0 += 24; | ||
70 | [--sp] = rets; | ||
71 | SP += -12; | ||
72 | pseudo_long_call _bfin_vfork, p2; | ||
73 | SP += 12; | ||
74 | rets = [sp++]; | ||
75 | rts; | ||
76 | ENDPROC(_sys_vfork) | ||
77 | |||
78 | ENTRY(_sys_clone) | ||
79 | r0 = sp; | ||
80 | r0 += 24; | ||
81 | [--sp] = rets; | ||
82 | SP += -12; | ||
83 | pseudo_long_call _bfin_clone, p2; | ||
84 | SP += 12; | ||
85 | rets = [sp++]; | ||
86 | rts; | ||
87 | ENDPROC(_sys_clone) | ||
88 | |||
89 | ENTRY(_sys_rt_sigreturn) | ||
90 | r0 = sp; | ||
91 | r0 += 24; | ||
92 | [--sp] = rets; | ||
93 | SP += -12; | ||
94 | pseudo_long_call _do_rt_sigreturn, p2; | ||
95 | SP += 12; | ||
96 | rets = [sp++]; | ||
97 | rts; | ||
98 | ENDPROC(_sys_rt_sigreturn) | ||