aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v32/kernel/entry.S')
-rw-r--r--arch/cris/arch-v32/kernel/entry.S42
1 files changed, 8 insertions, 34 deletions
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S
index 2f19ac6217aa..026a0b21b8f0 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -99,6 +99,8 @@ ret_from_kernel_thread:
99 99
100 .type ret_from_intr,@function 100 .type ret_from_intr,@function
101ret_from_intr: 101ret_from_intr:
102 moveq 0, $r9 ; not a syscall
103
102 ;; Check for resched if preemptive kernel, or if we're going back to 104 ;; Check for resched if preemptive kernel, or if we're going back to
103 ;; user-mode. This test matches the user_regs(regs) macro. Don't simply 105 ;; user-mode. This test matches the user_regs(regs) macro. Don't simply
104 ;; test CCS since that doesn't necessarily reflect what mode we'll 106 ;; test CCS since that doesn't necessarily reflect what mode we'll
@@ -145,7 +147,7 @@ system_call:
145 ;; Stack-frame similar to the irq heads, which is reversed in 147 ;; Stack-frame similar to the irq heads, which is reversed in
146 ;; ret_from_sys_call. 148 ;; ret_from_sys_call.
147 149
148 sub.d 92, $sp ; Skip EXS and EDA. 150 sub.d 92, $sp ; Skip EDA.
149 movem $r13, [$sp] 151 movem $r13, [$sp]
150 move.d $sp, $r8 152 move.d $sp, $r8
151 addq 14*4, $r8 153 addq 14*4, $r8
@@ -156,8 +158,9 @@ system_call:
156 move $ccs, $r4 158 move $ccs, $r4
157 move $srp, $r5 159 move $srp, $r5
158 move $erp, $r6 160 move $erp, $r6
161 move.d $r9, $r7 ; Store syscall number in EXS
159 subq 4, $sp 162 subq 4, $sp
160 movem $r6, [$r8] 163 movem $r7, [$r8]
161 ei ; Enable interrupts while processing syscalls. 164 ei ; Enable interrupts while processing syscalls.
162 move.d $r10, [$sp] 165 move.d $r10, [$sp]
163 166
@@ -278,43 +281,14 @@ _syscall_exit_work:
278 .type _work_pending,@function 281 .type _work_pending,@function
279_work_pending: 282_work_pending:
280 addoq +TI_flags, $r0, $acr 283 addoq +TI_flags, $r0, $acr
281 move.d [$acr], $r10
282 btstq TIF_NEED_RESCHED, $r10 ; Need resched?
283 bpl _work_notifysig ; No, must be signal/notify.
284 nop
285 .size _work_pending, . - _work_pending
286
287 .type _work_resched,@function
288_work_resched:
289 move.d $r9, $r1 ; Preserve R9.
290 jsr schedule
291 nop
292 move.d $r1, $r9
293 di
294
295 addoq +TI_flags, $r0, $acr
296 move.d [$acr], $r1
297 and.d _TIF_WORK_MASK, $r1 ; Ignore sycall trace counter.
298 beq _Rexit
299 nop
300 btstq TIF_NEED_RESCHED, $r1
301 bmi _work_resched ; current->work.need_resched.
302 nop
303 .size _work_resched, . - _work_resched
304
305 .type _work_notifysig,@function
306_work_notifysig:
307 ;; Deal with pending signals and notify-resume requests.
308
309 addoq +TI_flags, $r0, $acr
310 move.d [$acr], $r12 ; The thread_info_flags parameter. 284 move.d [$acr], $r12 ; The thread_info_flags parameter.
311 move.d $sp, $r11 ; The regs param. 285 move.d $sp, $r11 ; The regs param.
312 jsr do_notify_resume 286 jsr do_work_pending
313 move.d $r9, $r10 ; do_notify_resume syscall/irq param. 287 move.d $r9, $r10 ; The syscall/irq param.
314 288
315 ba _Rexit 289 ba _Rexit
316 nop 290 nop
317 .size _work_notifysig, . - _work_notifysig 291 .size _work_pending, . - _work_pending
318 292
319 ;; We get here as a sidetrack when we've entered a syscall with the 293 ;; We get here as a sidetrack when we've entered a syscall with the
320 ;; trace-bit set. We need to call do_syscall_trace and then continue 294 ;; trace-bit set. We need to call do_syscall_trace and then continue