[PATCH 19/47] Update CRISv32 entry.S to working order.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>, Mikael Starvik <mikael.starvik@...>, Jesper Nilsson <jesper.nilsson@...>, <linux-kernel@...>
Date: Friday, November 30, 2007 - 10:44 am

- Remove oldset parameter.
- Utilise delay-slot for parameter moving.
- Add kernel_execve as break 13.
- Add new kernel syscalls.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
---
 arch/cris/arch-v32/kernel/entry.S |   82 +++++++++++++++++++++++++++++--------
 1 files changed, 64 insertions(+), 18 deletions(-)

diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S
index f9d2780..596184c 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -10,7 +10,7 @@
  * after a timer-interrupt and after each system call.
  *
  * Stack layout in 'ret_from_system_call':
- * 	ptrace needs to have all regs on the stack.
+ *	ptrace needs to have all regs on the stack.
  *	if the order here is changed, it needs to be
  *	updated in fork.c:copy_process, signal.c:do_signal,
  *	ptrace.c and ptrace.h
@@ -281,12 +281,10 @@ _work_notifysig:
 	;; Deal with pending signals and notify-resume requests.
 
 	addoq	+TI_flags, $r0, $acr
-	move.d	[$acr], $r13		; The thread_info_flags parameter.
-	move.d	$r9, $r10		; do_notify_resume syscall/irq param.
-	moveq	0, $r11			; oldset param - 0 in this case.
-	move.d	$sp, $r12		; The regs param.
+	move.d	[$acr], $r12		; The thread_info_flags parameter.
+	move.d	$sp, $r11		; The regs param.
 	jsr	do_notify_resume
-	nop
+	move.d	$r9, $r10		; do_notify_resume syscall/irq param.
 
 	ba _Rexit
 	nop
@@ -396,7 +394,7 @@ nmi_interrupt:
 	btstq	REG_BIT(intr_vect, r_nmi, watchdog), $r0
 	bpl     1f
 	nop
-	jsr 	handle_watchdog_bite	; In time.c.
+	jsr	handle_watchdog_bite	; In time.c.
         move.d	$sp, $r10		; Pointer to registers
 1:	btstq	REG_BIT(intr_vect, r_nmi, ext), $r0
 	bpl     1f
@@ -515,6 +513,13 @@ _ugdb_handle_exception:
 	ba	do_sigtrap		; SIGTRAP the offending process.
 	move.d	[$sp+], $r0		; Restore R0 in delay slot.
 
+	.global kernel_execve
+kernel_execve:
+	move.d __NR_execve, $r9
+	break 13
+	ret
+	nop
+
 	.data
 
 	.section .rodata,"a"
@@ -778,21 +783,21 @@ sys_call_table:
 	.long sys_epoll_ctl	/* 255 */
 	.long sys_epoll_wait
 	.long sys_remap_file_pages
- 	.long sys_set_tid_address
- 	.long sys_timer_create
- 	.long sys_timer_settime		/* 260 */
- 	.long sys_timer_gettime
- 	.long sys_timer_getoverrun
- 	.long sys_timer_delete
- 	.long sys_clock_settime
- 	.long sys_clock_gettime		/* 265 */
- 	.long sys_clock_getres
- 	.long sys_clock_nanosleep
+	.long sys_set_tid_address
+	.long sys_timer_create
+	.long sys_timer_settime		/* 260 */
+	.long sys_timer_gettime
+	.long sys_timer_getoverrun
+	.long sys_timer_delete
+	.long sys_clock_settime
+	.long sys_clock_gettime		/* 265 */
+	.long sys_clock_getres
+	.long sys_clock_nanosleep
 	.long sys_statfs64
 	.long sys_fstatfs64
 	.long sys_tgkill	/* 270 */
 	.long sys_utimes
- 	.long sys_fadvise64_64
+	.long sys_fadvise64_64
 	.long sys_ni_syscall	/* sys_vserver */
 	.long sys_ni_syscall	/* sys_mbind */
 	.long sys_ni_syscall	/* 275 sys_get_mempolicy */
