Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112281
b: refs/heads/master
c: 93ed397
h: refs/heads/master
i:
  112279: 66587f1
v: v3
  • Loading branch information
Catalin Marinas authored and Russell King committed Sep 1, 2008
1 parent 669e3ba commit d7c3ace
Show file tree
Hide file tree
Showing 59 changed files with 202 additions and 51 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: 8d5796d2ec6b5a4e7a52861144e63af438d6f8f7
refs/heads/master: 93ed3970114983543bbebd195bef65db84444ea2
1 change: 1 addition & 0 deletions trunk/arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size
add r1, r1, #1048576
str r1, [r0]
mov pc, lr
ENDPROC(__setup_mmu)

__armv4_mmu_cache_on:
mov r12, lr
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/arm/kernel/debug.S
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@
ENTRY(printhex8)
mov r1, #8
b printhex
ENDPROC(printhex8)

ENTRY(printhex4)
mov r1, #4
b printhex
ENDPROC(printhex4)

ENTRY(printhex2)
mov r1, #2
Expand All @@ -110,6 +112,7 @@ printhex: adr r2, hexbuf
bne 1b
mov r0, r2
b printascii
ENDPROC(printhex2)

.ltorg

Expand All @@ -127,11 +130,13 @@ ENTRY(printascii)
teqne r1, #0
bne 1b
mov pc, lr
ENDPROC(printascii)

ENTRY(printch)
addruart r3
mov r1, r0
mov r0, #0
b 1b
ENDPROC(printch)

hexbuf: .space 16
16 changes: 16 additions & 0 deletions trunk/arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,17 @@
__pabt_invalid:
inv_entry BAD_PREFETCH
b common_invalid
ENDPROC(__pabt_invalid)

__dabt_invalid:
inv_entry BAD_DATA
b common_invalid
ENDPROC(__dabt_invalid)

__irq_invalid:
inv_entry BAD_IRQ
b common_invalid
ENDPROC(__irq_invalid)

__und_invalid:
inv_entry BAD_UNDEFINSTR
Expand All @@ -107,6 +110,7 @@ common_invalid:

mov r0, sp
b bad_mode
ENDPROC(__und_invalid)

