Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207122
b: refs/heads/master
c: a80a635
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Nilsson committed Aug 4, 2010
1 parent 645dea1 commit db3277a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4973ae9dac3397499f5576c591d5c5bf51c68c6
refs/heads/master: a80a635f3d60e4aa61f96d22a122071cb061be93
5 changes: 5 additions & 0 deletions trunk/arch/cris/arch-v32/kernel/cacheflush.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.global cris_flush_cache_range
.type cris_flush_cache_range, @function
cris_flush_cache_range:
move.d 1024, $r12
cmp.d $r11, $r12
Expand Down Expand Up @@ -80,8 +81,10 @@ cris_flush_1KB:
addq 32, $r10
ba cris_flush_cache_range
sub.d $r12, $r11
.size cris_flush_cache_range, . - cris_flush_cache_range

.global cris_flush_cache
.type cris_flush_cache, @function
cris_flush_cache:
moveq 0, $r10
cris_flush_line:
Expand All @@ -92,3 +95,5 @@ cris_flush_line:
fidxd [$r10]
ret
nop
.size cris_flush_cache, . - cris_flush_cache

25 changes: 24 additions & 1 deletion trunk/arch/cris/arch-v32/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ _need_resched:

; Called at exit from fork. schedule_tail must be called to drop
; spinlock if CONFIG_PREEMPT.
.type ret_from_fork,@function
ret_from_fork:
jsr schedule_tail
nop
ba ret_from_sys_call
nop
.size ret_from_fork, . - ret_from_fork

.type ret_from_intr,@function
ret_from_intr:
;; Check for resched if preemptive kernel, or if we're going back to
;; user-mode. This test matches the user_regs(regs) macro. Don't simply
Expand All @@ -91,9 +94,10 @@ ret_from_intr:
move.d [$acr], $r0
btstq 16, $r0 ; User-mode flag.
bpl _resume_kernel
.size ret_from_intr, . - ret_from_intr + 2 ; +2 includes the dslot.

; Note that di below is in delay slot.

.type _resume_userspace,@function
_resume_userspace:
di ; So need_resched and sigpending don't change.

Expand All @@ -107,6 +111,7 @@ _resume_userspace:
nop
ba _Rexit
nop
.size _resume_userspace, . - _resume_userspace

;; The system_call is called by a BREAK instruction, which looks pretty
;; much like any other exception.
Expand All @@ -122,6 +127,7 @@ _resume_userspace:
;; non-used instructions. Only the non-common cases cause the outlined code
;; to run..

.type system_call,@function
system_call:
;; Stack-frame similar to the irq heads, which is reversed in
;; ret_from_sys_call.
Expand Down Expand Up @@ -217,7 +223,9 @@ ret_from_sys_call:
and.d _TIF_ALLWORK_MASK, $r1
bne _syscall_exit_work
nop
.size system_call, . - system_call

.type _Rexit,@function
_Rexit:
;; This epilogue MUST match the prologues in multiple_interrupt, irq.h
;; and ptregs.h.
Expand All @@ -234,10 +242,12 @@ _Rexit:
addq 8, $sp ; Skip EXS, EDA.
jump $erp
rfe ; Restore condition code stack in delay-slot.
.size _Rexit, . - _Rexit

;; We get here after doing a syscall if extra work might need to be done
;; perform syscall exit tracing if needed.

.type _syscall_exit_work,@function
_syscall_exit_work:
;; R0 contains current at this point and irq's are disabled.

Expand All @@ -253,14 +263,18 @@ _syscall_exit_work:
move.d $r1, $r9
ba _resume_userspace
nop
.size _syscall_exit_work, . - _syscall_exit_work

.type _work_pending,@function
_work_pending:
addoq +TI_flags, $r0, $acr
move.d [$acr], $r10
btstq TIF_NEED_RESCHED, $r10 ; Need resched?
bpl _work_notifysig ; No, must be signal/notify.
nop
.size _work_pending, . - _work_pending

.type _work_resched,@function
_work_resched:
move.d $r9, $r1 ; Preserve R9.
jsr schedule
Expand All @@ -276,7 +290,9 @@ _work_resched:
btstq TIF_NEED_RESCHED, $r1
bmi _work_resched ; current->work.need_resched.
nop
.size _work_resched, . - _work_resched

.type _work_notifysig,@function
_work_notifysig:
;; Deal with pending signals and notify-resume requests.

Expand All @@ -288,6 +304,7 @@ _work_notifysig:

ba _Rexit
nop
.size _work_notifysig, . - _work_notifysig

;; We get here as a sidetrack when we've entered a syscall with the
;; trace-bit set. We need to call do_syscall_trace and then continue
Expand Down Expand Up @@ -329,6 +346,7 @@ _syscall_trace_entry:
;;
;; Returns old current in R10.

.type resume,@function
resume:
subq 4, $sp
move $srp, [$sp] ; Keep old/new PC on the stack.
Expand Down Expand Up @@ -364,6 +382,7 @@ resume:
move.d [$sp+], $acr
jump $acr ; Restore PC.
nop
.size resume, . - resume

nmi_interrupt:

Expand Down Expand Up @@ -426,6 +445,7 @@ spurious_interrupt:
;; time. Jump to the first set interrupt bit in a priotiry fashion. The
;; hardware will call the unserved interrupts after the handler
;; finishes.
.type multiple_interrupt, @function
multiple_interrupt:
;; This prologue MUST match the one in irq.h and the struct in ptregs.h!
subq 12, $sp ; Skip EXS, EDA.
Expand Down Expand Up @@ -458,6 +478,7 @@ multiple_interrupt:
move.d $sp, $r10
jump ret_from_intr
nop
.size multiple_interrupt, . - multiple_interrupt

do_sigtrap:
;; Sigtraps the process that executed the BREAK instruction. Creates a
Expand Down Expand Up @@ -514,11 +535,13 @@ _ugdb_handle_exception:
move.d [$sp+], $r0 ; Restore R0 in delay slot.

.global kernel_execve
.type kernel_execve,@function
kernel_execve:
move.d __NR_execve, $r9
break 13
ret
nop
.size kernel_execve, . - kernel_execve

.data

Expand Down

0 comments on commit db3277a

Please sign in to comment.