@@ -805,6 +810,47 @@ sys_call_table:
 	.long sys_mq_getsetattr
 	.long sys_ni_syscall		/* reserved for kexec */
 	.long sys_waitid
+	.long sys_ni_syscall		/* 285 */ /* available */
+	.long sys_add_key
+	.long sys_request_key
+	.long sys_keyctl
+	.long sys_ioprio_set
+	.long sys_ioprio_get		/* 290 */
+	.long sys_inotify_init
+	.long sys_inotify_add_watch
+	.long sys_inotify_rm_watch
+	.long sys_migrate_pages
+	.long sys_openat		/* 295 */
+	.long sys_mkdirat
+	.long sys_mknodat
+	.long sys_fchownat
+	.long sys_futimesat
+	.long sys_fstatat64		/* 300 */
+	.long sys_unlinkat
+	.long sys_renameat
+	.long sys_linkat
+	.long sys_symlinkat
+	.long sys_readlinkat		/* 305 */
+	.long sys_fchmodat
+	.long sys_faccessat
+	.long sys_pselect6
+	.long sys_ppoll
+	.long sys_unshare		/* 310 */
+	.long sys_set_robust_list
+	.long sys_set_robust_list
+	.long sys_get_robust_list
+	.long sys_splice
+	.long sys_sync_file_range
+	.long sys_tee			/* 315 */
+	.long sys_vmsplice
+	.long sys_move_pages
+	.long sys_getcpu
+	.long sys_epoll_pwait
+	.long sys_utimensat		/* 320 */
+	.long sys_signalfd
+	.long sys_timerfd
+	.long sys_eventfd
+	.long sys_fallocate
 
         /*
          * NOTE!! This doesn't have to be exact - we just have
-- 
1.5.3.6.970.gd25430

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Remove rcu_assign_pointer() penalty for NULL pointers, Paul E. McKenney, (Fri Nov 30, 8:37 pm)
[PATCH 00/47] CRIS patches for CRISv32 EtraxFS and ARTPEC-3, Jesper Nilsson, (Thu Nov 29, 12:02 pm)
[PATCH 45/47] New default config for CRISv10., Jesper Nilsson, (Mon Dec 3, 6:37 am)
[PATCH 44/47] Minor fixes for CRISv32 io.h, Jesper Nilsson, (Mon Dec 3, 6:16 am)
Re: [PATCH 44/47] Minor fixes for CRISv32 io.h, Andrew Morton, (Wed Dec 12, 7:29 am)
Re: [PATCH 44/47] Minor fixes for CRISv32 io.h, Jesper Nilsson, (Wed Dec 12, 1:04 pm)
[PATCH 46/47] Update and improve CRISv32 kernel/time.c, Jesper Nilsson, (Tue Dec 4, 12:25 pm)
[PATCH 43/47] Update and improve CRISv32 kernel/traps.c, Jesper Nilsson, (Mon Dec 3, 6:12 am)
[PATCH 41/47] Update and simplify CRISv32 kernel/irq.c., Jesper Nilsson, (Fri Nov 30, 1:09 pm)
[PATCH 42/47] Minor updates to CRISv32 kernel/process.c, Jesper Nilsson, (Mon Dec 3, 5:54 am)
[PATCH 40/47] Update CRISv32 kernel/head.S, Jesper Nilsson, (Fri Nov 30, 12:54 pm)
[PATCH 35/47] Update CRISv32 boot/compressed/misc.c, Jesper Nilsson, (Fri Nov 30, 12:16 pm)
[PATCH 38/47] Include path fix for CRISv32 timex.h, Jesper Nilsson, (Fri Nov 30, 12:28 pm)
[PATCH 34/47] Update CRISv32 compressed head.S, Jesper Nilsson, (Fri Nov 30, 11:40 am)
[PATCH 32/47] Update CRISv32 boot rescue Kbuild makefile., Jesper Nilsson, (Fri Nov 30, 11:28 am)
[PATCH 39/47] Update and improve CRISv32 fasttimer.c, Jesper Nilsson, (Fri Nov 30, 12:46 pm)
Re: [PATCH 39/47] Update and improve CRISv32 fasttimer.c, Andrew Morton, (Wed Dec 12, 7:23 am)
[PATCH 37/47] Update CRISv32 debugport., Jesper Nilsson, (Fri Nov 30, 12:26 pm)
[PATCH 30/47] Update CRISv32 boot Kbuild makefile., Jesper Nilsson, (Fri Nov 30, 11:24 am)
[PATCH 36/47] Update CRISv32 boot/rescue/head.S code., Jesper Nilsson, (Fri Nov 30, 12:20 pm)
[PATCH 28/47] Update and improve CRISv10 axisflashmap.c, Jesper Nilsson, (Fri Nov 30, 11:17 am)
[PATCH 29/47] Update CRISv32 traps.c, Jesper Nilsson, (Fri Nov 30, 11:22 am)
Re: [PATCH 29/47] Update CRISv32 traps.c, Andrew Morton, (Wed Dec 12, 7:21 am)
[PATCH 27/47] Update CRISv10 rescue head.s, Jesper Nilsson, (Fri Nov 30, 11:13 am)
Re: [PATCH 27/47] Update CRISv10 rescue head.s, David Miller, (Thu Dec 6, 9:58 am)
Re: [PATCH 27/47] Update CRISv10 rescue head.s, Jesper Nilsson, (Thu Dec 6, 8:46 pm)
[PATCH 26/47] Update CRISv10 rescue Kbuild makefile., Jesper Nilsson, (Fri Nov 30, 11:11 am)
[PATCH 24/47] Update CRISv10 boot Kbuild makefile., Jesper Nilsson, (Fri Nov 30, 11:08 am)
[PATCH 22/47] Update and improve axisflashmap for CRISv32., Jesper Nilsson, (Fri Nov 30, 11:01 am)
[PATCH 23/47] Update CRIS main Kbuild makefile., Jesper Nilsson, (Fri Nov 30, 11:07 am)
[PATCH 21/47] New version of CRISv32 I2C driver., Jesper Nilsson, (Fri Nov 30, 10:54 am)
Re: [PATCH 21/47] New version of CRISv32 I2C driver., Andrew Morton, (Wed Dec 12, 7:19 am)
[PATCH 19/47] Update CRISv32 entry.S to working order., Jesper Nilsson, (Fri Nov 30, 10:44 am)
[PATCH 20/47] Fixup CRISv32 kernel Makefile., Jesper Nilsson, (Fri Nov 30, 10:47 am)
[PATCH 16/47] Minor CRIS generic kernel/traps.c changes., Jesper Nilsson, (Fri Nov 30, 9:11 am)
[PATCH 15/47] Minor fixes to mm/fault.c for CRIS., Jesper Nilsson, (Fri Nov 30, 8:59 am)
Re: [PATCH 15/47] Minor fixes to mm/fault.c for CRIS., Andrew Morton, (Wed Dec 12, 7:17 am)
Re: [PATCH 15/47] Minor fixes to mm/fault.c for CRIS., Jesper Nilsson, (Wed Dec 12, 9:36 am)
[PATCH 13/47] Add prototypes for cache flushing on CRISv32, Jesper Nilsson, (Fri Nov 30, 5:11 am)
[PATCH 06/47] Add serial driver for CRISv32., Jesper Nilsson, (Thu Nov 29, 12:23 pm)
Re: [PATCH 06/47] Add serial driver for CRISv32., Andrew Morton, (Wed Dec 12, 7:14 am)
[PATCH 09/47] Update CRISv32 synchronous serial driver., Jesper Nilsson, (Thu Nov 29, 12:30 pm)
[PATCH 11/47] Minor fixes to CRISv32 irq defines., Jesper Nilsson, (Thu Nov 29, 1:11 pm)
[PATCH 07/47] Add L2 cache initialization code., Jesper Nilsson, (Thu Nov 29, 12:24 pm)
[PATCH 03/47] Add new driver files for Etrax-FS, Jesper Nilsson, (Thu Nov 29, 12:05 pm)
[PATCH 02/47] Add new driver files for Artpec-3., Jesper Nilsson, (Thu Nov 29, 12:03 pm)
Re: [PATCH 02/47] Add new driver files for Artpec-3., Andrew Morton, (Wed Dec 12, 7:09 am)