/*
* SVC mode handlers
Expand Down Expand Up @@ -192,6 +196,7 @@ __dabt_svc:
ldr r0, [sp, #S_PSR]
msr spsr_cxsf, r0
ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
ENDPROC(__dabt_svc)

.align 5
__irq_svc:
Expand Down Expand Up @@ -223,6 +228,7 @@ __irq_svc:
bleq trace_hardirqs_on
#endif
ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
ENDPROC(__irq_svc)

.ltorg

Expand Down Expand Up @@ -272,6 +278,7 @@ __und_svc:
ldr lr, [sp, #S_PSR] @ Get SVC cpsr
msr spsr_cxsf, lr
ldmia sp, {r0 - pc}^ @ Restore SVC registers
ENDPROC(__und_svc)

.align 5
__pabt_svc:
Expand Down Expand Up @@ -313,6 +320,7 @@ __pabt_svc:
ldr r0, [sp, #S_PSR]
msr spsr_cxsf, r0
ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
ENDPROC(__pabt_svc)

.align 5
.LCcralign:
Expand Down Expand Up @@ -412,6 +420,7 @@ __dabt_usr:
mov r2, sp
adr lr, ret_from_exception
b do_DataAbort
ENDPROC(__dabt_usr)

.align 5
__irq_usr:
Expand Down Expand Up @@ -441,6 +450,7 @@ __irq_usr:

mov why, #0
b ret_to_user
ENDPROC(__irq_usr)

.ltorg

Expand Down Expand Up @@ -474,6 +484,7 @@ __und_usr:
#else
b __und_usr_unknown
#endif
ENDPROC(__und_usr)

@
@ fallthrough to call_fpe
Expand Down Expand Up @@ -642,6 +653,7 @@ __und_usr_unknown:
mov r0, sp
adr lr, ret_from_exception
b do_undefinstr
ENDPROC(__und_usr_unknown)

.align 5
__pabt_usr:
Expand All @@ -666,6 +678,8 @@ ENTRY(ret_from_exception)
get_thread_info tsk
mov why, #0
b ret_to_user
ENDPROC(__pabt_usr)
ENDPROC(ret_from_exception)

/*
* Register switch for ARMv3 and ARMv4 processors
Expand Down Expand Up @@ -702,6 +716,7 @@ ENTRY(__switch_to)
bl atomic_notifier_call_chain
mov r0, r5
ldmia r4, {r4 - sl, fp, sp, pc} @ Load all regs saved previously
ENDPROC(__switch_to)

__INIT

Expand Down Expand Up @@ -1029,6 +1044,7 @@ vector_\name:
mov r0, sp
ldr lr, [pc, lr, lsl #2]
movs pc, lr @ branch to handler in SVC mode
ENDPROC(vector_\name)
.endm

.globl __stubs_start
Expand Down
25 changes: 23 additions & 2 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ no_work_pending:
mov r0, r0
add sp, sp, #S_FRAME_SIZE - S_PC
movs pc, lr @ return & move spsr_svc into cpsr
ENDPROC(ret_to_user)

/*
* This is how we return from a fork.
Expand All @@ -92,7 +93,7 @@ ENTRY(ret_from_fork)
mov r0, #1 @ trace exit [IP = 1]
bl syscall_trace
b ret_slow_syscall
ENDPROC(ret_from_fork)

.equ NR_syscalls,0
#define CALL(x) .equ NR_syscalls,NR_syscalls+1
Expand Down Expand Up @@ -269,6 +270,7 @@ ENTRY(vector_swi)
eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back
bcs arm_syscall
b sys_ni_syscall @ not private func
ENDPROC(vector_swi)

/*
* This is the really slow path. We're going to be doing
Expand Down Expand Up @@ -326,7 +328,6 @@ ENTRY(sys_call_table)
*/
@ r0 = syscall number
@ r8 = syscall table
.type sys_syscall, #function
sys_syscall:
bic scno, r0, #__NR_OABI_SYSCALL_BASE
cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
Expand All @@ -338,53 +339,65 @@ sys_syscall:
movlo r3, r4
ldrlo pc, [tbl, scno, lsl #2]
b sys_ni_syscall
ENDPROC(sys_syscall)

sys_fork_wrapper:
add r0, sp, #S_OFF
b sys_fork
ENDPROC(sys_fork_wrapper)

sys_vfork_wrapper:
add r0, sp, #S_OFF
b sys_vfork
ENDPROC(sys_vfork_wrapper)

sys_execve_wrapper:
add r3, sp, #S_OFF
b sys_execve
ENDPROC(sys_execve_wrapper)

sys_clone_wrapper:
add ip, sp, #S_OFF
str ip, [sp, #4]
b sys_clone
ENDPROC(sys_clone_wrapper)

sys_sigsuspend_wrapper:
add r3, sp, #S_OFF
b sys_sigsuspend
ENDPROC(sys_sigsuspend_wrapper)

sys_rt_sigsuspend_wrapper:
add r2, sp, #S_OFF
b sys_rt_sigsuspend
ENDPROC(sys_rt_sigsuspend_wrapper)

sys_sigreturn_wrapper:
add r0, sp, #S_OFF
b sys_sigreturn
ENDPROC(sys_sigreturn_wrapper)

sys_rt_sigreturn_wrapper:
add r0, sp, #S_OFF
b sys_rt_sigreturn
ENDPROC(sys_rt_sigreturn_wrapper)

sys_sigaltstack_wrapper:
ldr r2, [sp, #S_OFF + S_SP]
b do_sigaltstack
ENDPROC(sys_sigaltstack_wrapper)

sys_statfs64_wrapper:
teq r1, #88
moveq r1, #84
b sys_statfs64
ENDPROC(sys_statfs64_wrapper)

sys_fstatfs64_wrapper:
teq r1, #88
moveq r1, #84
b sys_fstatfs64
ENDPROC(sys_fstatfs64_wrapper)

/*
* Note: off_4k (r5) is always units of 4K. If we can't do the requested
Expand All @@ -402,11 +415,14 @@ sys_mmap2:
str r5, [sp, #4]
b do_mmap2
#endif
ENDPROC(sys_mmap2)

ENTRY(pabort_ifar)
mrc p15, 0, r0, cr6, cr0, 2
ENTRY(pabort_noifar)
mov pc, lr
ENDPROC(pabort_ifar)
ENDPROC(pabort_noifar)

#ifdef CONFIG_OABI_COMPAT

Expand All @@ -417,26 +433,31 @@ ENTRY(pabort_noifar)
sys_oabi_pread64:
stmia sp, {r3, r4}
b sys_pread64
ENDPROC(sys_oabi_pread64)

sys_oabi_pwrite64:
stmia sp, {r3, r4}
b sys_pwrite64
ENDPROC(sys_oabi_pwrite64)

sys_oabi_truncate64:
mov r3, r2
mov r2, r1
b sys_truncate64
ENDPROC(sys_oabi_truncate64)

sys_oabi_ftruncate64:
mov r3, r2
mov r2, r1
b sys_ftruncate64
ENDPROC(sys_oabi_ftruncate64)

sys_oabi_readahead:
str r3, [sp]
mov r3, r2
mov r2, r1
b sys_readahead
ENDPROC(sys_oabi_readahead)

/*
* Let's declare a second syscall table for old ABI binaries
Expand Down
Loading

0 comments on commit d7c3ace

Please sign in to comment.