All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-04 18:37 ` Geert Uytterhoeven
  0 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-04 18:37 UTC (permalink / raw)
  To: Linux/m68k, Greg Ungerer
  Cc: Arnd Bergmann, Linux Kernel Development, uClinux list

Impact for nommu:
  - Store table in .rodata instead of .text,
  - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
  - Implement sys_mremap and sys_nfsservct,
  - Remove unused padding at the end of the table.

Impact for mmu:
  - Store table in .rodata instead of .data.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2: Store table in .rodata instead of .data.
v3: Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
    Implement sys_mremap and sys_nfsservct.

Greg, if it's OK for you, I'll add this to my for-2.6.40 branch.

 arch/m68k/kernel/Makefile_mm    |    2 +-
 arch/m68k/kernel/entry_mm.S     |  348 ---------------------------------------
 arch/m68k/kernel/syscalltable.S |  191 +++++++++++-----------
 3 files changed, 96 insertions(+), 445 deletions(-)

diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
index 55d5d6b..aced678 100644
--- a/arch/m68k/kernel/Makefile_mm
+++ b/arch/m68k/kernel/Makefile_mm
@@ -10,7 +10,7 @@ endif
 extra-y	+= vmlinux.lds
 
 obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
-	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
+	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o
 
 devres-y = ../../../kernel/irq/devres.o
 
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
index 1359ee6..bd0ec05 100644
--- a/arch/m68k/kernel/entry_mm.S
+++ b/arch/m68k/kernel/entry_mm.S
@@ -407,351 +407,3 @@ resume:
 
 	rts
 
-.data
-ALIGN
-sys_call_table:
-	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
-	.long sys_exit
-	.long sys_fork
-	.long sys_read
-	.long sys_write
-	.long sys_open		/* 5 */
-	.long sys_close
-	.long sys_waitpid
-	.long sys_creat
-	.long sys_link
-	.long sys_unlink	/* 10 */
-	.long sys_execve
-	.long sys_chdir
-	.long sys_time
-	.long sys_mknod
-	.long sys_chmod		/* 15 */
-	.long sys_chown16
-	.long sys_ni_syscall				/* old break syscall holder */
-	.long sys_stat
-	.long sys_lseek
-	.long sys_getpid	/* 20 */
-	.long sys_mount
-	.long sys_oldumount
-	.long sys_setuid16
-	.long sys_getuid16
-	.long sys_stime		/* 25 */
-	.long sys_ptrace
-	.long sys_alarm
-	.long sys_fstat
-	.long sys_pause
-	.long sys_utime		/* 30 */
-	.long sys_ni_syscall				/* old stty syscall holder */
-	.long sys_ni_syscall				/* old gtty syscall holder */
-	.long sys_access
-	.long sys_nice
-	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */
-	.long sys_sync
-	.long sys_kill
-	.long sys_rename
-	.long sys_mkdir
-	.long sys_rmdir		/* 40 */
-	.long sys_dup
-	.long sys_pipe
-	.long sys_times
-	.long sys_ni_syscall				/* old prof syscall holder */
-	.long sys_brk		/* 45 */
-	.long sys_setgid16
-	.long sys_getgid16
-	.long sys_signal
-	.long sys_geteuid16
-	.long sys_getegid16	/* 50 */
-	.long sys_acct
-	.long sys_umount				/* recycled never used phys() */
-	.long sys_ni_syscall				/* old lock syscall holder */
-	.long sys_ioctl
-	.long sys_fcntl		/* 55 */
-	.long sys_ni_syscall				/* old mpx syscall holder */
-	.long sys_setpgid
-	.long sys_ni_syscall				/* old ulimit syscall holder */
-	.long sys_ni_syscall
-	.long sys_umask		/* 60 */
-	.long sys_chroot
-	.long sys_ustat
-	.long sys_dup2
-	.long sys_getppid
-	.long sys_getpgrp	/* 65 */
-	.long sys_setsid
-	.long sys_sigaction
-	.long sys_sgetmask
-	.long sys_ssetmask
-	.long sys_setreuid16	/* 70 */
-	.long sys_setregid16
-	.long sys_sigsuspend
-	.long sys_sigpending
-	.long sys_sethostname
-	.long sys_setrlimit	/* 75 */
-	.long sys_old_getrlimit
-	.long sys_getrusage
-	.long sys_gettimeofday
-	.long sys_settimeofday
-	.long sys_getgroups16	/* 80 */
-	.long sys_setgroups16
-	.long sys_old_select
-	.long sys_symlink
-	.long sys_lstat
-	.long sys_readlink	/* 85 */
-	.long sys_uselib
-	.long sys_swapon
-	.long sys_reboot
-	.long sys_old_readdir
-	.long sys_old_mmap	/* 90 */
-	.long sys_munmap
-	.long sys_truncate
-	.long sys_ftruncate
-	.long sys_fchmod
-	.long sys_fchown16	/* 95 */
-	.long sys_getpriority
-	.long sys_setpriority
-	.long sys_ni_syscall				/* old profil syscall holder */
-	.long sys_statfs
-	.long sys_fstatfs	/* 100 */
-	.long sys_ni_syscall				/* ioperm for i386 */
-	.long sys_socketcall
-	.long sys_syslog
-	.long sys_setitimer
-	.long sys_getitimer	/* 105 */
-	.long sys_newstat
-	.long sys_newlstat
-	.long sys_newfstat
-	.long sys_ni_syscall
-	.long sys_ni_syscall	/* 110 */	/* iopl for i386 */
-	.long sys_vhangup
-	.long sys_ni_syscall				/* obsolete idle() syscall */
-	.long sys_ni_syscall				/* vm86old for i386 */
-	.long sys_wait4
-	.long sys_swapoff	/* 115 */
-	.long sys_sysinfo
-	.long sys_ipc
-	.long sys_fsync
-	.long sys_sigreturn
-	.long sys_clone		/* 120 */
-	.long sys_setdomainname
-	.long sys_newuname
-	.long sys_cacheflush				/* modify_ldt for i386 */
-	.long sys_adjtimex
-	.long sys_mprotect	/* 125 */
-	.long sys_sigprocmask
-	.long sys_ni_syscall		/* old "create_module" */
-	.long sys_init_module
-	.long sys_delete_module
-	.long sys_ni_syscall	/* 130 - old "get_kernel_syms" */
-	.long sys_quotactl
-	.long sys_getpgid
-	.long sys_fchdir
-	.long sys_bdflush
-	.long sys_sysfs		/* 135 */
-	.long sys_personality
-	.long sys_ni_syscall				/* for afs_syscall */
-	.long sys_setfsuid16
-	.long sys_setfsgid16
-	.long sys_llseek	/* 140 */
-	.long sys_getdents
-	.long sys_select
-	.long sys_flock
-	.long sys_msync
-	.long sys_readv		/* 145 */
-	.long sys_writev
-	.long sys_getsid
-	.long sys_fdatasync
-	.long sys_sysctl
-	.long sys_mlock		/* 150 */
-	.long sys_munlock
-	.long sys_mlockall
-	.long sys_munlockall
-	.long sys_sched_setparam
-	.long sys_sched_getparam	/* 155 */
-	.long sys_sched_setscheduler
-	.long sys_sched_getscheduler
-	.long sys_sched_yield
-	.long sys_sched_get_priority_max
-	.long sys_sched_get_priority_min  /* 160 */
-	.long sys_sched_rr_get_interval
-	.long sys_nanosleep
-	.long sys_mremap
-	.long sys_setresuid16
-	.long sys_getresuid16	/* 165 */
-	.long sys_getpagesize
-	.long sys_ni_syscall		/* old sys_query_module */
-	.long sys_poll
-	.long sys_nfsservctl
-	.long sys_setresgid16	/* 170 */
-	.long sys_getresgid16
-	.long sys_prctl
-	.long sys_rt_sigreturn
-	.long sys_rt_sigaction
-	.long sys_rt_sigprocmask	/* 175 */
-	.long sys_rt_sigpending
-	.long sys_rt_sigtimedwait
-	.long sys_rt_sigqueueinfo
-	.long sys_rt_sigsuspend
-	.long sys_pread64	/* 180 */
-	.long sys_pwrite64
-	.long sys_lchown16;
-	.long sys_getcwd
-	.long sys_capget
-	.long sys_capset	/* 185 */
-	.long sys_sigaltstack
-	.long sys_sendfile
-	.long sys_ni_syscall				/* streams1 */
-	.long sys_ni_syscall				/* streams2 */
-	.long sys_vfork		/* 190 */
-	.long sys_getrlimit
-	.long sys_mmap2
-	.long sys_truncate64
-	.long sys_ftruncate64
-	.long sys_stat64	/* 195 */
-	.long sys_lstat64
-	.long sys_fstat64
-	.long sys_chown
-	.long sys_getuid
-	.long sys_getgid	/* 200 */
-	.long sys_geteuid
-	.long sys_getegid
-	.long sys_setreuid
-	.long sys_setregid
-	.long sys_getgroups	/* 205 */
-	.long sys_setgroups
-	.long sys_fchown
-	.long sys_setresuid
-	.long sys_getresuid
-	.long sys_setresgid	/* 210 */
-	.long sys_getresgid
-	.long sys_lchown
-	.long sys_setuid
-	.long sys_setgid
-	.long sys_setfsuid	/* 215 */
-	.long sys_setfsgid
-	.long sys_pivot_root
-	.long sys_ni_syscall
-	.long sys_ni_syscall
-	.long sys_getdents64	/* 220 */
-	.long sys_gettid
-	.long sys_tkill
-	.long sys_setxattr
-	.long sys_lsetxattr
-	.long sys_fsetxattr	/* 225 */
-	.long sys_getxattr
-	.long sys_lgetxattr
-	.long sys_fgetxattr
-	.long sys_listxattr
-	.long sys_llistxattr	/* 230 */
-	.long sys_flistxattr
-	.long sys_removexattr
-	.long sys_lremovexattr
-	.long sys_fremovexattr
-	.long sys_futex		/* 235 */
-	.long sys_sendfile64
-	.long sys_mincore
-	.long sys_madvise
-	.long sys_fcntl64
-	.long sys_readahead	/* 240 */
-	.long sys_io_setup
-	.long sys_io_destroy
-	.long sys_io_getevents
-	.long sys_io_submit
-	.long sys_io_cancel	/* 245 */
-	.long sys_fadvise64
-	.long sys_exit_group
-	.long sys_lookup_dcookie
-	.long sys_epoll_create
-	.long sys_epoll_ctl	/* 250 */
-	.long sys_epoll_wait
-	.long sys_remap_file_pages
-	.long sys_set_tid_address
-	.long sys_timer_create
-	.long sys_timer_settime	/* 255 */
-	.long sys_timer_gettime
-	.long sys_timer_getoverrun
-	.long sys_timer_delete
-	.long sys_clock_settime
-	.long sys_clock_gettime	/* 260 */
-	.long sys_clock_getres
-	.long sys_clock_nanosleep
-	.long sys_statfs64
-	.long sys_fstatfs64
-	.long sys_tgkill	/* 265 */
-	.long sys_utimes
-	.long sys_fadvise64_64
-	.long sys_mbind
-	.long sys_get_mempolicy
-	.long sys_set_mempolicy	/* 270 */
-	.long sys_mq_open
-	.long sys_mq_unlink
-	.long sys_mq_timedsend
-	.long sys_mq_timedreceive
-	.long sys_mq_notify	/* 275 */
-	.long sys_mq_getsetattr
-	.long sys_waitid
-	.long sys_ni_syscall	/* for sys_vserver */
-	.long sys_add_key
-	.long sys_request_key	/* 280 */
-	.long sys_keyctl
-	.long sys_ioprio_set
-	.long sys_ioprio_get
-	.long sys_inotify_init
-	.long sys_inotify_add_watch	/* 285 */
-	.long sys_inotify_rm_watch
-	.long sys_migrate_pages
-	.long sys_openat
-	.long sys_mkdirat
-	.long sys_mknodat		/* 290 */
-	.long sys_fchownat
-	.long sys_futimesat
-	.long sys_fstatat64
-	.long sys_unlinkat
-	.long sys_renameat		/* 295 */
-	.long sys_linkat
-	.long sys_symlinkat
-	.long sys_readlinkat
-	.long sys_fchmodat
-	.long sys_faccessat		/* 300 */
-	.long sys_ni_syscall		/* Reserved for pselect6 */
-	.long sys_ni_syscall		/* Reserved for ppoll */
-	.long sys_unshare
-	.long sys_set_robust_list
-	.long sys_get_robust_list	/* 305 */
-	.long sys_splice
-	.long sys_sync_file_range
-	.long sys_tee
-	.long sys_vmsplice
-	.long sys_move_pages		/* 310 */
-	.long sys_sched_setaffinity
-	.long sys_sched_getaffinity
-	.long sys_kexec_load
-	.long sys_getcpu
-	.long sys_epoll_pwait		/* 315 */
-	.long sys_utimensat
-	.long sys_signalfd
-	.long sys_timerfd_create
-	.long sys_eventfd
-	.long sys_fallocate		/* 320 */
-	.long sys_timerfd_settime
-	.long sys_timerfd_gettime
-	.long sys_signalfd4
-	.long sys_eventfd2
-	.long sys_epoll_create1		/* 325 */
-	.long sys_dup3
-	.long sys_pipe2
-	.long sys_inotify_init1
-	.long sys_preadv
-	.long sys_pwritev		/* 330 */
-	.long sys_rt_tgsigqueueinfo
-	.long sys_perf_event_open
-	.long sys_get_thread_area
-	.long sys_set_thread_area
-	.long sys_atomic_cmpxchg_32	/* 335 */
-	.long sys_atomic_barrier
-	.long sys_fanotify_init
-	.long sys_fanotify_mark
-	.long sys_prlimit64
-	.long sys_name_to_handle_at	/* 340 */
-	.long sys_open_by_handle_at
-	.long sys_clock_adjtime
-	.long sys_syncfs
-
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index 9b8393d..0284192 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/m68knommu/kernel/syscalltable.S
- *
  *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
  *
  *  Based on older entry.S files, the following copyrights apply:
@@ -9,171 +7,176 @@
  *                      Kenneth Albanowski <kjahds@kjahds.com>,
  *  Copyright (C) 2000  Lineo Inc. (www.lineo.com) 
  *  Copyright (C) 1991, 1992  Linus Torvalds
+ *
+ *  Linux/m68k support by Hamish Macdonald
  */
 
 #include <linux/sys.h>
 #include <linux/linkage.h>
-#include <asm/unistd.h>
 
-.text
+#ifndef CONFIG_MMU
+#define sys_mmap2		sys_mmap_pgoff
+#endif
+
+.section .rodata
 ALIGN
 ENTRY(sys_call_table)
-	.long sys_restart_syscall	/* 0  -  old "setup()" system call */
+	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
 	.long sys_exit
 	.long sys_fork
 	.long sys_read
 	.long sys_write
-	.long sys_open		/* 5 */
+	.long sys_open			/* 5 */
 	.long sys_close
 	.long sys_waitpid
 	.long sys_creat
 	.long sys_link
-	.long sys_unlink	/* 10 */
+	.long sys_unlink		/* 10 */
 	.long sys_execve
 	.long sys_chdir
 	.long sys_time
 	.long sys_mknod
-	.long sys_chmod		/* 15 */
+	.long sys_chmod			/* 15 */
 	.long sys_chown16
-	.long sys_ni_syscall	/* old break syscall holder */
+	.long sys_ni_syscall		/* old break syscall holder */
 	.long sys_stat
 	.long sys_lseek
-	.long sys_getpid	/* 20 */
+	.long sys_getpid		/* 20 */
 	.long sys_mount
 	.long sys_oldumount
 	.long sys_setuid16
 	.long sys_getuid16
-	.long sys_stime		/* 25 */
+	.long sys_stime			/* 25 */
 	.long sys_ptrace
 	.long sys_alarm
 	.long sys_fstat
 	.long sys_pause
-	.long sys_utime		/* 30 */
-	.long sys_ni_syscall	/* old stty syscall holder */
-	.long sys_ni_syscall	/* old gtty syscall holder */
+	.long sys_utime			/* 30 */
+	.long sys_ni_syscall		/* old stty syscall holder */
+	.long sys_ni_syscall		/* old gtty syscall holder */
 	.long sys_access
 	.long sys_nice
-	.long sys_ni_syscall	/* 35 */ /* old ftime syscall holder */
+	.long sys_ni_syscall		/* 35 - old ftime syscall holder */
 	.long sys_sync
 	.long sys_kill
 	.long sys_rename
 	.long sys_mkdir
-	.long sys_rmdir		/* 40 */
+	.long sys_rmdir			/* 40 */
 	.long sys_dup
 	.long sys_pipe
 	.long sys_times
-	.long sys_ni_syscall	/* old prof syscall holder */
-	.long sys_brk		/* 45 */
+	.long sys_ni_syscall		/* old prof syscall holder */
+	.long sys_brk			/* 45 */
 	.long sys_setgid16
 	.long sys_getgid16
 	.long sys_signal
 	.long sys_geteuid16
-	.long sys_getegid16	/* 50 */
+	.long sys_getegid16		/* 50 */
 	.long sys_acct
-	.long sys_umount	/* recycled never used phys() */
-	.long sys_ni_syscall	/* old lock syscall holder */
+	.long sys_umount		/* recycled never used phys() */
+	.long sys_ni_syscall		/* old lock syscall holder */
 	.long sys_ioctl
-	.long sys_fcntl		/* 55 */
-	.long sys_ni_syscall	/* old mpx syscall holder */
+	.long sys_fcntl			/* 55 */
+	.long sys_ni_syscall		/* old mpx syscall holder */
 	.long sys_setpgid
-	.long sys_ni_syscall	/* old ulimit syscall holder */
+	.long sys_ni_syscall		/* old ulimit syscall holder */
 	.long sys_ni_syscall
-	.long sys_umask		/* 60 */
+	.long sys_umask			/* 60 */
 	.long sys_chroot
 	.long sys_ustat
 	.long sys_dup2
 	.long sys_getppid
-	.long sys_getpgrp	/* 65 */
+	.long sys_getpgrp		/* 65 */
 	.long sys_setsid
 	.long sys_sigaction
 	.long sys_sgetmask
 	.long sys_ssetmask
-	.long sys_setreuid16	/* 70 */
+	.long sys_setreuid16		/* 70 */
 	.long sys_setregid16
 	.long sys_sigsuspend
 	.long sys_sigpending
 	.long sys_sethostname
-	.long sys_setrlimit	/* 75 */
+	.long sys_setrlimit		/* 75 */
 	.long sys_old_getrlimit
 	.long sys_getrusage
 	.long sys_gettimeofday
 	.long sys_settimeofday
-	.long sys_getgroups16	/* 80 */
+	.long sys_getgroups16		/* 80 */
 	.long sys_setgroups16
 	.long sys_old_select
 	.long sys_symlink
 	.long sys_lstat
-	.long sys_readlink	/* 85 */
+	.long sys_readlink		/* 85 */
 	.long sys_uselib
-	.long sys_ni_syscall	/* sys_swapon */
+	.long sys_swapon
 	.long sys_reboot
 	.long sys_old_readdir
-	.long sys_old_mmap	/* 90 */
+	.long sys_old_mmap		/* 90 */
 	.long sys_munmap
 	.long sys_truncate
 	.long sys_ftruncate
 	.long sys_fchmod
-	.long sys_fchown16	/* 95 */
+	.long sys_fchown16		/* 95 */
 	.long sys_getpriority
 	.long sys_setpriority
-	.long sys_ni_syscall	/* old profil syscall holder */
+	.long sys_ni_syscall		/* old profil syscall holder */
 	.long sys_statfs
-	.long sys_fstatfs	/* 100 */
-	.long sys_ni_syscall	/* ioperm for i386 */
+	.long sys_fstatfs		/* 100 */
+	.long sys_ni_syscall		/* ioperm for i386 */
 	.long sys_socketcall
 	.long sys_syslog
 	.long sys_setitimer
-	.long sys_getitimer	/* 105 */
+	.long sys_getitimer		/* 105 */
 	.long sys_newstat
 	.long sys_newlstat
 	.long sys_newfstat
 	.long sys_ni_syscall
-	.long sys_ni_syscall	/* iopl for i386 */ /* 110 */
+	.long sys_ni_syscall		/* 110 - iopl for i386 */
 	.long sys_vhangup
-	.long sys_ni_syscall	/* obsolete idle() syscall */
-	.long sys_ni_syscall	/* vm86old for i386 */
+	.long sys_ni_syscall		/* obsolete idle() syscall */
+	.long sys_ni_syscall		/* vm86old for i386 */
 	.long sys_wait4
-	.long sys_ni_syscall	/* 115 */ /* sys_swapoff */
+	.long sys_swapoff		/* 115 */
 	.long sys_sysinfo
 	.long sys_ipc
 	.long sys_fsync
 	.long sys_sigreturn
-	.long sys_clone		/* 120 */
+	.long sys_clone			/* 120 */
 	.long sys_setdomainname
 	.long sys_newuname
-	.long sys_cacheflush	/* modify_ldt for i386 */
+	.long sys_cacheflush		/* modify_ldt for i386 */
 	.long sys_adjtimex
-	.long sys_ni_syscall	/* 125 */ /* sys_mprotect */
+	.long sys_mprotect		/* 125 */
 	.long sys_sigprocmask
-	.long sys_ni_syscall	/* old "creat_module" */
+	.long sys_ni_syscall		/* old "create_module" */
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_ni_syscall	/* 130: old "get_kernel_syms" */
+	.long sys_ni_syscall		/* 130 - old "get_kernel_syms" */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
 	.long sys_bdflush
-	.long sys_sysfs		/* 135 */
+	.long sys_sysfs			/* 135 */
 	.long sys_personality
-	.long sys_ni_syscall	/* for afs_syscall */
+	.long sys_ni_syscall		/* for afs_syscall */
 	.long sys_setfsuid16
 	.long sys_setfsgid16
-	.long sys_llseek	/* 140 */
+	.long sys_llseek		/* 140 */
 	.long sys_getdents
 	.long sys_select
 	.long sys_flock
-	.long sys_ni_syscall	/* sys_msync */
-	.long sys_readv		/* 145 */
+	.long sys_msync
+	.long sys_readv			/* 145 */
 	.long sys_writev
 	.long sys_getsid
 	.long sys_fdatasync
 	.long sys_sysctl
-	.long sys_ni_syscall	/* 150 */ /* sys_mlock */
-	.long sys_ni_syscall	/* sys_munlock */
-	.long sys_ni_syscall	/* sys_mlockall */
-	.long sys_ni_syscall	/* sys_munlockall */
+	.long sys_mlock			/* 150 */
+	.long sys_munlock
+	.long sys_mlockall
+	.long sys_munlockall
 	.long sys_sched_setparam
-	.long sys_sched_getparam /* 155 */
+	.long sys_sched_getparam	/* 155 */
 	.long sys_sched_setscheduler
 	.long sys_sched_getscheduler
 	.long sys_sched_yield
@@ -181,124 +184,124 @@ ENTRY(sys_call_table)
 	.long sys_sched_get_priority_min  /* 160 */
 	.long sys_sched_rr_get_interval
 	.long sys_nanosleep
-	.long sys_ni_syscall	/* sys_mremap */
+	.long sys_mremap
 	.long sys_setresuid16
-	.long sys_getresuid16	/* 165 */
-	.long sys_getpagesize	/* sys_getpagesize */
-	.long sys_ni_syscall	/* old "query_module" */
+	.long sys_getresuid16		/* 165 */
+	.long sys_getpagesize
+	.long sys_ni_syscall		/* old "query_module" */
 	.long sys_poll
-	.long sys_ni_syscall	/* sys_nfsservctl */
-	.long sys_setresgid16	/* 170 */
+	.long sys_nfsservctl
+	.long sys_setresgid16		/* 170 */
 	.long sys_getresgid16
 	.long sys_prctl
 	.long sys_rt_sigreturn
 	.long sys_rt_sigaction
-	.long sys_rt_sigprocmask /* 175 */
+	.long sys_rt_sigprocmask	/* 175 */
 	.long sys_rt_sigpending
 	.long sys_rt_sigtimedwait
 	.long sys_rt_sigqueueinfo
 	.long sys_rt_sigsuspend
-	.long sys_pread64	/* 180 */
+	.long sys_pread64		/* 180 */
 	.long sys_pwrite64
 	.long sys_lchown16
 	.long sys_getcwd
 	.long sys_capget
-	.long sys_capset	/* 185 */
+	.long sys_capset		/* 185 */
 	.long sys_sigaltstack
 	.long sys_sendfile
-	.long sys_ni_syscall	/* streams1 */
-	.long sys_ni_syscall	/* streams2 */
-	.long sys_vfork		/* 190 */
+	.long sys_ni_syscall		/* streams1 */
+	.long sys_ni_syscall		/* streams2 */
+	.long sys_vfork			/* 190 */
 	.long sys_getrlimit
-	.long sys_mmap_pgoff
+	.long sys_mmap2
 	.long sys_truncate64
 	.long sys_ftruncate64
-	.long sys_stat64	/* 195 */
+	.long sys_stat64		/* 195 */
 	.long sys_lstat64
 	.long sys_fstat64
 	.long sys_chown
 	.long sys_getuid
-	.long sys_getgid	/* 200 */
+	.long sys_getgid		/* 200 */
 	.long sys_geteuid
 	.long sys_getegid
 	.long sys_setreuid
 	.long sys_setregid
-	.long sys_getgroups	/* 205 */
+	.long sys_getgroups		/* 205 */
 	.long sys_setgroups
 	.long sys_fchown
 	.long sys_setresuid
 	.long sys_getresuid
-	.long sys_setresgid	/* 210 */
+	.long sys_setresgid		/* 210 */
 	.long sys_getresgid
 	.long sys_lchown
 	.long sys_setuid
 	.long sys_setgid
-	.long sys_setfsuid	/* 215 */
+	.long sys_setfsuid		/* 215 */
 	.long sys_setfsgid
 	.long sys_pivot_root
 	.long sys_ni_syscall
 	.long sys_ni_syscall
-	.long sys_getdents64	/* 220 */
+	.long sys_getdents64		/* 220 */
 	.long sys_gettid
 	.long sys_tkill
 	.long sys_setxattr
 	.long sys_lsetxattr
-	.long sys_fsetxattr	/* 225 */
+	.long sys_fsetxattr		/* 225 */
 	.long sys_getxattr
 	.long sys_lgetxattr
 	.long sys_fgetxattr
 	.long sys_listxattr
-	.long sys_llistxattr	/* 230 */
+	.long sys_llistxattr		/* 230 */
 	.long sys_flistxattr
 	.long sys_removexattr
 	.long sys_lremovexattr
 	.long sys_fremovexattr
-	.long sys_futex		/* 235 */
+	.long sys_futex			/* 235 */
 	.long sys_sendfile64
-	.long sys_ni_syscall	/* sys_mincore */
-	.long sys_ni_syscall	/* sys_madvise */
+	.long sys_mincore
+	.long sys_madvise
 	.long sys_fcntl64
-	.long sys_readahead	/* 240 */
+	.long sys_readahead		/* 240 */
 	.long sys_io_setup
 	.long sys_io_destroy
 	.long sys_io_getevents
 	.long sys_io_submit
-	.long sys_io_cancel	/* 245 */
+	.long sys_io_cancel		/* 245 */
 	.long sys_fadvise64
 	.long sys_exit_group
 	.long sys_lookup_dcookie
 	.long sys_epoll_create
-	.long sys_epoll_ctl	/* 250 */
+	.long sys_epoll_ctl		/* 250 */
 	.long sys_epoll_wait
-	.long sys_ni_syscall	/* sys_remap_file_pages */
+	.long sys_remap_file_pages
 	.long sys_set_tid_address
 	.long sys_timer_create
-	.long sys_timer_settime	/* 255 */
+	.long sys_timer_settime		/* 255 */
 	.long sys_timer_gettime
 	.long sys_timer_getoverrun
 	.long sys_timer_delete
 	.long sys_clock_settime
-	.long sys_clock_gettime	/* 260 */
+	.long sys_clock_gettime		/* 260 */
 	.long sys_clock_getres
 	.long sys_clock_nanosleep
 	.long sys_statfs64
 	.long sys_fstatfs64
-	.long sys_tgkill	/* 265 */
+	.long sys_tgkill		/* 265 */
 	.long sys_utimes
 	.long sys_fadvise64_64
-	.long sys_mbind	
+	.long sys_mbind
 	.long sys_get_mempolicy
-	.long sys_set_mempolicy	/* 270 */
+	.long sys_set_mempolicy		/* 270 */
 	.long sys_mq_open
 	.long sys_mq_unlink
 	.long sys_mq_timedsend
 	.long sys_mq_timedreceive
-	.long sys_mq_notify	/* 275 */
+	.long sys_mq_notify		/* 275 */
 	.long sys_mq_getsetattr
 	.long sys_waitid
-	.long sys_ni_syscall	/* for sys_vserver */
+	.long sys_ni_syscall		/* for sys_vserver */
 	.long sys_add_key
-	.long sys_request_key	/* 280 */
+	.long sys_request_key		/* 280 */
 	.long sys_keyctl
 	.long sys_ioprio_set
 	.long sys_ioprio_get
@@ -363,7 +366,3 @@ ENTRY(sys_call_table)
 	.long sys_clock_adjtime
 	.long sys_syncfs
 
-	.rept NR_syscalls-(.-sys_call_table)/4
-		.long sys_ni_syscall
-	.endr
-
-- 
1.7.0.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-04 18:37 ` Geert Uytterhoeven
  0 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-04 18:37 UTC (permalink / raw)
  To: Linux/m68k, Greg Ungerer
  Cc: Arnd Bergmann, Linux Kernel Development, uClinux list

Impact for nommu:
  - Store table in .rodata instead of .text,
  - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
  - Implement sys_mremap and sys_nfsservct,
  - Remove unused padding at the end of the table.

Impact for mmu:
  - Store table in .rodata instead of .data.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2: Store table in .rodata instead of .data.
v3: Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
    Implement sys_mremap and sys_nfsservct.

Greg, if it's OK for you, I'll add this to my for-2.6.40 branch.

 arch/m68k/kernel/Makefile_mm    |    2 +-
 arch/m68k/kernel/entry_mm.S     |  348 ---------------------------------------
 arch/m68k/kernel/syscalltable.S |  191 +++++++++++-----------
 3 files changed, 96 insertions(+), 445 deletions(-)

diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
index 55d5d6b..aced678 100644
--- a/arch/m68k/kernel/Makefile_mm
+++ b/arch/m68k/kernel/Makefile_mm
@@ -10,7 +10,7 @@ endif
 extra-y	+= vmlinux.lds
 
 obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
-	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
+	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o
 
 devres-y = ../../../kernel/irq/devres.o
 
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
index 1359ee6..bd0ec05 100644
--- a/arch/m68k/kernel/entry_mm.S
+++ b/arch/m68k/kernel/entry_mm.S
@@ -407,351 +407,3 @@ resume:
 
 	rts
 
-.data
-ALIGN
-sys_call_table:
-	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
-	.long sys_exit
-	.long sys_fork
-	.long sys_read
-	.long sys_write
-	.long sys_open		/* 5 */
-	.long sys_close
-	.long sys_waitpid
-	.long sys_creat
-	.long sys_link
-	.long sys_unlink	/* 10 */
-	.long sys_execve
-	.long sys_chdir
-	.long sys_time
-	.long sys_mknod
-	.long sys_chmod		/* 15 */
-	.long sys_chown16
-	.long sys_ni_syscall				/* old break syscall holder */
-	.long sys_stat
-	.long sys_lseek
-	.long sys_getpid	/* 20 */
-	.long sys_mount
-	.long sys_oldumount
-	.long sys_setuid16
-	.long sys_getuid16
-	.long sys_stime		/* 25 */
-	.long sys_ptrace
-	.long sys_alarm
-	.long sys_fstat
-	.long sys_pause
-	.long sys_utime		/* 30 */
-	.long sys_ni_syscall				/* old stty syscall holder */
-	.long sys_ni_syscall				/* old gtty syscall holder */
-	.long sys_access
-	.long sys_nice
-	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */
-	.long sys_sync
-	.long sys_kill
-	.long sys_rename
-	.long sys_mkdir
-	.long sys_rmdir		/* 40 */
-	.long sys_dup
-	.long sys_pipe
-	.long sys_times
-	.long sys_ni_syscall				/* old prof syscall holder */
-	.long sys_brk		/* 45 */
-	.long sys_setgid16
-	.long sys_getgid16
-	.long sys_signal
-	.long sys_geteuid16
-	.long sys_getegid16	/* 50 */
-	.long sys_acct
-	.long sys_umount				/* recycled never used phys() */
-	.long sys_ni_syscall				/* old lock syscall holder */
-	.long sys_ioctl
-	.long sys_fcntl		/* 55 */
-	.long sys_ni_syscall				/* old mpx syscall holder */
-	.long sys_setpgid
-	.long sys_ni_syscall				/* old ulimit syscall holder */
-	.long sys_ni_syscall
-	.long sys_umask		/* 60 */
-	.long sys_chroot
-	.long sys_ustat
-	.long sys_dup2
-	.long sys_getppid
-	.long sys_getpgrp	/* 65 */
-	.long sys_setsid
-	.long sys_sigaction
-	.long sys_sgetmask
-	.long sys_ssetmask
-	.long sys_setreuid16	/* 70 */
-	.long sys_setregid16
-	.long sys_sigsuspend
-	.long sys_sigpending
-	.long sys_sethostname
-	.long sys_setrlimit	/* 75 */
-	.long sys_old_getrlimit
-	.long sys_getrusage
-	.long sys_gettimeofday
-	.long sys_settimeofday
-	.long sys_getgroups16	/* 80 */
-	.long sys_setgroups16
-	.long sys_old_select
-	.long sys_symlink
-	.long sys_lstat
-	.long sys_readlink	/* 85 */
-	.long sys_uselib
-	.long sys_swapon
-	.long sys_reboot
-	.long sys_old_readdir
-	.long sys_old_mmap	/* 90 */
-	.long sys_munmap
-	.long sys_truncate
-	.long sys_ftruncate
-	.long sys_fchmod
-	.long sys_fchown16	/* 95 */
-	.long sys_getpriority
-	.long sys_setpriority
-	.long sys_ni_syscall				/* old profil syscall holder */
-	.long sys_statfs
-	.long sys_fstatfs	/* 100 */
-	.long sys_ni_syscall				/* ioperm for i386 */
-	.long sys_socketcall
-	.long sys_syslog
-	.long sys_setitimer
-	.long sys_getitimer	/* 105 */
-	.long sys_newstat
-	.long sys_newlstat
-	.long sys_newfstat
-	.long sys_ni_syscall
-	.long sys_ni_syscall	/* 110 */	/* iopl for i386 */
-	.long sys_vhangup
-	.long sys_ni_syscall				/* obsolete idle() syscall */
-	.long sys_ni_syscall				/* vm86old for i386 */
-	.long sys_wait4
-	.long sys_swapoff	/* 115 */
-	.long sys_sysinfo
-	.long sys_ipc
-	.long sys_fsync
-	.long sys_sigreturn
-	.long sys_clone		/* 120 */
-	.long sys_setdomainname
-	.long sys_newuname
-	.long sys_cacheflush				/* modify_ldt for i386 */
-	.long sys_adjtimex
-	.long sys_mprotect	/* 125 */
-	.long sys_sigprocmask
-	.long sys_ni_syscall		/* old "create_module" */
-	.long sys_init_module
-	.long sys_delete_module
-	.long sys_ni_syscall	/* 130 - old "get_kernel_syms" */
-	.long sys_quotactl
-	.long sys_getpgid
-	.long sys_fchdir
-	.long sys_bdflush
-	.long sys_sysfs		/* 135 */
-	.long sys_personality
-	.long sys_ni_syscall				/* for afs_syscall */
-	.long sys_setfsuid16
-	.long sys_setfsgid16
-	.long sys_llseek	/* 140 */
-	.long sys_getdents
-	.long sys_select
-	.long sys_flock
-	.long sys_msync
-	.long sys_readv		/* 145 */
-	.long sys_writev
-	.long sys_getsid
-	.long sys_fdatasync
-	.long sys_sysctl
-	.long sys_mlock		/* 150 */
-	.long sys_munlock
-	.long sys_mlockall
-	.long sys_munlockall
-	.long sys_sched_setparam
-	.long sys_sched_getparam	/* 155 */
-	.long sys_sched_setscheduler
-	.long sys_sched_getscheduler
-	.long sys_sched_yield
-	.long sys_sched_get_priority_max
-	.long sys_sched_get_priority_min  /* 160 */
-	.long sys_sched_rr_get_interval
-	.long sys_nanosleep
-	.long sys_mremap
-	.long sys_setresuid16
-	.long sys_getresuid16	/* 165 */
-	.long sys_getpagesize
-	.long sys_ni_syscall		/* old sys_query_module */
-	.long sys_poll
-	.long sys_nfsservctl
-	.long sys_setresgid16	/* 170 */
-	.long sys_getresgid16
-	.long sys_prctl
-	.long sys_rt_sigreturn
-	.long sys_rt_sigaction
-	.long sys_rt_sigprocmask	/* 175 */
-	.long sys_rt_sigpending
-	.long sys_rt_sigtimedwait
-	.long sys_rt_sigqueueinfo
-	.long sys_rt_sigsuspend
-	.long sys_pread64	/* 180 */
-	.long sys_pwrite64
-	.long sys_lchown16;
-	.long sys_getcwd
-	.long sys_capget
-	.long sys_capset	/* 185 */
-	.long sys_sigaltstack
-	.long sys_sendfile
-	.long sys_ni_syscall				/* streams1 */
-	.long sys_ni_syscall				/* streams2 */
-	.long sys_vfork		/* 190 */
-	.long sys_getrlimit
-	.long sys_mmap2
-	.long sys_truncate64
-	.long sys_ftruncate64
-	.long sys_stat64	/* 195 */
-	.long sys_lstat64
-	.long sys_fstat64
-	.long sys_chown
-	.long sys_getuid
-	.long sys_getgid	/* 200 */
-	.long sys_geteuid
-	.long sys_getegid
-	.long sys_setreuid
-	.long sys_setregid
-	.long sys_getgroups	/* 205 */
-	.long sys_setgroups
-	.long sys_fchown
-	.long sys_setresuid
-	.long sys_getresuid
-	.long sys_setresgid	/* 210 */
-	.long sys_getresgid
-	.long sys_lchown
-	.long sys_setuid
-	.long sys_setgid
-	.long sys_setfsuid	/* 215 */
-	.long sys_setfsgid
-	.long sys_pivot_root
-	.long sys_ni_syscall
-	.long sys_ni_syscall
-	.long sys_getdents64	/* 220 */
-	.long sys_gettid
-	.long sys_tkill
-	.long sys_setxattr
-	.long sys_lsetxattr
-	.long sys_fsetxattr	/* 225 */
-	.long sys_getxattr
-	.long sys_lgetxattr
-	.long sys_fgetxattr
-	.long sys_listxattr
-	.long sys_llistxattr	/* 230 */
-	.long sys_flistxattr
-	.long sys_removexattr
-	.long sys_lremovexattr
-	.long sys_fremovexattr
-	.long sys_futex		/* 235 */
-	.long sys_sendfile64
-	.long sys_mincore
-	.long sys_madvise
-	.long sys_fcntl64
-	.long sys_readahead	/* 240 */
-	.long sys_io_setup
-	.long sys_io_destroy
-	.long sys_io_getevents
-	.long sys_io_submit
-	.long sys_io_cancel	/* 245 */
-	.long sys_fadvise64
-	.long sys_exit_group
-	.long sys_lookup_dcookie
-	.long sys_epoll_create
-	.long sys_epoll_ctl	/* 250 */
-	.long sys_epoll_wait
-	.long sys_remap_file_pages
-	.long sys_set_tid_address
-	.long sys_timer_create
-	.long sys_timer_settime	/* 255 */
-	.long sys_timer_gettime
-	.long sys_timer_getoverrun
-	.long sys_timer_delete
-	.long sys_clock_settime
-	.long sys_clock_gettime	/* 260 */
-	.long sys_clock_getres
-	.long sys_clock_nanosleep
-	.long sys_statfs64
-	.long sys_fstatfs64
-	.long sys_tgkill	/* 265 */
-	.long sys_utimes
-	.long sys_fadvise64_64
-	.long sys_mbind
-	.long sys_get_mempolicy
-	.long sys_set_mempolicy	/* 270 */
-	.long sys_mq_open
-	.long sys_mq_unlink
-	.long sys_mq_timedsend
-	.long sys_mq_timedreceive
-	.long sys_mq_notify	/* 275 */
-	.long sys_mq_getsetattr
-	.long sys_waitid
-	.long sys_ni_syscall	/* for sys_vserver */
-	.long sys_add_key
-	.long sys_request_key	/* 280 */
-	.long sys_keyctl
-	.long sys_ioprio_set
-	.long sys_ioprio_get
-	.long sys_inotify_init
-	.long sys_inotify_add_watch	/* 285 */
-	.long sys_inotify_rm_watch
-	.long sys_migrate_pages
-	.long sys_openat
-	.long sys_mkdirat
-	.long sys_mknodat		/* 290 */
-	.long sys_fchownat
-	.long sys_futimesat
-	.long sys_fstatat64
-	.long sys_unlinkat
-	.long sys_renameat		/* 295 */
-	.long sys_linkat
-	.long sys_symlinkat
-	.long sys_readlinkat
-	.long sys_fchmodat
-	.long sys_faccessat		/* 300 */
-	.long sys_ni_syscall		/* Reserved for pselect6 */
-	.long sys_ni_syscall		/* Reserved for ppoll */
-	.long sys_unshare
-	.long sys_set_robust_list
-	.long sys_get_robust_list	/* 305 */
-	.long sys_splice
-	.long sys_sync_file_range
-	.long sys_tee
-	.long sys_vmsplice
-	.long sys_move_pages		/* 310 */
-	.long sys_sched_setaffinity
-	.long sys_sched_getaffinity
-	.long sys_kexec_load
-	.long sys_getcpu
-	.long sys_epoll_pwait		/* 315 */
-	.long sys_utimensat
-	.long sys_signalfd
-	.long sys_timerfd_create
-	.long sys_eventfd
-	.long sys_fallocate		/* 320 */
-	.long sys_timerfd_settime
-	.long sys_timerfd_gettime
-	.long sys_signalfd4
-	.long sys_eventfd2
-	.long sys_epoll_create1		/* 325 */
-	.long sys_dup3
-	.long sys_pipe2
-	.long sys_inotify_init1
-	.long sys_preadv
-	.long sys_pwritev		/* 330 */
-	.long sys_rt_tgsigqueueinfo
-	.long sys_perf_event_open
-	.long sys_get_thread_area
-	.long sys_set_thread_area
-	.long sys_atomic_cmpxchg_32	/* 335 */
-	.long sys_atomic_barrier
-	.long sys_fanotify_init
-	.long sys_fanotify_mark
-	.long sys_prlimit64
-	.long sys_name_to_handle_at	/* 340 */
-	.long sys_open_by_handle_at
-	.long sys_clock_adjtime
-	.long sys_syncfs
-
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index 9b8393d..0284192 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/m68knommu/kernel/syscalltable.S
- *
  *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
  *
  *  Based on older entry.S files, the following copyrights apply:
@@ -9,171 +7,176 @@
  *                      Kenneth Albanowski <kjahds@kjahds.com>,
  *  Copyright (C) 2000  Lineo Inc. (www.lineo.com) 
  *  Copyright (C) 1991, 1992  Linus Torvalds
+ *
+ *  Linux/m68k support by Hamish Macdonald
  */
 
 #include <linux/sys.h>
 #include <linux/linkage.h>
-#include <asm/unistd.h>
 
-.text
+#ifndef CONFIG_MMU
+#define sys_mmap2		sys_mmap_pgoff
+#endif
+
+.section .rodata
 ALIGN
 ENTRY(sys_call_table)
-	.long sys_restart_syscall	/* 0  -  old "setup()" system call */
+	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
 	.long sys_exit
 	.long sys_fork
 	.long sys_read
 	.long sys_write
-	.long sys_open		/* 5 */
+	.long sys_open			/* 5 */
 	.long sys_close
 	.long sys_waitpid
 	.long sys_creat
 	.long sys_link
-	.long sys_unlink	/* 10 */
+	.long sys_unlink		/* 10 */
 	.long sys_execve
 	.long sys_chdir
 	.long sys_time
 	.long sys_mknod
-	.long sys_chmod		/* 15 */
+	.long sys_chmod			/* 15 */
 	.long sys_chown16
-	.long sys_ni_syscall	/* old break syscall holder */
+	.long sys_ni_syscall		/* old break syscall holder */
 	.long sys_stat
 	.long sys_lseek
-	.long sys_getpid	/* 20 */
+	.long sys_getpid		/* 20 */
 	.long sys_mount
 	.long sys_oldumount
 	.long sys_setuid16
 	.long sys_getuid16
-	.long sys_stime		/* 25 */
+	.long sys_stime			/* 25 */
 	.long sys_ptrace
 	.long sys_alarm
 	.long sys_fstat
 	.long sys_pause
-	.long sys_utime		/* 30 */
-	.long sys_ni_syscall	/* old stty syscall holder */
-	.long sys_ni_syscall	/* old gtty syscall holder */
+	.long sys_utime			/* 30 */
+	.long sys_ni_syscall		/* old stty syscall holder */
+	.long sys_ni_syscall		/* old gtty syscall holder */
 	.long sys_access
 	.long sys_nice
-	.long sys_ni_syscall	/* 35 */ /* old ftime syscall holder */
+	.long sys_ni_syscall		/* 35 - old ftime syscall holder */
 	.long sys_sync
 	.long sys_kill
 	.long sys_rename
 	.long sys_mkdir
-	.long sys_rmdir		/* 40 */
+	.long sys_rmdir			/* 40 */
 	.long sys_dup
 	.long sys_pipe
 	.long sys_times
-	.long sys_ni_syscall	/* old prof syscall holder */
-	.long sys_brk		/* 45 */
+	.long sys_ni_syscall		/* old prof syscall holder */
+	.long sys_brk			/* 45 */
 	.long sys_setgid16
 	.long sys_getgid16
 	.long sys_signal
 	.long sys_geteuid16
-	.long sys_getegid16	/* 50 */
+	.long sys_getegid16		/* 50 */
 	.long sys_acct
-	.long sys_umount	/* recycled never used phys() */
-	.long sys_ni_syscall	/* old lock syscall holder */
+	.long sys_umount		/* recycled never used phys() */
+	.long sys_ni_syscall		/* old lock syscall holder */
 	.long sys_ioctl
-	.long sys_fcntl		/* 55 */
-	.long sys_ni_syscall	/* old mpx syscall holder */
+	.long sys_fcntl			/* 55 */
+	.long sys_ni_syscall		/* old mpx syscall holder */
 	.long sys_setpgid
-	.long sys_ni_syscall	/* old ulimit syscall holder */
+	.long sys_ni_syscall		/* old ulimit syscall holder */
 	.long sys_ni_syscall
-	.long sys_umask		/* 60 */
+	.long sys_umask			/* 60 */
 	.long sys_chroot
 	.long sys_ustat
 	.long sys_dup2
 	.long sys_getppid
-	.long sys_getpgrp	/* 65 */
+	.long sys_getpgrp		/* 65 */
 	.long sys_setsid
 	.long sys_sigaction
 	.long sys_sgetmask
 	.long sys_ssetmask
-	.long sys_setreuid16	/* 70 */
+	.long sys_setreuid16		/* 70 */
 	.long sys_setregid16
 	.long sys_sigsuspend
 	.long sys_sigpending
 	.long sys_sethostname
-	.long sys_setrlimit	/* 75 */
+	.long sys_setrlimit		/* 75 */
 	.long sys_old_getrlimit
 	.long sys_getrusage
 	.long sys_gettimeofday
 	.long sys_settimeofday
-	.long sys_getgroups16	/* 80 */
+	.long sys_getgroups16		/* 80 */
 	.long sys_setgroups16
 	.long sys_old_select
 	.long sys_symlink
 	.long sys_lstat
-	.long sys_readlink	/* 85 */
+	.long sys_readlink		/* 85 */
 	.long sys_uselib
-	.long sys_ni_syscall	/* sys_swapon */
+	.long sys_swapon
 	.long sys_reboot
 	.long sys_old_readdir
-	.long sys_old_mmap	/* 90 */
+	.long sys_old_mmap		/* 90 */
 	.long sys_munmap
 	.long sys_truncate
 	.long sys_ftruncate
 	.long sys_fchmod
-	.long sys_fchown16	/* 95 */
+	.long sys_fchown16		/* 95 */
 	.long sys_getpriority
 	.long sys_setpriority
-	.long sys_ni_syscall	/* old profil syscall holder */
+	.long sys_ni_syscall		/* old profil syscall holder */
 	.long sys_statfs
-	.long sys_fstatfs	/* 100 */
-	.long sys_ni_syscall	/* ioperm for i386 */
+	.long sys_fstatfs		/* 100 */
+	.long sys_ni_syscall		/* ioperm for i386 */
 	.long sys_socketcall
 	.long sys_syslog
 	.long sys_setitimer
-	.long sys_getitimer	/* 105 */
+	.long sys_getitimer		/* 105 */
 	.long sys_newstat
 	.long sys_newlstat
 	.long sys_newfstat
 	.long sys_ni_syscall
-	.long sys_ni_syscall	/* iopl for i386 */ /* 110 */
+	.long sys_ni_syscall		/* 110 - iopl for i386 */
 	.long sys_vhangup
-	.long sys_ni_syscall	/* obsolete idle() syscall */
-	.long sys_ni_syscall	/* vm86old for i386 */
+	.long sys_ni_syscall		/* obsolete idle() syscall */
+	.long sys_ni_syscall		/* vm86old for i386 */
 	.long sys_wait4
-	.long sys_ni_syscall	/* 115 */ /* sys_swapoff */
+	.long sys_swapoff		/* 115 */
 	.long sys_sysinfo
 	.long sys_ipc
 	.long sys_fsync
 	.long sys_sigreturn
-	.long sys_clone		/* 120 */
+	.long sys_clone			/* 120 */
 	.long sys_setdomainname
 	.long sys_newuname
-	.long sys_cacheflush	/* modify_ldt for i386 */
+	.long sys_cacheflush		/* modify_ldt for i386 */
 	.long sys_adjtimex
-	.long sys_ni_syscall	/* 125 */ /* sys_mprotect */
+	.long sys_mprotect		/* 125 */
 	.long sys_sigprocmask
-	.long sys_ni_syscall	/* old "creat_module" */
+	.long sys_ni_syscall		/* old "create_module" */
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_ni_syscall	/* 130: old "get_kernel_syms" */
+	.long sys_ni_syscall		/* 130 - old "get_kernel_syms" */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
 	.long sys_bdflush
-	.long sys_sysfs		/* 135 */
+	.long sys_sysfs			/* 135 */
 	.long sys_personality
-	.long sys_ni_syscall	/* for afs_syscall */
+	.long sys_ni_syscall		/* for afs_syscall */
 	.long sys_setfsuid16
 	.long sys_setfsgid16
-	.long sys_llseek	/* 140 */
+	.long sys_llseek		/* 140 */
 	.long sys_getdents
 	.long sys_select
 	.long sys_flock
-	.long sys_ni_syscall	/* sys_msync */
-	.long sys_readv		/* 145 */
+	.long sys_msync
+	.long sys_readv			/* 145 */
 	.long sys_writev
 	.long sys_getsid
 	.long sys_fdatasync
 	.long sys_sysctl
-	.long sys_ni_syscall	/* 150 */ /* sys_mlock */
-	.long sys_ni_syscall	/* sys_munlock */
-	.long sys_ni_syscall	/* sys_mlockall */
-	.long sys_ni_syscall	/* sys_munlockall */
+	.long sys_mlock			/* 150 */
+	.long sys_munlock
+	.long sys_mlockall
+	.long sys_munlockall
 	.long sys_sched_setparam
-	.long sys_sched_getparam /* 155 */
+	.long sys_sched_getparam	/* 155 */
 	.long sys_sched_setscheduler
 	.long sys_sched_getscheduler
 	.long sys_sched_yield
@@ -181,124 +184,124 @@ ENTRY(sys_call_table)
 	.long sys_sched_get_priority_min  /* 160 */
 	.long sys_sched_rr_get_interval
 	.long sys_nanosleep
-	.long sys_ni_syscall	/* sys_mremap */
+	.long sys_mremap
 	.long sys_setresuid16
-	.long sys_getresuid16	/* 165 */
-	.long sys_getpagesize	/* sys_getpagesize */
-	.long sys_ni_syscall	/* old "query_module" */
+	.long sys_getresuid16		/* 165 */
+	.long sys_getpagesize
+	.long sys_ni_syscall		/* old "query_module" */
 	.long sys_poll
-	.long sys_ni_syscall	/* sys_nfsservctl */
-	.long sys_setresgid16	/* 170 */
+	.long sys_nfsservctl
+	.long sys_setresgid16		/* 170 */
 	.long sys_getresgid16
 	.long sys_prctl
 	.long sys_rt_sigreturn
 	.long sys_rt_sigaction
-	.long sys_rt_sigprocmask /* 175 */
+	.long sys_rt_sigprocmask	/* 175 */
 	.long sys_rt_sigpending
 	.long sys_rt_sigtimedwait
 	.long sys_rt_sigqueueinfo
 	.long sys_rt_sigsuspend
-	.long sys_pread64	/* 180 */
+	.long sys_pread64		/* 180 */
 	.long sys_pwrite64
 	.long sys_lchown16
 	.long sys_getcwd
 	.long sys_capget
-	.long sys_capset	/* 185 */
+	.long sys_capset		/* 185 */
 	.long sys_sigaltstack
 	.long sys_sendfile
-	.long sys_ni_syscall	/* streams1 */
-	.long sys_ni_syscall	/* streams2 */
-	.long sys_vfork		/* 190 */
+	.long sys_ni_syscall		/* streams1 */
+	.long sys_ni_syscall		/* streams2 */
+	.long sys_vfork			/* 190 */
 	.long sys_getrlimit
-	.long sys_mmap_pgoff
+	.long sys_mmap2
 	.long sys_truncate64
 	.long sys_ftruncate64
-	.long sys_stat64	/* 195 */
+	.long sys_stat64		/* 195 */
 	.long sys_lstat64
 	.long sys_fstat64
 	.long sys_chown
 	.long sys_getuid
-	.long sys_getgid	/* 200 */
+	.long sys_getgid		/* 200 */
 	.long sys_geteuid
 	.long sys_getegid
 	.long sys_setreuid
 	.long sys_setregid
-	.long sys_getgroups	/* 205 */
+	.long sys_getgroups		/* 205 */
 	.long sys_setgroups
 	.long sys_fchown
 	.long sys_setresuid
 	.long sys_getresuid
-	.long sys_setresgid	/* 210 */
+	.long sys_setresgid		/* 210 */
 	.long sys_getresgid
 	.long sys_lchown
 	.long sys_setuid
 	.long sys_setgid
-	.long sys_setfsuid	/* 215 */
+	.long sys_setfsuid		/* 215 */
 	.long sys_setfsgid
 	.long sys_pivot_root
 	.long sys_ni_syscall
 	.long sys_ni_syscall
-	.long sys_getdents64	/* 220 */
+	.long sys_getdents64		/* 220 */
 	.long sys_gettid
 	.long sys_tkill
 	.long sys_setxattr
 	.long sys_lsetxattr
-	.long sys_fsetxattr	/* 225 */
+	.long sys_fsetxattr		/* 225 */
 	.long sys_getxattr
 	.long sys_lgetxattr
 	.long sys_fgetxattr
 	.long sys_listxattr
-	.long sys_llistxattr	/* 230 */
+	.long sys_llistxattr		/* 230 */
 	.long sys_flistxattr
 	.long sys_removexattr
 	.long sys_lremovexattr
 	.long sys_fremovexattr
-	.long sys_futex		/* 235 */
+	.long sys_futex			/* 235 */
 	.long sys_sendfile64
-	.long sys_ni_syscall	/* sys_mincore */
-	.long sys_ni_syscall	/* sys_madvise */
+	.long sys_mincore
+	.long sys_madvise
 	.long sys_fcntl64
-	.long sys_readahead	/* 240 */
+	.long sys_readahead		/* 240 */
 	.long sys_io_setup
 	.long sys_io_destroy
 	.long sys_io_getevents
 	.long sys_io_submit
-	.long sys_io_cancel	/* 245 */
+	.long sys_io_cancel		/* 245 */
 	.long sys_fadvise64
 	.long sys_exit_group
 	.long sys_lookup_dcookie
 	.long sys_epoll_create
-	.long sys_epoll_ctl	/* 250 */
+	.long sys_epoll_ctl		/* 250 */
 	.long sys_epoll_wait
-	.long sys_ni_syscall	/* sys_remap_file_pages */
+	.long sys_remap_file_pages
 	.long sys_set_tid_address
 	.long sys_timer_create
-	.long sys_timer_settime	/* 255 */
+	.long sys_timer_settime		/* 255 */
 	.long sys_timer_gettime
 	.long sys_timer_getoverrun
 	.long sys_timer_delete
 	.long sys_clock_settime
-	.long sys_clock_gettime	/* 260 */
+	.long sys_clock_gettime		/* 260 */
 	.long sys_clock_getres
 	.long sys_clock_nanosleep
 	.long sys_statfs64
 	.long sys_fstatfs64
-	.long sys_tgkill	/* 265 */
+	.long sys_tgkill		/* 265 */
 	.long sys_utimes
 	.long sys_fadvise64_64
-	.long sys_mbind	
+	.long sys_mbind
 	.long sys_get_mempolicy
-	.long sys_set_mempolicy	/* 270 */
+	.long sys_set_mempolicy		/* 270 */
 	.long sys_mq_open
 	.long sys_mq_unlink
 	.long sys_mq_timedsend
 	.long sys_mq_timedreceive
-	.long sys_mq_notify	/* 275 */
+	.long sys_mq_notify		/* 275 */
 	.long sys_mq_getsetattr
 	.long sys_waitid
-	.long sys_ni_syscall	/* for sys_vserver */
+	.long sys_ni_syscall		/* for sys_vserver */
 	.long sys_add_key
-	.long sys_request_key	/* 280 */
+	.long sys_request_key		/* 280 */
 	.long sys_keyctl
 	.long sys_ioprio_set
 	.long sys_ioprio_get
@@ -363,7 +366,3 @@ ENTRY(sys_call_table)
 	.long sys_clock_adjtime
 	.long sys_syncfs
 
-	.rept NR_syscalls-(.-sys_call_table)/4
-		.long sys_ni_syscall
-	.endr
-
-- 
1.7.0.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-04 18:37 ` Geert Uytterhoeven
@ 2011-05-04 22:18   ` Greg Ungerer
  -1 siblings, 0 replies; 35+ messages in thread
From: Greg Ungerer @ 2011-05-04 22:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux/m68k, Greg Ungerer, Arnd Bergmann,
	Linux Kernel Development, uClinux list

Hi Geert,

On 05/05/11 04:37, Geert Uytterhoeven wrote:
> Impact for nommu:
>    - Store table in .rodata instead of .text,
>    - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>    - Implement sys_mremap and sys_nfsservct,
>    - Remove unused padding at the end of the table.
>
> Impact for mmu:
>    - Store table in .rodata instead of .data.
>
> Signed-off-by: Geert Uytterhoeven<geert@linux-m68k.org>
> ---
> v2: Store table in .rodata instead of .data.
> v3: Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>      Implement sys_mremap and sys_nfsservct.
>
> Greg, if it's OK for you, I'll add this to my for-2.6.40 branch.

Yep, looks good.

Acked-by: Greg Ungerer <gerg@uclinux.org>

Thanks
Greg


>   arch/m68k/kernel/Makefile_mm    |    2 +-
>   arch/m68k/kernel/entry_mm.S     |  348 ---------------------------------------
>   arch/m68k/kernel/syscalltable.S |  191 +++++++++++-----------
>   3 files changed, 96 insertions(+), 445 deletions(-)
>
> diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
> index 55d5d6b..aced678 100644
> --- a/arch/m68k/kernel/Makefile_mm
> +++ b/arch/m68k/kernel/Makefile_mm
> @@ -10,7 +10,7 @@ endif
>   extra-y	+= vmlinux.lds
>
>   obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
> -	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
> +	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o
>
>   devres-y = ../../../kernel/irq/devres.o
>
> diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
> index 1359ee6..bd0ec05 100644
> --- a/arch/m68k/kernel/entry_mm.S
> +++ b/arch/m68k/kernel/entry_mm.S
> @@ -407,351 +407,3 @@ resume:
>
>   	rts
>
> -.data
> -ALIGN
> -sys_call_table:
> -	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
> -	.long sys_exit
> -	.long sys_fork
> -	.long sys_read
> -	.long sys_write
> -	.long sys_open		/* 5 */
> -	.long sys_close
> -	.long sys_waitpid
> -	.long sys_creat
> -	.long sys_link
> -	.long sys_unlink	/* 10 */
> -	.long sys_execve
> -	.long sys_chdir
> -	.long sys_time
> -	.long sys_mknod
> -	.long sys_chmod		/* 15 */
> -	.long sys_chown16
> -	.long sys_ni_syscall				/* old break syscall holder */
> -	.long sys_stat
> -	.long sys_lseek
> -	.long sys_getpid	/* 20 */
> -	.long sys_mount
> -	.long sys_oldumount
> -	.long sys_setuid16
> -	.long sys_getuid16
> -	.long sys_stime		/* 25 */
> -	.long sys_ptrace
> -	.long sys_alarm
> -	.long sys_fstat
> -	.long sys_pause
> -	.long sys_utime		/* 30 */
> -	.long sys_ni_syscall				/* old stty syscall holder */
> -	.long sys_ni_syscall				/* old gtty syscall holder */
> -	.long sys_access
> -	.long sys_nice
> -	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */
> -	.long sys_sync
> -	.long sys_kill
> -	.long sys_rename
> -	.long sys_mkdir
> -	.long sys_rmdir		/* 40 */
> -	.long sys_dup
> -	.long sys_pipe
> -	.long sys_times
> -	.long sys_ni_syscall				/* old prof syscall holder */
> -	.long sys_brk		/* 45 */
> -	.long sys_setgid16
> -	.long sys_getgid16
> -	.long sys_signal
> -	.long sys_geteuid16
> -	.long sys_getegid16	/* 50 */
> -	.long sys_acct
> -	.long sys_umount				/* recycled never used phys() */
> -	.long sys_ni_syscall				/* old lock syscall holder */
> -	.long sys_ioctl
> -	.long sys_fcntl		/* 55 */
> -	.long sys_ni_syscall				/* old mpx syscall holder */
> -	.long sys_setpgid
> -	.long sys_ni_syscall				/* old ulimit syscall holder */
> -	.long sys_ni_syscall
> -	.long sys_umask		/* 60 */
> -	.long sys_chroot
> -	.long sys_ustat
> -	.long sys_dup2
> -	.long sys_getppid
> -	.long sys_getpgrp	/* 65 */
> -	.long sys_setsid
> -	.long sys_sigaction
> -	.long sys_sgetmask
> -	.long sys_ssetmask
> -	.long sys_setreuid16	/* 70 */
> -	.long sys_setregid16
> -	.long sys_sigsuspend
> -	.long sys_sigpending
> -	.long sys_sethostname
> -	.long sys_setrlimit	/* 75 */
> -	.long sys_old_getrlimit
> -	.long sys_getrusage
> -	.long sys_gettimeofday
> -	.long sys_settimeofday
> -	.long sys_getgroups16	/* 80 */
> -	.long sys_setgroups16
> -	.long sys_old_select
> -	.long sys_symlink
> -	.long sys_lstat
> -	.long sys_readlink	/* 85 */
> -	.long sys_uselib
> -	.long sys_swapon
> -	.long sys_reboot
> -	.long sys_old_readdir
> -	.long sys_old_mmap	/* 90 */
> -	.long sys_munmap
> -	.long sys_truncate
> -	.long sys_ftruncate
> -	.long sys_fchmod
> -	.long sys_fchown16	/* 95 */
> -	.long sys_getpriority
> -	.long sys_setpriority
> -	.long sys_ni_syscall				/* old profil syscall holder */
> -	.long sys_statfs
> -	.long sys_fstatfs	/* 100 */
> -	.long sys_ni_syscall				/* ioperm for i386 */
> -	.long sys_socketcall
> -	.long sys_syslog
> -	.long sys_setitimer
> -	.long sys_getitimer	/* 105 */
> -	.long sys_newstat
> -	.long sys_newlstat
> -	.long sys_newfstat
> -	.long sys_ni_syscall
> -	.long sys_ni_syscall	/* 110 */	/* iopl for i386 */
> -	.long sys_vhangup
> -	.long sys_ni_syscall				/* obsolete idle() syscall */
> -	.long sys_ni_syscall				/* vm86old for i386 */
> -	.long sys_wait4
> -	.long sys_swapoff	/* 115 */
> -	.long sys_sysinfo
> -	.long sys_ipc
> -	.long sys_fsync
> -	.long sys_sigreturn
> -	.long sys_clone		/* 120 */
> -	.long sys_setdomainname
> -	.long sys_newuname
> -	.long sys_cacheflush				/* modify_ldt for i386 */
> -	.long sys_adjtimex
> -	.long sys_mprotect	/* 125 */
> -	.long sys_sigprocmask
> -	.long sys_ni_syscall		/* old "create_module" */
> -	.long sys_init_module
> -	.long sys_delete_module
> -	.long sys_ni_syscall	/* 130 - old "get_kernel_syms" */
> -	.long sys_quotactl
> -	.long sys_getpgid
> -	.long sys_fchdir
> -	.long sys_bdflush
> -	.long sys_sysfs		/* 135 */
> -	.long sys_personality
> -	.long sys_ni_syscall				/* for afs_syscall */
> -	.long sys_setfsuid16
> -	.long sys_setfsgid16
> -	.long sys_llseek	/* 140 */
> -	.long sys_getdents
> -	.long sys_select
> -	.long sys_flock
> -	.long sys_msync
> -	.long sys_readv		/* 145 */
> -	.long sys_writev
> -	.long sys_getsid
> -	.long sys_fdatasync
> -	.long sys_sysctl
> -	.long sys_mlock		/* 150 */
> -	.long sys_munlock
> -	.long sys_mlockall
> -	.long sys_munlockall
> -	.long sys_sched_setparam
> -	.long sys_sched_getparam	/* 155 */
> -	.long sys_sched_setscheduler
> -	.long sys_sched_getscheduler
> -	.long sys_sched_yield
> -	.long sys_sched_get_priority_max
> -	.long sys_sched_get_priority_min  /* 160 */
> -	.long sys_sched_rr_get_interval
> -	.long sys_nanosleep
> -	.long sys_mremap
> -	.long sys_setresuid16
> -	.long sys_getresuid16	/* 165 */
> -	.long sys_getpagesize
> -	.long sys_ni_syscall		/* old sys_query_module */
> -	.long sys_poll
> -	.long sys_nfsservctl
> -	.long sys_setresgid16	/* 170 */
> -	.long sys_getresgid16
> -	.long sys_prctl
> -	.long sys_rt_sigreturn
> -	.long sys_rt_sigaction
> -	.long sys_rt_sigprocmask	/* 175 */
> -	.long sys_rt_sigpending
> -	.long sys_rt_sigtimedwait
> -	.long sys_rt_sigqueueinfo
> -	.long sys_rt_sigsuspend
> -	.long sys_pread64	/* 180 */
> -	.long sys_pwrite64
> -	.long sys_lchown16;
> -	.long sys_getcwd
> -	.long sys_capget
> -	.long sys_capset	/* 185 */
> -	.long sys_sigaltstack
> -	.long sys_sendfile
> -	.long sys_ni_syscall				/* streams1 */
> -	.long sys_ni_syscall				/* streams2 */
> -	.long sys_vfork		/* 190 */
> -	.long sys_getrlimit
> -	.long sys_mmap2
> -	.long sys_truncate64
> -	.long sys_ftruncate64
> -	.long sys_stat64	/* 195 */
> -	.long sys_lstat64
> -	.long sys_fstat64
> -	.long sys_chown
> -	.long sys_getuid
> -	.long sys_getgid	/* 200 */
> -	.long sys_geteuid
> -	.long sys_getegid
> -	.long sys_setreuid
> -	.long sys_setregid
> -	.long sys_getgroups	/* 205 */
> -	.long sys_setgroups
> -	.long sys_fchown
> -	.long sys_setresuid
> -	.long sys_getresuid
> -	.long sys_setresgid	/* 210 */
> -	.long sys_getresgid
> -	.long sys_lchown
> -	.long sys_setuid
> -	.long sys_setgid
> -	.long sys_setfsuid	/* 215 */
> -	.long sys_setfsgid
> -	.long sys_pivot_root
> -	.long sys_ni_syscall
> -	.long sys_ni_syscall
> -	.long sys_getdents64	/* 220 */
> -	.long sys_gettid
> -	.long sys_tkill
> -	.long sys_setxattr
> -	.long sys_lsetxattr
> -	.long sys_fsetxattr	/* 225 */
> -	.long sys_getxattr
> -	.long sys_lgetxattr
> -	.long sys_fgetxattr
> -	.long sys_listxattr
> -	.long sys_llistxattr	/* 230 */
> -	.long sys_flistxattr
> -	.long sys_removexattr
> -	.long sys_lremovexattr
> -	.long sys_fremovexattr
> -	.long sys_futex		/* 235 */
> -	.long sys_sendfile64
> -	.long sys_mincore
> -	.long sys_madvise
> -	.long sys_fcntl64
> -	.long sys_readahead	/* 240 */
> -	.long sys_io_setup
> -	.long sys_io_destroy
> -	.long sys_io_getevents
> -	.long sys_io_submit
> -	.long sys_io_cancel	/* 245 */
> -	.long sys_fadvise64
> -	.long sys_exit_group
> -	.long sys_lookup_dcookie
> -	.long sys_epoll_create
> -	.long sys_epoll_ctl	/* 250 */
> -	.long sys_epoll_wait
> -	.long sys_remap_file_pages
> -	.long sys_set_tid_address
> -	.long sys_timer_create
> -	.long sys_timer_settime	/* 255 */
> -	.long sys_timer_gettime
> -	.long sys_timer_getoverrun
> -	.long sys_timer_delete
> -	.long sys_clock_settime
> -	.long sys_clock_gettime	/* 260 */
> -	.long sys_clock_getres
> -	.long sys_clock_nanosleep
> -	.long sys_statfs64
> -	.long sys_fstatfs64
> -	.long sys_tgkill	/* 265 */
> -	.long sys_utimes
> -	.long sys_fadvise64_64
> -	.long sys_mbind
> -	.long sys_get_mempolicy
> -	.long sys_set_mempolicy	/* 270 */
> -	.long sys_mq_open
> -	.long sys_mq_unlink
> -	.long sys_mq_timedsend
> -	.long sys_mq_timedreceive
> -	.long sys_mq_notify	/* 275 */
> -	.long sys_mq_getsetattr
> -	.long sys_waitid
> -	.long sys_ni_syscall	/* for sys_vserver */
> -	.long sys_add_key
> -	.long sys_request_key	/* 280 */
> -	.long sys_keyctl
> -	.long sys_ioprio_set
> -	.long sys_ioprio_get
> -	.long sys_inotify_init
> -	.long sys_inotify_add_watch	/* 285 */
> -	.long sys_inotify_rm_watch
> -	.long sys_migrate_pages
> -	.long sys_openat
> -	.long sys_mkdirat
> -	.long sys_mknodat		/* 290 */
> -	.long sys_fchownat
> -	.long sys_futimesat
> -	.long sys_fstatat64
> -	.long sys_unlinkat
> -	.long sys_renameat		/* 295 */
> -	.long sys_linkat
> -	.long sys_symlinkat
> -	.long sys_readlinkat
> -	.long sys_fchmodat
> -	.long sys_faccessat		/* 300 */
> -	.long sys_ni_syscall		/* Reserved for pselect6 */
> -	.long sys_ni_syscall		/* Reserved for ppoll */
> -	.long sys_unshare
> -	.long sys_set_robust_list
> -	.long sys_get_robust_list	/* 305 */
> -	.long sys_splice
> -	.long sys_sync_file_range
> -	.long sys_tee
> -	.long sys_vmsplice
> -	.long sys_move_pages		/* 310 */
> -	.long sys_sched_setaffinity
> -	.long sys_sched_getaffinity
> -	.long sys_kexec_load
> -	.long sys_getcpu
> -	.long sys_epoll_pwait		/* 315 */
> -	.long sys_utimensat
> -	.long sys_signalfd
> -	.long sys_timerfd_create
> -	.long sys_eventfd
> -	.long sys_fallocate		/* 320 */
> -	.long sys_timerfd_settime
> -	.long sys_timerfd_gettime
> -	.long sys_signalfd4
> -	.long sys_eventfd2
> -	.long sys_epoll_create1		/* 325 */
> -	.long sys_dup3
> -	.long sys_pipe2
> -	.long sys_inotify_init1
> -	.long sys_preadv
> -	.long sys_pwritev		/* 330 */
> -	.long sys_rt_tgsigqueueinfo
> -	.long sys_perf_event_open
> -	.long sys_get_thread_area
> -	.long sys_set_thread_area
> -	.long sys_atomic_cmpxchg_32	/* 335 */
> -	.long sys_atomic_barrier
> -	.long sys_fanotify_init
> -	.long sys_fanotify_mark
> -	.long sys_prlimit64
> -	.long sys_name_to_handle_at	/* 340 */
> -	.long sys_open_by_handle_at
> -	.long sys_clock_adjtime
> -	.long sys_syncfs
> -
> diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
> index 9b8393d..0284192 100644
> --- a/arch/m68k/kernel/syscalltable.S
> +++ b/arch/m68k/kernel/syscalltable.S
> @@ -1,6 +1,4 @@
>   /*
> - *  linux/arch/m68knommu/kernel/syscalltable.S
> - *
>    *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
>    *
>    *  Based on older entry.S files, the following copyrights apply:
> @@ -9,171 +7,176 @@
>    *                      Kenneth Albanowski<kjahds@kjahds.com>,
>    *  Copyright (C) 2000  Lineo Inc. (www.lineo.com)
>    *  Copyright (C) 1991, 1992  Linus Torvalds
> + *
> + *  Linux/m68k support by Hamish Macdonald
>    */
>
>   #include<linux/sys.h>
>   #include<linux/linkage.h>
> -#include<asm/unistd.h>
>
> -.text
> +#ifndef CONFIG_MMU
> +#define sys_mmap2		sys_mmap_pgoff
> +#endif
> +
> +.section .rodata
>   ALIGN
>   ENTRY(sys_call_table)
> -	.long sys_restart_syscall	/* 0  -  old "setup()" system call */
> +	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
>   	.long sys_exit
>   	.long sys_fork
>   	.long sys_read
>   	.long sys_write
> -	.long sys_open		/* 5 */
> +	.long sys_open			/* 5 */
>   	.long sys_close
>   	.long sys_waitpid
>   	.long sys_creat
>   	.long sys_link
> -	.long sys_unlink	/* 10 */
> +	.long sys_unlink		/* 10 */
>   	.long sys_execve
>   	.long sys_chdir
>   	.long sys_time
>   	.long sys_mknod
> -	.long sys_chmod		/* 15 */
> +	.long sys_chmod			/* 15 */
>   	.long sys_chown16
> -	.long sys_ni_syscall	/* old break syscall holder */
> +	.long sys_ni_syscall		/* old break syscall holder */
>   	.long sys_stat
>   	.long sys_lseek
> -	.long sys_getpid	/* 20 */
> +	.long sys_getpid		/* 20 */
>   	.long sys_mount
>   	.long sys_oldumount
>   	.long sys_setuid16
>   	.long sys_getuid16
> -	.long sys_stime		/* 25 */
> +	.long sys_stime			/* 25 */
>   	.long sys_ptrace
>   	.long sys_alarm
>   	.long sys_fstat
>   	.long sys_pause
> -	.long sys_utime		/* 30 */
> -	.long sys_ni_syscall	/* old stty syscall holder */
> -	.long sys_ni_syscall	/* old gtty syscall holder */
> +	.long sys_utime			/* 30 */
> +	.long sys_ni_syscall		/* old stty syscall holder */
> +	.long sys_ni_syscall		/* old gtty syscall holder */
>   	.long sys_access
>   	.long sys_nice
> -	.long sys_ni_syscall	/* 35 */ /* old ftime syscall holder */
> +	.long sys_ni_syscall		/* 35 - old ftime syscall holder */
>   	.long sys_sync
>   	.long sys_kill
>   	.long sys_rename
>   	.long sys_mkdir
> -	.long sys_rmdir		/* 40 */
> +	.long sys_rmdir			/* 40 */
>   	.long sys_dup
>   	.long sys_pipe
>   	.long sys_times
> -	.long sys_ni_syscall	/* old prof syscall holder */
> -	.long sys_brk		/* 45 */
> +	.long sys_ni_syscall		/* old prof syscall holder */
> +	.long sys_brk			/* 45 */
>   	.long sys_setgid16
>   	.long sys_getgid16
>   	.long sys_signal
>   	.long sys_geteuid16
> -	.long sys_getegid16	/* 50 */
> +	.long sys_getegid16		/* 50 */
>   	.long sys_acct
> -	.long sys_umount	/* recycled never used phys() */
> -	.long sys_ni_syscall	/* old lock syscall holder */
> +	.long sys_umount		/* recycled never used phys() */
> +	.long sys_ni_syscall		/* old lock syscall holder */
>   	.long sys_ioctl
> -	.long sys_fcntl		/* 55 */
> -	.long sys_ni_syscall	/* old mpx syscall holder */
> +	.long sys_fcntl			/* 55 */
> +	.long sys_ni_syscall		/* old mpx syscall holder */
>   	.long sys_setpgid
> -	.long sys_ni_syscall	/* old ulimit syscall holder */
> +	.long sys_ni_syscall		/* old ulimit syscall holder */
>   	.long sys_ni_syscall
> -	.long sys_umask		/* 60 */
> +	.long sys_umask			/* 60 */
>   	.long sys_chroot
>   	.long sys_ustat
>   	.long sys_dup2
>   	.long sys_getppid
> -	.long sys_getpgrp	/* 65 */
> +	.long sys_getpgrp		/* 65 */
>   	.long sys_setsid
>   	.long sys_sigaction
>   	.long sys_sgetmask
>   	.long sys_ssetmask
> -	.long sys_setreuid16	/* 70 */
> +	.long sys_setreuid16		/* 70 */
>   	.long sys_setregid16
>   	.long sys_sigsuspend
>   	.long sys_sigpending
>   	.long sys_sethostname
> -	.long sys_setrlimit	/* 75 */
> +	.long sys_setrlimit		/* 75 */
>   	.long sys_old_getrlimit
>   	.long sys_getrusage
>   	.long sys_gettimeofday
>   	.long sys_settimeofday
> -	.long sys_getgroups16	/* 80 */
> +	.long sys_getgroups16		/* 80 */
>   	.long sys_setgroups16
>   	.long sys_old_select
>   	.long sys_symlink
>   	.long sys_lstat
> -	.long sys_readlink	/* 85 */
> +	.long sys_readlink		/* 85 */
>   	.long sys_uselib
> -	.long sys_ni_syscall	/* sys_swapon */
> +	.long sys_swapon
>   	.long sys_reboot
>   	.long sys_old_readdir
> -	.long sys_old_mmap	/* 90 */
> +	.long sys_old_mmap		/* 90 */
>   	.long sys_munmap
>   	.long sys_truncate
>   	.long sys_ftruncate
>   	.long sys_fchmod
> -	.long sys_fchown16	/* 95 */
> +	.long sys_fchown16		/* 95 */
>   	.long sys_getpriority
>   	.long sys_setpriority
> -	.long sys_ni_syscall	/* old profil syscall holder */
> +	.long sys_ni_syscall		/* old profil syscall holder */
>   	.long sys_statfs
> -	.long sys_fstatfs	/* 100 */
> -	.long sys_ni_syscall	/* ioperm for i386 */
> +	.long sys_fstatfs		/* 100 */
> +	.long sys_ni_syscall		/* ioperm for i386 */
>   	.long sys_socketcall
>   	.long sys_syslog
>   	.long sys_setitimer
> -	.long sys_getitimer	/* 105 */
> +	.long sys_getitimer		/* 105 */
>   	.long sys_newstat
>   	.long sys_newlstat
>   	.long sys_newfstat
>   	.long sys_ni_syscall
> -	.long sys_ni_syscall	/* iopl for i386 */ /* 110 */
> +	.long sys_ni_syscall		/* 110 - iopl for i386 */
>   	.long sys_vhangup
> -	.long sys_ni_syscall	/* obsolete idle() syscall */
> -	.long sys_ni_syscall	/* vm86old for i386 */
> +	.long sys_ni_syscall		/* obsolete idle() syscall */
> +	.long sys_ni_syscall		/* vm86old for i386 */
>   	.long sys_wait4
> -	.long sys_ni_syscall	/* 115 */ /* sys_swapoff */
> +	.long sys_swapoff		/* 115 */
>   	.long sys_sysinfo
>   	.long sys_ipc
>   	.long sys_fsync
>   	.long sys_sigreturn
> -	.long sys_clone		/* 120 */
> +	.long sys_clone			/* 120 */
>   	.long sys_setdomainname
>   	.long sys_newuname
> -	.long sys_cacheflush	/* modify_ldt for i386 */
> +	.long sys_cacheflush		/* modify_ldt for i386 */
>   	.long sys_adjtimex
> -	.long sys_ni_syscall	/* 125 */ /* sys_mprotect */
> +	.long sys_mprotect		/* 125 */
>   	.long sys_sigprocmask
> -	.long sys_ni_syscall	/* old "creat_module" */
> +	.long sys_ni_syscall		/* old "create_module" */
>   	.long sys_init_module
>   	.long sys_delete_module
> -	.long sys_ni_syscall	/* 130: old "get_kernel_syms" */
> +	.long sys_ni_syscall		/* 130 - old "get_kernel_syms" */
>   	.long sys_quotactl
>   	.long sys_getpgid
>   	.long sys_fchdir
>   	.long sys_bdflush
> -	.long sys_sysfs		/* 135 */
> +	.long sys_sysfs			/* 135 */
>   	.long sys_personality
> -	.long sys_ni_syscall	/* for afs_syscall */
> +	.long sys_ni_syscall		/* for afs_syscall */
>   	.long sys_setfsuid16
>   	.long sys_setfsgid16
> -	.long sys_llseek	/* 140 */
> +	.long sys_llseek		/* 140 */
>   	.long sys_getdents
>   	.long sys_select
>   	.long sys_flock
> -	.long sys_ni_syscall	/* sys_msync */
> -	.long sys_readv		/* 145 */
> +	.long sys_msync
> +	.long sys_readv			/* 145 */
>   	.long sys_writev
>   	.long sys_getsid
>   	.long sys_fdatasync
>   	.long sys_sysctl
> -	.long sys_ni_syscall	/* 150 */ /* sys_mlock */
> -	.long sys_ni_syscall	/* sys_munlock */
> -	.long sys_ni_syscall	/* sys_mlockall */
> -	.long sys_ni_syscall	/* sys_munlockall */
> +	.long sys_mlock			/* 150 */
> +	.long sys_munlock
> +	.long sys_mlockall
> +	.long sys_munlockall
>   	.long sys_sched_setparam
> -	.long sys_sched_getparam /* 155 */
> +	.long sys_sched_getparam	/* 155 */
>   	.long sys_sched_setscheduler
>   	.long sys_sched_getscheduler
>   	.long sys_sched_yield
> @@ -181,124 +184,124 @@ ENTRY(sys_call_table)
>   	.long sys_sched_get_priority_min  /* 160 */
>   	.long sys_sched_rr_get_interval
>   	.long sys_nanosleep
> -	.long sys_ni_syscall	/* sys_mremap */
> +	.long sys_mremap
>   	.long sys_setresuid16
> -	.long sys_getresuid16	/* 165 */
> -	.long sys_getpagesize	/* sys_getpagesize */
> -	.long sys_ni_syscall	/* old "query_module" */
> +	.long sys_getresuid16		/* 165 */
> +	.long sys_getpagesize
> +	.long sys_ni_syscall		/* old "query_module" */
>   	.long sys_poll
> -	.long sys_ni_syscall	/* sys_nfsservctl */
> -	.long sys_setresgid16	/* 170 */
> +	.long sys_nfsservctl
> +	.long sys_setresgid16		/* 170 */
>   	.long sys_getresgid16
>   	.long sys_prctl
>   	.long sys_rt_sigreturn
>   	.long sys_rt_sigaction
> -	.long sys_rt_sigprocmask /* 175 */
> +	.long sys_rt_sigprocmask	/* 175 */
>   	.long sys_rt_sigpending
>   	.long sys_rt_sigtimedwait
>   	.long sys_rt_sigqueueinfo
>   	.long sys_rt_sigsuspend
> -	.long sys_pread64	/* 180 */
> +	.long sys_pread64		/* 180 */
>   	.long sys_pwrite64
>   	.long sys_lchown16
>   	.long sys_getcwd
>   	.long sys_capget
> -	.long sys_capset	/* 185 */
> +	.long sys_capset		/* 185 */
>   	.long sys_sigaltstack
>   	.long sys_sendfile
> -	.long sys_ni_syscall	/* streams1 */
> -	.long sys_ni_syscall	/* streams2 */
> -	.long sys_vfork		/* 190 */
> +	.long sys_ni_syscall		/* streams1 */
> +	.long sys_ni_syscall		/* streams2 */
> +	.long sys_vfork			/* 190 */
>   	.long sys_getrlimit
> -	.long sys_mmap_pgoff
> +	.long sys_mmap2
>   	.long sys_truncate64
>   	.long sys_ftruncate64
> -	.long sys_stat64	/* 195 */
> +	.long sys_stat64		/* 195 */
>   	.long sys_lstat64
>   	.long sys_fstat64
>   	.long sys_chown
>   	.long sys_getuid
> -	.long sys_getgid	/* 200 */
> +	.long sys_getgid		/* 200 */
>   	.long sys_geteuid
>   	.long sys_getegid
>   	.long sys_setreuid
>   	.long sys_setregid
> -	.long sys_getgroups	/* 205 */
> +	.long sys_getgroups		/* 205 */
>   	.long sys_setgroups
>   	.long sys_fchown
>   	.long sys_setresuid
>   	.long sys_getresuid
> -	.long sys_setresgid	/* 210 */
> +	.long sys_setresgid		/* 210 */
>   	.long sys_getresgid
>   	.long sys_lchown
>   	.long sys_setuid
>   	.long sys_setgid
> -	.long sys_setfsuid	/* 215 */
> +	.long sys_setfsuid		/* 215 */
>   	.long sys_setfsgid
>   	.long sys_pivot_root
>   	.long sys_ni_syscall
>   	.long sys_ni_syscall
> -	.long sys_getdents64	/* 220 */
> +	.long sys_getdents64		/* 220 */
>   	.long sys_gettid
>   	.long sys_tkill
>   	.long sys_setxattr
>   	.long sys_lsetxattr
> -	.long sys_fsetxattr	/* 225 */
> +	.long sys_fsetxattr		/* 225 */
>   	.long sys_getxattr
>   	.long sys_lgetxattr
>   	.long sys_fgetxattr
>   	.long sys_listxattr
> -	.long sys_llistxattr	/* 230 */
> +	.long sys_llistxattr		/* 230 */
>   	.long sys_flistxattr
>   	.long sys_removexattr
>   	.long sys_lremovexattr
>   	.long sys_fremovexattr
> -	.long sys_futex		/* 235 */
> +	.long sys_futex			/* 235 */
>   	.long sys_sendfile64
> -	.long sys_ni_syscall	/* sys_mincore */
> -	.long sys_ni_syscall	/* sys_madvise */
> +	.long sys_mincore
> +	.long sys_madvise
>   	.long sys_fcntl64
> -	.long sys_readahead	/* 240 */
> +	.long sys_readahead		/* 240 */
>   	.long sys_io_setup
>   	.long sys_io_destroy
>   	.long sys_io_getevents
>   	.long sys_io_submit
> -	.long sys_io_cancel	/* 245 */
> +	.long sys_io_cancel		/* 245 */
>   	.long sys_fadvise64
>   	.long sys_exit_group
>   	.long sys_lookup_dcookie
>   	.long sys_epoll_create
> -	.long sys_epoll_ctl	/* 250 */
> +	.long sys_epoll_ctl		/* 250 */
>   	.long sys_epoll_wait
> -	.long sys_ni_syscall	/* sys_remap_file_pages */
> +	.long sys_remap_file_pages
>   	.long sys_set_tid_address
>   	.long sys_timer_create
> -	.long sys_timer_settime	/* 255 */
> +	.long sys_timer_settime		/* 255 */
>   	.long sys_timer_gettime
>   	.long sys_timer_getoverrun
>   	.long sys_timer_delete
>   	.long sys_clock_settime
> -	.long sys_clock_gettime	/* 260 */
> +	.long sys_clock_gettime		/* 260 */
>   	.long sys_clock_getres
>   	.long sys_clock_nanosleep
>   	.long sys_statfs64
>   	.long sys_fstatfs64
> -	.long sys_tgkill	/* 265 */
> +	.long sys_tgkill		/* 265 */
>   	.long sys_utimes
>   	.long sys_fadvise64_64
> -	.long sys_mbind	
> +	.long sys_mbind
>   	.long sys_get_mempolicy
> -	.long sys_set_mempolicy	/* 270 */
> +	.long sys_set_mempolicy		/* 270 */
>   	.long sys_mq_open
>   	.long sys_mq_unlink
>   	.long sys_mq_timedsend
>   	.long sys_mq_timedreceive
> -	.long sys_mq_notify	/* 275 */
> +	.long sys_mq_notify		/* 275 */
>   	.long sys_mq_getsetattr
>   	.long sys_waitid
> -	.long sys_ni_syscall	/* for sys_vserver */
> +	.long sys_ni_syscall		/* for sys_vserver */
>   	.long sys_add_key
> -	.long sys_request_key	/* 280 */
> +	.long sys_request_key		/* 280 */
>   	.long sys_keyctl
>   	.long sys_ioprio_set
>   	.long sys_ioprio_get
> @@ -363,7 +366,3 @@ ENTRY(sys_call_table)
>   	.long sys_clock_adjtime
>   	.long sys_syncfs
>
> -	.rept NR_syscalls-(.-sys_call_table)/4
> -		.long sys_ni_syscall
> -	.endr
> -


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-04 22:18   ` Greg Ungerer
  0 siblings, 0 replies; 35+ messages in thread
From: Greg Ungerer @ 2011-05-04 22:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux/m68k, Greg Ungerer, Arnd Bergmann,
	Linux Kernel Development, uClinux list

Hi Geert,

On 05/05/11 04:37, Geert Uytterhoeven wrote:
> Impact for nommu:
>    - Store table in .rodata instead of .text,
>    - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>    - Implement sys_mremap and sys_nfsservct,
>    - Remove unused padding at the end of the table.
>
> Impact for mmu:
>    - Store table in .rodata instead of .data.
>
> Signed-off-by: Geert Uytterhoeven<geert@linux-m68k.org>
> ---
> v2: Store table in .rodata instead of .data.
> v3: Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>      Implement sys_mremap and sys_nfsservct.
>
> Greg, if it's OK for you, I'll add this to my for-2.6.40 branch.

Yep, looks good.

Acked-by: Greg Ungerer <gerg@uclinux.org>

Thanks
Greg


>   arch/m68k/kernel/Makefile_mm    |    2 +-
>   arch/m68k/kernel/entry_mm.S     |  348 ---------------------------------------
>   arch/m68k/kernel/syscalltable.S |  191 +++++++++++-----------
>   3 files changed, 96 insertions(+), 445 deletions(-)
>
> diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
> index 55d5d6b..aced678 100644
> --- a/arch/m68k/kernel/Makefile_mm
> +++ b/arch/m68k/kernel/Makefile_mm
> @@ -10,7 +10,7 @@ endif
>   extra-y	+= vmlinux.lds
>
>   obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
> -	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
> +	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o
>
>   devres-y = ../../../kernel/irq/devres.o
>
> diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
> index 1359ee6..bd0ec05 100644
> --- a/arch/m68k/kernel/entry_mm.S
> +++ b/arch/m68k/kernel/entry_mm.S
> @@ -407,351 +407,3 @@ resume:
>
>   	rts
>
> -.data
> -ALIGN
> -sys_call_table:
> -	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
> -	.long sys_exit
> -	.long sys_fork
> -	.long sys_read
> -	.long sys_write
> -	.long sys_open		/* 5 */
> -	.long sys_close
> -	.long sys_waitpid
> -	.long sys_creat
> -	.long sys_link
> -	.long sys_unlink	/* 10 */
> -	.long sys_execve
> -	.long sys_chdir
> -	.long sys_time
> -	.long sys_mknod
> -	.long sys_chmod		/* 15 */
> -	.long sys_chown16
> -	.long sys_ni_syscall				/* old break syscall holder */
> -	.long sys_stat
> -	.long sys_lseek
> -	.long sys_getpid	/* 20 */
> -	.long sys_mount
> -	.long sys_oldumount
> -	.long sys_setuid16
> -	.long sys_getuid16
> -	.long sys_stime		/* 25 */
> -	.long sys_ptrace
> -	.long sys_alarm
> -	.long sys_fstat
> -	.long sys_pause
> -	.long sys_utime		/* 30 */
> -	.long sys_ni_syscall				/* old stty syscall holder */
> -	.long sys_ni_syscall				/* old gtty syscall holder */
> -	.long sys_access
> -	.long sys_nice
> -	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */
> -	.long sys_sync
> -	.long sys_kill
> -	.long sys_rename
> -	.long sys_mkdir
> -	.long sys_rmdir		/* 40 */
> -	.long sys_dup
> -	.long sys_pipe
> -	.long sys_times
> -	.long sys_ni_syscall				/* old prof syscall holder */
> -	.long sys_brk		/* 45 */
> -	.long sys_setgid16
> -	.long sys_getgid16
> -	.long sys_signal
> -	.long sys_geteuid16
> -	.long sys_getegid16	/* 50 */
> -	.long sys_acct
> -	.long sys_umount				/* recycled never used phys() */
> -	.long sys_ni_syscall				/* old lock syscall holder */
> -	.long sys_ioctl
> -	.long sys_fcntl		/* 55 */
> -	.long sys_ni_syscall				/* old mpx syscall holder */
> -	.long sys_setpgid
> -	.long sys_ni_syscall				/* old ulimit syscall holder */
> -	.long sys_ni_syscall
> -	.long sys_umask		/* 60 */
> -	.long sys_chroot
> -	.long sys_ustat
> -	.long sys_dup2
> -	.long sys_getppid
> -	.long sys_getpgrp	/* 65 */
> -	.long sys_setsid
> -	.long sys_sigaction
> -	.long sys_sgetmask
> -	.long sys_ssetmask
> -	.long sys_setreuid16	/* 70 */
> -	.long sys_setregid16
> -	.long sys_sigsuspend
> -	.long sys_sigpending
> -	.long sys_sethostname
> -	.long sys_setrlimit	/* 75 */
> -	.long sys_old_getrlimit
> -	.long sys_getrusage
> -	.long sys_gettimeofday
> -	.long sys_settimeofday
> -	.long sys_getgroups16	/* 80 */
> -	.long sys_setgroups16
> -	.long sys_old_select
> -	.long sys_symlink
> -	.long sys_lstat
> -	.long sys_readlink	/* 85 */
> -	.long sys_uselib
> -	.long sys_swapon
> -	.long sys_reboot
> -	.long sys_old_readdir
> -	.long sys_old_mmap	/* 90 */
> -	.long sys_munmap
> -	.long sys_truncate
> -	.long sys_ftruncate
> -	.long sys_fchmod
> -	.long sys_fchown16	/* 95 */
> -	.long sys_getpriority
> -	.long sys_setpriority
> -	.long sys_ni_syscall				/* old profil syscall holder */
> -	.long sys_statfs
> -	.long sys_fstatfs	/* 100 */
> -	.long sys_ni_syscall				/* ioperm for i386 */
> -	.long sys_socketcall
> -	.long sys_syslog
> -	.long sys_setitimer
> -	.long sys_getitimer	/* 105 */
> -	.long sys_newstat
> -	.long sys_newlstat
> -	.long sys_newfstat
> -	.long sys_ni_syscall
> -	.long sys_ni_syscall	/* 110 */	/* iopl for i386 */
> -	.long sys_vhangup
> -	.long sys_ni_syscall				/* obsolete idle() syscall */
> -	.long sys_ni_syscall				/* vm86old for i386 */
> -	.long sys_wait4
> -	.long sys_swapoff	/* 115 */
> -	.long sys_sysinfo
> -	.long sys_ipc
> -	.long sys_fsync
> -	.long sys_sigreturn
> -	.long sys_clone		/* 120 */
> -	.long sys_setdomainname
> -	.long sys_newuname
> -	.long sys_cacheflush				/* modify_ldt for i386 */
> -	.long sys_adjtimex
> -	.long sys_mprotect	/* 125 */
> -	.long sys_sigprocmask
> -	.long sys_ni_syscall		/* old "create_module" */
> -	.long sys_init_module
> -	.long sys_delete_module
> -	.long sys_ni_syscall	/* 130 - old "get_kernel_syms" */
> -	.long sys_quotactl
> -	.long sys_getpgid
> -	.long sys_fchdir
> -	.long sys_bdflush
> -	.long sys_sysfs		/* 135 */
> -	.long sys_personality
> -	.long sys_ni_syscall				/* for afs_syscall */
> -	.long sys_setfsuid16
> -	.long sys_setfsgid16
> -	.long sys_llseek	/* 140 */
> -	.long sys_getdents
> -	.long sys_select
> -	.long sys_flock
> -	.long sys_msync
> -	.long sys_readv		/* 145 */
> -	.long sys_writev
> -	.long sys_getsid
> -	.long sys_fdatasync
> -	.long sys_sysctl
> -	.long sys_mlock		/* 150 */
> -	.long sys_munlock
> -	.long sys_mlockall
> -	.long sys_munlockall
> -	.long sys_sched_setparam
> -	.long sys_sched_getparam	/* 155 */
> -	.long sys_sched_setscheduler
> -	.long sys_sched_getscheduler
> -	.long sys_sched_yield
> -	.long sys_sched_get_priority_max
> -	.long sys_sched_get_priority_min  /* 160 */
> -	.long sys_sched_rr_get_interval
> -	.long sys_nanosleep
> -	.long sys_mremap
> -	.long sys_setresuid16
> -	.long sys_getresuid16	/* 165 */
> -	.long sys_getpagesize
> -	.long sys_ni_syscall		/* old sys_query_module */
> -	.long sys_poll
> -	.long sys_nfsservctl
> -	.long sys_setresgid16	/* 170 */
> -	.long sys_getresgid16
> -	.long sys_prctl
> -	.long sys_rt_sigreturn
> -	.long sys_rt_sigaction
> -	.long sys_rt_sigprocmask	/* 175 */
> -	.long sys_rt_sigpending
> -	.long sys_rt_sigtimedwait
> -	.long sys_rt_sigqueueinfo
> -	.long sys_rt_sigsuspend
> -	.long sys_pread64	/* 180 */
> -	.long sys_pwrite64
> -	.long sys_lchown16;
> -	.long sys_getcwd
> -	.long sys_capget
> -	.long sys_capset	/* 185 */
> -	.long sys_sigaltstack
> -	.long sys_sendfile
> -	.long sys_ni_syscall				/* streams1 */
> -	.long sys_ni_syscall				/* streams2 */
> -	.long sys_vfork		/* 190 */
> -	.long sys_getrlimit
> -	.long sys_mmap2
> -	.long sys_truncate64
> -	.long sys_ftruncate64
> -	.long sys_stat64	/* 195 */
> -	.long sys_lstat64
> -	.long sys_fstat64
> -	.long sys_chown
> -	.long sys_getuid
> -	.long sys_getgid	/* 200 */
> -	.long sys_geteuid
> -	.long sys_getegid
> -	.long sys_setreuid
> -	.long sys_setregid
> -	.long sys_getgroups	/* 205 */
> -	.long sys_setgroups
> -	.long sys_fchown
> -	.long sys_setresuid
> -	.long sys_getresuid
> -	.long sys_setresgid	/* 210 */
> -	.long sys_getresgid
> -	.long sys_lchown
> -	.long sys_setuid
> -	.long sys_setgid
> -	.long sys_setfsuid	/* 215 */
> -	.long sys_setfsgid
> -	.long sys_pivot_root
> -	.long sys_ni_syscall
> -	.long sys_ni_syscall
> -	.long sys_getdents64	/* 220 */
> -	.long sys_gettid
> -	.long sys_tkill
> -	.long sys_setxattr
> -	.long sys_lsetxattr
> -	.long sys_fsetxattr	/* 225 */
> -	.long sys_getxattr
> -	.long sys_lgetxattr
> -	.long sys_fgetxattr
> -	.long sys_listxattr
> -	.long sys_llistxattr	/* 230 */
> -	.long sys_flistxattr
> -	.long sys_removexattr
> -	.long sys_lremovexattr
> -	.long sys_fremovexattr
> -	.long sys_futex		/* 235 */
> -	.long sys_sendfile64
> -	.long sys_mincore
> -	.long sys_madvise
> -	.long sys_fcntl64
> -	.long sys_readahead	/* 240 */
> -	.long sys_io_setup
> -	.long sys_io_destroy
> -	.long sys_io_getevents
> -	.long sys_io_submit
> -	.long sys_io_cancel	/* 245 */
> -	.long sys_fadvise64
> -	.long sys_exit_group
> -	.long sys_lookup_dcookie
> -	.long sys_epoll_create
> -	.long sys_epoll_ctl	/* 250 */
> -	.long sys_epoll_wait
> -	.long sys_remap_file_pages
> -	.long sys_set_tid_address
> -	.long sys_timer_create
> -	.long sys_timer_settime	/* 255 */
> -	.long sys_timer_gettime
> -	.long sys_timer_getoverrun
> -	.long sys_timer_delete
> -	.long sys_clock_settime
> -	.long sys_clock_gettime	/* 260 */
> -	.long sys_clock_getres
> -	.long sys_clock_nanosleep
> -	.long sys_statfs64
> -	.long sys_fstatfs64
> -	.long sys_tgkill	/* 265 */
> -	.long sys_utimes
> -	.long sys_fadvise64_64
> -	.long sys_mbind
> -	.long sys_get_mempolicy
> -	.long sys_set_mempolicy	/* 270 */
> -	.long sys_mq_open
> -	.long sys_mq_unlink
> -	.long sys_mq_timedsend
> -	.long sys_mq_timedreceive
> -	.long sys_mq_notify	/* 275 */
> -	.long sys_mq_getsetattr
> -	.long sys_waitid
> -	.long sys_ni_syscall	/* for sys_vserver */
> -	.long sys_add_key
> -	.long sys_request_key	/* 280 */
> -	.long sys_keyctl
> -	.long sys_ioprio_set
> -	.long sys_ioprio_get
> -	.long sys_inotify_init
> -	.long sys_inotify_add_watch	/* 285 */
> -	.long sys_inotify_rm_watch
> -	.long sys_migrate_pages
> -	.long sys_openat
> -	.long sys_mkdirat
> -	.long sys_mknodat		/* 290 */
> -	.long sys_fchownat
> -	.long sys_futimesat
> -	.long sys_fstatat64
> -	.long sys_unlinkat
> -	.long sys_renameat		/* 295 */
> -	.long sys_linkat
> -	.long sys_symlinkat
> -	.long sys_readlinkat
> -	.long sys_fchmodat
> -	.long sys_faccessat		/* 300 */
> -	.long sys_ni_syscall		/* Reserved for pselect6 */
> -	.long sys_ni_syscall		/* Reserved for ppoll */
> -	.long sys_unshare
> -	.long sys_set_robust_list
> -	.long sys_get_robust_list	/* 305 */
> -	.long sys_splice
> -	.long sys_sync_file_range
> -	.long sys_tee
> -	.long sys_vmsplice
> -	.long sys_move_pages		/* 310 */
> -	.long sys_sched_setaffinity
> -	.long sys_sched_getaffinity
> -	.long sys_kexec_load
> -	.long sys_getcpu
> -	.long sys_epoll_pwait		/* 315 */
> -	.long sys_utimensat
> -	.long sys_signalfd
> -	.long sys_timerfd_create
> -	.long sys_eventfd
> -	.long sys_fallocate		/* 320 */
> -	.long sys_timerfd_settime
> -	.long sys_timerfd_gettime
> -	.long sys_signalfd4
> -	.long sys_eventfd2
> -	.long sys_epoll_create1		/* 325 */
> -	.long sys_dup3
> -	.long sys_pipe2
> -	.long sys_inotify_init1
> -	.long sys_preadv
> -	.long sys_pwritev		/* 330 */
> -	.long sys_rt_tgsigqueueinfo
> -	.long sys_perf_event_open
> -	.long sys_get_thread_area
> -	.long sys_set_thread_area
> -	.long sys_atomic_cmpxchg_32	/* 335 */
> -	.long sys_atomic_barrier
> -	.long sys_fanotify_init
> -	.long sys_fanotify_mark
> -	.long sys_prlimit64
> -	.long sys_name_to_handle_at	/* 340 */
> -	.long sys_open_by_handle_at
> -	.long sys_clock_adjtime
> -	.long sys_syncfs
> -
> diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
> index 9b8393d..0284192 100644
> --- a/arch/m68k/kernel/syscalltable.S
> +++ b/arch/m68k/kernel/syscalltable.S
> @@ -1,6 +1,4 @@
>   /*
> - *  linux/arch/m68knommu/kernel/syscalltable.S
> - *
>    *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
>    *
>    *  Based on older entry.S files, the following copyrights apply:
> @@ -9,171 +7,176 @@
>    *                      Kenneth Albanowski<kjahds@kjahds.com>,
>    *  Copyright (C) 2000  Lineo Inc. (www.lineo.com)
>    *  Copyright (C) 1991, 1992  Linus Torvalds
> + *
> + *  Linux/m68k support by Hamish Macdonald
>    */
>
>   #include<linux/sys.h>
>   #include<linux/linkage.h>
> -#include<asm/unistd.h>
>
> -.text
> +#ifndef CONFIG_MMU
> +#define sys_mmap2		sys_mmap_pgoff
> +#endif
> +
> +.section .rodata
>   ALIGN
>   ENTRY(sys_call_table)
> -	.long sys_restart_syscall	/* 0  -  old "setup()" system call */
> +	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
>   	.long sys_exit
>   	.long sys_fork
>   	.long sys_read
>   	.long sys_write
> -	.long sys_open		/* 5 */
> +	.long sys_open			/* 5 */
>   	.long sys_close
>   	.long sys_waitpid
>   	.long sys_creat
>   	.long sys_link
> -	.long sys_unlink	/* 10 */
> +	.long sys_unlink		/* 10 */
>   	.long sys_execve
>   	.long sys_chdir
>   	.long sys_time
>   	.long sys_mknod
> -	.long sys_chmod		/* 15 */
> +	.long sys_chmod			/* 15 */
>   	.long sys_chown16
> -	.long sys_ni_syscall	/* old break syscall holder */
> +	.long sys_ni_syscall		/* old break syscall holder */
>   	.long sys_stat
>   	.long sys_lseek
> -	.long sys_getpid	/* 20 */
> +	.long sys_getpid		/* 20 */
>   	.long sys_mount
>   	.long sys_oldumount
>   	.long sys_setuid16
>   	.long sys_getuid16
> -	.long sys_stime		/* 25 */
> +	.long sys_stime			/* 25 */
>   	.long sys_ptrace
>   	.long sys_alarm
>   	.long sys_fstat
>   	.long sys_pause
> -	.long sys_utime		/* 30 */
> -	.long sys_ni_syscall	/* old stty syscall holder */
> -	.long sys_ni_syscall	/* old gtty syscall holder */
> +	.long sys_utime			/* 30 */
> +	.long sys_ni_syscall		/* old stty syscall holder */
> +	.long sys_ni_syscall		/* old gtty syscall holder */
>   	.long sys_access
>   	.long sys_nice
> -	.long sys_ni_syscall	/* 35 */ /* old ftime syscall holder */
> +	.long sys_ni_syscall		/* 35 - old ftime syscall holder */
>   	.long sys_sync
>   	.long sys_kill
>   	.long sys_rename
>   	.long sys_mkdir
> -	.long sys_rmdir		/* 40 */
> +	.long sys_rmdir			/* 40 */
>   	.long sys_dup
>   	.long sys_pipe
>   	.long sys_times
> -	.long sys_ni_syscall	/* old prof syscall holder */
> -	.long sys_brk		/* 45 */
> +	.long sys_ni_syscall		/* old prof syscall holder */
> +	.long sys_brk			/* 45 */
>   	.long sys_setgid16
>   	.long sys_getgid16
>   	.long sys_signal
>   	.long sys_geteuid16
> -	.long sys_getegid16	/* 50 */
> +	.long sys_getegid16		/* 50 */
>   	.long sys_acct
> -	.long sys_umount	/* recycled never used phys() */
> -	.long sys_ni_syscall	/* old lock syscall holder */
> +	.long sys_umount		/* recycled never used phys() */
> +	.long sys_ni_syscall		/* old lock syscall holder */
>   	.long sys_ioctl
> -	.long sys_fcntl		/* 55 */
> -	.long sys_ni_syscall	/* old mpx syscall holder */
> +	.long sys_fcntl			/* 55 */
> +	.long sys_ni_syscall		/* old mpx syscall holder */
>   	.long sys_setpgid
> -	.long sys_ni_syscall	/* old ulimit syscall holder */
> +	.long sys_ni_syscall		/* old ulimit syscall holder */
>   	.long sys_ni_syscall
> -	.long sys_umask		/* 60 */
> +	.long sys_umask			/* 60 */
>   	.long sys_chroot
>   	.long sys_ustat
>   	.long sys_dup2
>   	.long sys_getppid
> -	.long sys_getpgrp	/* 65 */
> +	.long sys_getpgrp		/* 65 */
>   	.long sys_setsid
>   	.long sys_sigaction
>   	.long sys_sgetmask
>   	.long sys_ssetmask
> -	.long sys_setreuid16	/* 70 */
> +	.long sys_setreuid16		/* 70 */
>   	.long sys_setregid16
>   	.long sys_sigsuspend
>   	.long sys_sigpending
>   	.long sys_sethostname
> -	.long sys_setrlimit	/* 75 */
> +	.long sys_setrlimit		/* 75 */
>   	.long sys_old_getrlimit
>   	.long sys_getrusage
>   	.long sys_gettimeofday
>   	.long sys_settimeofday
> -	.long sys_getgroups16	/* 80 */
> +	.long sys_getgroups16		/* 80 */
>   	.long sys_setgroups16
>   	.long sys_old_select
>   	.long sys_symlink
>   	.long sys_lstat
> -	.long sys_readlink	/* 85 */
> +	.long sys_readlink		/* 85 */
>   	.long sys_uselib
> -	.long sys_ni_syscall	/* sys_swapon */
> +	.long sys_swapon
>   	.long sys_reboot
>   	.long sys_old_readdir
> -	.long sys_old_mmap	/* 90 */
> +	.long sys_old_mmap		/* 90 */
>   	.long sys_munmap
>   	.long sys_truncate
>   	.long sys_ftruncate
>   	.long sys_fchmod
> -	.long sys_fchown16	/* 95 */
> +	.long sys_fchown16		/* 95 */
>   	.long sys_getpriority
>   	.long sys_setpriority
> -	.long sys_ni_syscall	/* old profil syscall holder */
> +	.long sys_ni_syscall		/* old profil syscall holder */
>   	.long sys_statfs
> -	.long sys_fstatfs	/* 100 */
> -	.long sys_ni_syscall	/* ioperm for i386 */
> +	.long sys_fstatfs		/* 100 */
> +	.long sys_ni_syscall		/* ioperm for i386 */
>   	.long sys_socketcall
>   	.long sys_syslog
>   	.long sys_setitimer
> -	.long sys_getitimer	/* 105 */
> +	.long sys_getitimer		/* 105 */
>   	.long sys_newstat
>   	.long sys_newlstat
>   	.long sys_newfstat
>   	.long sys_ni_syscall
> -	.long sys_ni_syscall	/* iopl for i386 */ /* 110 */
> +	.long sys_ni_syscall		/* 110 - iopl for i386 */
>   	.long sys_vhangup
> -	.long sys_ni_syscall	/* obsolete idle() syscall */
> -	.long sys_ni_syscall	/* vm86old for i386 */
> +	.long sys_ni_syscall		/* obsolete idle() syscall */
> +	.long sys_ni_syscall		/* vm86old for i386 */
>   	.long sys_wait4
> -	.long sys_ni_syscall	/* 115 */ /* sys_swapoff */
> +	.long sys_swapoff		/* 115 */
>   	.long sys_sysinfo
>   	.long sys_ipc
>   	.long sys_fsync
>   	.long sys_sigreturn
> -	.long sys_clone		/* 120 */
> +	.long sys_clone			/* 120 */
>   	.long sys_setdomainname
>   	.long sys_newuname
> -	.long sys_cacheflush	/* modify_ldt for i386 */
> +	.long sys_cacheflush		/* modify_ldt for i386 */
>   	.long sys_adjtimex
> -	.long sys_ni_syscall	/* 125 */ /* sys_mprotect */
> +	.long sys_mprotect		/* 125 */
>   	.long sys_sigprocmask
> -	.long sys_ni_syscall	/* old "creat_module" */
> +	.long sys_ni_syscall		/* old "create_module" */
>   	.long sys_init_module
>   	.long sys_delete_module
> -	.long sys_ni_syscall	/* 130: old "get_kernel_syms" */
> +	.long sys_ni_syscall		/* 130 - old "get_kernel_syms" */
>   	.long sys_quotactl
>   	.long sys_getpgid
>   	.long sys_fchdir
>   	.long sys_bdflush
> -	.long sys_sysfs		/* 135 */
> +	.long sys_sysfs			/* 135 */
>   	.long sys_personality
> -	.long sys_ni_syscall	/* for afs_syscall */
> +	.long sys_ni_syscall		/* for afs_syscall */
>   	.long sys_setfsuid16
>   	.long sys_setfsgid16
> -	.long sys_llseek	/* 140 */
> +	.long sys_llseek		/* 140 */
>   	.long sys_getdents
>   	.long sys_select
>   	.long sys_flock
> -	.long sys_ni_syscall	/* sys_msync */
> -	.long sys_readv		/* 145 */
> +	.long sys_msync
> +	.long sys_readv			/* 145 */
>   	.long sys_writev
>   	.long sys_getsid
>   	.long sys_fdatasync
>   	.long sys_sysctl
> -	.long sys_ni_syscall	/* 150 */ /* sys_mlock */
> -	.long sys_ni_syscall	/* sys_munlock */
> -	.long sys_ni_syscall	/* sys_mlockall */
> -	.long sys_ni_syscall	/* sys_munlockall */
> +	.long sys_mlock			/* 150 */
> +	.long sys_munlock
> +	.long sys_mlockall
> +	.long sys_munlockall
>   	.long sys_sched_setparam
> -	.long sys_sched_getparam /* 155 */
> +	.long sys_sched_getparam	/* 155 */
>   	.long sys_sched_setscheduler
>   	.long sys_sched_getscheduler
>   	.long sys_sched_yield
> @@ -181,124 +184,124 @@ ENTRY(sys_call_table)
>   	.long sys_sched_get_priority_min  /* 160 */
>   	.long sys_sched_rr_get_interval
>   	.long sys_nanosleep
> -	.long sys_ni_syscall	/* sys_mremap */
> +	.long sys_mremap
>   	.long sys_setresuid16
> -	.long sys_getresuid16	/* 165 */
> -	.long sys_getpagesize	/* sys_getpagesize */
> -	.long sys_ni_syscall	/* old "query_module" */
> +	.long sys_getresuid16		/* 165 */
> +	.long sys_getpagesize
> +	.long sys_ni_syscall		/* old "query_module" */
>   	.long sys_poll
> -	.long sys_ni_syscall	/* sys_nfsservctl */
> -	.long sys_setresgid16	/* 170 */
> +	.long sys_nfsservctl
> +	.long sys_setresgid16		/* 170 */
>   	.long sys_getresgid16
>   	.long sys_prctl
>   	.long sys_rt_sigreturn
>   	.long sys_rt_sigaction
> -	.long sys_rt_sigprocmask /* 175 */
> +	.long sys_rt_sigprocmask	/* 175 */
>   	.long sys_rt_sigpending
>   	.long sys_rt_sigtimedwait
>   	.long sys_rt_sigqueueinfo
>   	.long sys_rt_sigsuspend
> -	.long sys_pread64	/* 180 */
> +	.long sys_pread64		/* 180 */
>   	.long sys_pwrite64
>   	.long sys_lchown16
>   	.long sys_getcwd
>   	.long sys_capget
> -	.long sys_capset	/* 185 */
> +	.long sys_capset		/* 185 */
>   	.long sys_sigaltstack
>   	.long sys_sendfile
> -	.long sys_ni_syscall	/* streams1 */
> -	.long sys_ni_syscall	/* streams2 */
> -	.long sys_vfork		/* 190 */
> +	.long sys_ni_syscall		/* streams1 */
> +	.long sys_ni_syscall		/* streams2 */
> +	.long sys_vfork			/* 190 */
>   	.long sys_getrlimit
> -	.long sys_mmap_pgoff
> +	.long sys_mmap2
>   	.long sys_truncate64
>   	.long sys_ftruncate64
> -	.long sys_stat64	/* 195 */
> +	.long sys_stat64		/* 195 */
>   	.long sys_lstat64
>   	.long sys_fstat64
>   	.long sys_chown
>   	.long sys_getuid
> -	.long sys_getgid	/* 200 */
> +	.long sys_getgid		/* 200 */
>   	.long sys_geteuid
>   	.long sys_getegid
>   	.long sys_setreuid
>   	.long sys_setregid
> -	.long sys_getgroups	/* 205 */
> +	.long sys_getgroups		/* 205 */
>   	.long sys_setgroups
>   	.long sys_fchown
>   	.long sys_setresuid
>   	.long sys_getresuid
> -	.long sys_setresgid	/* 210 */
> +	.long sys_setresgid		/* 210 */
>   	.long sys_getresgid
>   	.long sys_lchown
>   	.long sys_setuid
>   	.long sys_setgid
> -	.long sys_setfsuid	/* 215 */
> +	.long sys_setfsuid		/* 215 */
>   	.long sys_setfsgid
>   	.long sys_pivot_root
>   	.long sys_ni_syscall
>   	.long sys_ni_syscall
> -	.long sys_getdents64	/* 220 */
> +	.long sys_getdents64		/* 220 */
>   	.long sys_gettid
>   	.long sys_tkill
>   	.long sys_setxattr
>   	.long sys_lsetxattr
> -	.long sys_fsetxattr	/* 225 */
> +	.long sys_fsetxattr		/* 225 */
>   	.long sys_getxattr
>   	.long sys_lgetxattr
>   	.long sys_fgetxattr
>   	.long sys_listxattr
> -	.long sys_llistxattr	/* 230 */
> +	.long sys_llistxattr		/* 230 */
>   	.long sys_flistxattr
>   	.long sys_removexattr
>   	.long sys_lremovexattr
>   	.long sys_fremovexattr
> -	.long sys_futex		/* 235 */
> +	.long sys_futex			/* 235 */
>   	.long sys_sendfile64
> -	.long sys_ni_syscall	/* sys_mincore */
> -	.long sys_ni_syscall	/* sys_madvise */
> +	.long sys_mincore
> +	.long sys_madvise
>   	.long sys_fcntl64
> -	.long sys_readahead	/* 240 */
> +	.long sys_readahead		/* 240 */
>   	.long sys_io_setup
>   	.long sys_io_destroy
>   	.long sys_io_getevents
>   	.long sys_io_submit
> -	.long sys_io_cancel	/* 245 */
> +	.long sys_io_cancel		/* 245 */
>   	.long sys_fadvise64
>   	.long sys_exit_group
>   	.long sys_lookup_dcookie
>   	.long sys_epoll_create
> -	.long sys_epoll_ctl	/* 250 */
> +	.long sys_epoll_ctl		/* 250 */
>   	.long sys_epoll_wait
> -	.long sys_ni_syscall	/* sys_remap_file_pages */
> +	.long sys_remap_file_pages
>   	.long sys_set_tid_address
>   	.long sys_timer_create
> -	.long sys_timer_settime	/* 255 */
> +	.long sys_timer_settime		/* 255 */
>   	.long sys_timer_gettime
>   	.long sys_timer_getoverrun
>   	.long sys_timer_delete
>   	.long sys_clock_settime
> -	.long sys_clock_gettime	/* 260 */
> +	.long sys_clock_gettime		/* 260 */
>   	.long sys_clock_getres
>   	.long sys_clock_nanosleep
>   	.long sys_statfs64
>   	.long sys_fstatfs64
> -	.long sys_tgkill	/* 265 */
> +	.long sys_tgkill		/* 265 */
>   	.long sys_utimes
>   	.long sys_fadvise64_64
> -	.long sys_mbind	
> +	.long sys_mbind
>   	.long sys_get_mempolicy
> -	.long sys_set_mempolicy	/* 270 */
> +	.long sys_set_mempolicy		/* 270 */
>   	.long sys_mq_open
>   	.long sys_mq_unlink
>   	.long sys_mq_timedsend
>   	.long sys_mq_timedreceive
> -	.long sys_mq_notify	/* 275 */
> +	.long sys_mq_notify		/* 275 */
>   	.long sys_mq_getsetattr
>   	.long sys_waitid
> -	.long sys_ni_syscall	/* for sys_vserver */
> +	.long sys_ni_syscall		/* for sys_vserver */
>   	.long sys_add_key
> -	.long sys_request_key	/* 280 */
> +	.long sys_request_key		/* 280 */
>   	.long sys_keyctl
>   	.long sys_ioprio_set
>   	.long sys_ioprio_get
> @@ -363,7 +366,3 @@ ENTRY(sys_call_table)
>   	.long sys_clock_adjtime
>   	.long sys_syncfs
>
> -	.rept NR_syscalls-(.-sys_call_table)/4
> -		.long sys_ni_syscall
> -	.endr
> -


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-04 18:37 ` Geert Uytterhoeven
@ 2011-05-05  6:24   ` Arnd Bergmann
  -1 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2011-05-05  6:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Wednesday 04 May 2011, Geert Uytterhoeven wrote:
> Impact for nommu:
>   - Store table in .rodata instead of .text,
>   - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>   - Implement sys_mremap and sys_nfsservct,
>   - Remove unused padding at the end of the table.
> 
> Impact for mmu:
>   - Store table in .rodata instead of .data.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

What happened to the mmap syscall? IIRC, nommu is pointing to
a different symbol (sys_mmap_pgoff/sys_mmap2).

Did you check the macros in unistd to see if they match the
actual table? I guess it would be a good time to comment out
the ones that are not implemented in either of the two ABIs.

Otherwise, this patch looks good to me.

	Arnd

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-05  6:24   ` Arnd Bergmann
  0 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2011-05-05  6:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Wednesday 04 May 2011, Geert Uytterhoeven wrote:
> Impact for nommu:
>   - Store table in .rodata instead of .text,
>   - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>   - Implement sys_mremap and sys_nfsservct,
>   - Remove unused padding at the end of the table.
> 
> Impact for mmu:
>   - Store table in .rodata instead of .data.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

What happened to the mmap syscall? IIRC, nommu is pointing to
a different symbol (sys_mmap_pgoff/sys_mmap2).

Did you check the macros in unistd to see if they match the
actual table? I guess it would be a good time to comment out
the ones that are not implemented in either of the two ABIs.

Otherwise, this patch looks good to me.

	Arnd

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05  6:24   ` Arnd Bergmann
  (?)
  (?)
@ 2011-05-05  7:55   ` Greg Ungerer
  -1 siblings, 0 replies; 35+ messages in thread
From: Greg Ungerer @ 2011-05-05  7:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Geert Uytterhoeven, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Hi Arnd,

On 05/05/11 16:24, Arnd Bergmann wrote:
> On Wednesday 04 May 2011, Geert Uytterhoeven wrote:
>> Impact for nommu:
>>    - Store table in .rodata instead of .text,
>>    - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>>    - Implement sys_mremap and sys_nfsservct,
>>    - Remove unused padding at the end of the table.
>>
>> Impact for mmu:
>>    - Store table in .rodata instead of .data.
>>
>> Signed-off-by: Geert Uytterhoeven<geert@linux-m68k.org>
>
> What happened to the mmap syscall? IIRC, nommu is pointing to
> a different symbol (sys_mmap_pgoff/sys_mmap2).

Thats taken care of in this patch with:

 > diff --git a/arch/m68k/kernel/syscalltable.S 
b/arch/m68k/kernel/syscalltable.S
 > index 9b8393d..0284192 100644
 > --- a/arch/m68k/kernel/syscalltable.S
 > +++ b/arch/m68k/kernel/syscalltable.S
 > @@ -1,6 +1,4 @@
[snip]
 > +#ifndef CONFIG_MMU
 > +#define sys_mmap2		sys_mmap_pgoff
 > +#endif
 > +

Regards
Greg


> Did you check the macros in unistd to see if they match the
> actual table? I guess it would be a good time to comment out
> the ones that are not implemented in either of the two ABIs.
>
> Otherwise, this patch looks good to me.
>
> 	Arnd
> --
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05  6:24   ` Arnd Bergmann
  (?)
@ 2011-05-05  7:55   ` Greg Ungerer
  -1 siblings, 0 replies; 35+ messages in thread
From: Greg Ungerer @ 2011-05-05  7:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Geert Uytterhoeven, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Hi Arnd,

On 05/05/11 16:24, Arnd Bergmann wrote:
> On Wednesday 04 May 2011, Geert Uytterhoeven wrote:
>> Impact for nommu:
>>    - Store table in .rodata instead of .text,
>>    - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
>>    - Implement sys_mremap and sys_nfsservct,
>>    - Remove unused padding at the end of the table.
>>
>> Impact for mmu:
>>    - Store table in .rodata instead of .data.
>>
>> Signed-off-by: Geert Uytterhoeven<geert@linux-m68k.org>
>
> What happened to the mmap syscall? IIRC, nommu is pointing to
> a different symbol (sys_mmap_pgoff/sys_mmap2).

Thats taken care of in this patch with:

 > diff --git a/arch/m68k/kernel/syscalltable.S 
b/arch/m68k/kernel/syscalltable.S
 > index 9b8393d..0284192 100644
 > --- a/arch/m68k/kernel/syscalltable.S
 > +++ b/arch/m68k/kernel/syscalltable.S
 > @@ -1,6 +1,4 @@
[snip]
 > +#ifndef CONFIG_MMU
 > +#define sys_mmap2		sys_mmap_pgoff
 > +#endif
 > +

Regards
Greg


> Did you check the macros in unistd to see if they match the
> actual table? I guess it would be a good time to comment out
> the ones that are not implemented in either of the two ABIs.
>
> Otherwise, this patch looks good to me.
>
> 	Arnd
> --
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05  6:24   ` Arnd Bergmann
@ 2011-05-05 18:44     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-05 18:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Thu, 5 May 2011, Arnd Bergmann wrote:
> Did you check the macros in unistd to see if they match the
> actual table? I guess it would be a good time to comment out
> the ones that are not implemented in either of the two ABIs.

Like this?

warning: #warning syscall pselect6 not implemented
warning: #warning syscall ppoll not implemented
warning: #warning syscall recvmmsg not implemented

Do we need pselect6 and ppoll? I have vague memories not requiring it.
recvmmsg is a false positive, as we set __ARCH_WANT_SYS_SOCKETCALL.

>From 5739b340b334de21c6da4f65d5194957662a6dd0 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 5 May 2011 20:33:02 +0200
Subject: [PATCH] m68k: unistd - Comment out definitions for unimplemented syscalls

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/include/asm/unistd.h |   50 ++++++++++++++++++++-------------------
 1 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index 29e1790..bddd1ca 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -22,7 +22,7 @@
 #define __NR_mknod		 14
 #define __NR_chmod		 15
 #define __NR_chown		 16
-#define __NR_break		 17
+/*#define __NR_break		 17*/
 #define __NR_oldstat		 18
 #define __NR_lseek		 19
 #define __NR_getpid		 20
@@ -36,11 +36,11 @@
 #define __NR_oldfstat		 28
 #define __NR_pause		 29
 #define __NR_utime		 30
-#define __NR_stty		 31
-#define __NR_gtty		 32
+/*#define __NR_stty		 31*/
+/*#define __NR_gtty		 32*/
 #define __NR_access		 33
 #define __NR_nice		 34
-#define __NR_ftime		 35
+/*#define __NR_ftime		 35*/
 #define __NR_sync		 36
 #define __NR_kill		 37
 #define __NR_rename		 38
@@ -49,7 +49,7 @@
 #define __NR_dup		 41
 #define __NR_pipe		 42
 #define __NR_times		 43
-#define __NR_prof		 44
+/*#define __NR_prof		 44*/
 #define __NR_brk		 45
 #define __NR_setgid		 46
 #define __NR_getgid		 47
@@ -58,13 +58,13 @@
 #define __NR_getegid		 50
 #define __NR_acct		 51
 #define __NR_umount2		 52
-#define __NR_lock		 53
+/*#define __NR_lock		 53*/
 #define __NR_ioctl		 54
 #define __NR_fcntl		 55
-#define __NR_mpx		 56
+/*#define __NR_mpx		 56*/
 #define __NR_setpgid		 57
-#define __NR_ulimit		 58
-#define __NR_oldolduname	 59
+/*#define __NR_ulimit		 58*/
+/*#define __NR_oldolduname	 59*/
 #define __NR_umask		 60
 #define __NR_chroot		 61
 #define __NR_ustat		 62
@@ -103,10 +103,10 @@
 #define __NR_fchown		 95
 #define __NR_getpriority	 96
 #define __NR_setpriority	 97
-#define __NR_profil		 98
+/*#define __NR_profil		 98*/
 #define __NR_statfs		 99
 #define __NR_fstatfs		100
-#define __NR_ioperm		101
+/*#define __NR_ioperm		101*/
 #define __NR_socketcall		102
 #define __NR_syslog		103
 #define __NR_setitimer		104
@@ -114,11 +114,11 @@
 #define __NR_stat		106
 #define __NR_lstat		107
 #define __NR_fstat		108
-#define __NR_olduname		109
-#define __NR_iopl		/* 110 */ not supported
+/*#define __NR_olduname		109*/
+/*#define __NR_iopl		110*/ /* not supported */
 #define __NR_vhangup		111
-#define __NR_idle		/* 112 */ Obsolete
-#define __NR_vm86		/* 113 */ not supported
+/*#define __NR_idle		112*/ /* Obsolete */
+/*#define __NR_vm86		113*/ /* not supported */
 #define __NR_wait4		114
 #define __NR_swapoff		115
 #define __NR_sysinfo		116
@@ -132,17 +132,17 @@
 #define __NR_adjtimex		124
 #define __NR_mprotect		125
 #define __NR_sigprocmask	126
-#define __NR_create_module	127
+/*#define __NR_create_module	127*/
 #define __NR_init_module	128
 #define __NR_delete_module	129
-#define __NR_get_kernel_syms	130
+/*#define __NR_get_kernel_syms	130*/
 #define __NR_quotactl		131
 #define __NR_getpgid		132
 #define __NR_fchdir		133
 #define __NR_bdflush		134
 #define __NR_sysfs		135
 #define __NR_personality	136
-#define __NR_afs_syscall	137 /* Syscall for Andrew File System */
+/*#define __NR_afs_syscall	137*/ /* Syscall for Andrew File System */
 #define __NR_setfsuid		138
 #define __NR_setfsgid		139
 #define __NR__llseek		140
@@ -172,7 +172,7 @@
 #define __NR_setresuid		164
 #define __NR_getresuid		165
 #define __NR_getpagesize	166
-#define __NR_query_module	167
+/*#define __NR_query_module	167*/
 #define __NR_poll		168
 #define __NR_nfsservctl		169
 #define __NR_setresgid		170
@@ -193,8 +193,8 @@
 #define __NR_capset		185
 #define __NR_sigaltstack	186
 #define __NR_sendfile		187
-#define __NR_getpmsg		188	/* some people actually want streams */
-#define __NR_putpmsg		189	/* some people actually want streams */
+/*#define __NR_getpmsg		188*/	/* some people actually want streams */
+/*#define __NR_putpmsg		189*/	/* some people actually want streams */
 #define __NR_vfork		190
 #define __NR_ugetrlimit		191
 #define __NR_mmap2		192
@@ -223,6 +223,8 @@
 #define __NR_setfsuid32		215
 #define __NR_setfsgid32		216
 #define __NR_pivot_root		217
+/* 218*/
+/* 219*/
 #define __NR_getdents64		220
 #define __NR_gettid		221
 #define __NR_tkill		222
@@ -281,7 +283,7 @@
 #define __NR_mq_notify		275
 #define __NR_mq_getsetattr	276
 #define __NR_waitid		277
-#define __NR_vserver		278
+/*#define __NR_vserver		278*/
 #define __NR_add_key		279
 #define __NR_request_key	280
 #define __NR_keyctl		281
@@ -304,8 +306,8 @@
 #define __NR_readlinkat		298
 #define __NR_fchmodat		299
 #define __NR_faccessat		300
-#define __NR_pselect6		301
-#define __NR_ppoll		302
+/*#define __NR_pselect6		301*/
+/*#define __NR_ppoll		302*/
 #define __NR_unshare		303
 #define __NR_set_robust_list	304
 #define __NR_get_robust_list	305
-- 
1.7.0.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-05 18:44     ` Geert Uytterhoeven
  0 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-05 18:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Thu, 5 May 2011, Arnd Bergmann wrote:
> Did you check the macros in unistd to see if they match the
> actual table? I guess it would be a good time to comment out
> the ones that are not implemented in either of the two ABIs.

Like this?

warning: #warning syscall pselect6 not implemented
warning: #warning syscall ppoll not implemented
warning: #warning syscall recvmmsg not implemented

Do we need pselect6 and ppoll? I have vague memories not requiring it.
recvmmsg is a false positive, as we set __ARCH_WANT_SYS_SOCKETCALL.

>From 5739b340b334de21c6da4f65d5194957662a6dd0 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Thu, 5 May 2011 20:33:02 +0200
Subject: [PATCH] m68k: unistd - Comment out definitions for unimplemented syscalls

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/include/asm/unistd.h |   50 ++++++++++++++++++++-------------------
 1 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index 29e1790..bddd1ca 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -22,7 +22,7 @@
 #define __NR_mknod		 14
 #define __NR_chmod		 15
 #define __NR_chown		 16
-#define __NR_break		 17
+/*#define __NR_break		 17*/
 #define __NR_oldstat		 18
 #define __NR_lseek		 19
 #define __NR_getpid		 20
@@ -36,11 +36,11 @@
 #define __NR_oldfstat		 28
 #define __NR_pause		 29
 #define __NR_utime		 30
-#define __NR_stty		 31
-#define __NR_gtty		 32
+/*#define __NR_stty		 31*/
+/*#define __NR_gtty		 32*/
 #define __NR_access		 33
 #define __NR_nice		 34
-#define __NR_ftime		 35
+/*#define __NR_ftime		 35*/
 #define __NR_sync		 36
 #define __NR_kill		 37
 #define __NR_rename		 38
@@ -49,7 +49,7 @@
 #define __NR_dup		 41
 #define __NR_pipe		 42
 #define __NR_times		 43
-#define __NR_prof		 44
+/*#define __NR_prof		 44*/
 #define __NR_brk		 45
 #define __NR_setgid		 46
 #define __NR_getgid		 47
@@ -58,13 +58,13 @@
 #define __NR_getegid		 50
 #define __NR_acct		 51
 #define __NR_umount2		 52
-#define __NR_lock		 53
+/*#define __NR_lock		 53*/
 #define __NR_ioctl		 54
 #define __NR_fcntl		 55
-#define __NR_mpx		 56
+/*#define __NR_mpx		 56*/
 #define __NR_setpgid		 57
-#define __NR_ulimit		 58
-#define __NR_oldolduname	 59
+/*#define __NR_ulimit		 58*/
+/*#define __NR_oldolduname	 59*/
 #define __NR_umask		 60
 #define __NR_chroot		 61
 #define __NR_ustat		 62
@@ -103,10 +103,10 @@
 #define __NR_fchown		 95
 #define __NR_getpriority	 96
 #define __NR_setpriority	 97
-#define __NR_profil		 98
+/*#define __NR_profil		 98*/
 #define __NR_statfs		 99
 #define __NR_fstatfs		100
-#define __NR_ioperm		101
+/*#define __NR_ioperm		101*/
 #define __NR_socketcall		102
 #define __NR_syslog		103
 #define __NR_setitimer		104
@@ -114,11 +114,11 @@
 #define __NR_stat		106
 #define __NR_lstat		107
 #define __NR_fstat		108
-#define __NR_olduname		109
-#define __NR_iopl		/* 110 */ not supported
+/*#define __NR_olduname		109*/
+/*#define __NR_iopl		110*/ /* not supported */
 #define __NR_vhangup		111
-#define __NR_idle		/* 112 */ Obsolete
-#define __NR_vm86		/* 113 */ not supported
+/*#define __NR_idle		112*/ /* Obsolete */
+/*#define __NR_vm86		113*/ /* not supported */
 #define __NR_wait4		114
 #define __NR_swapoff		115
 #define __NR_sysinfo		116
@@ -132,17 +132,17 @@
 #define __NR_adjtimex		124
 #define __NR_mprotect		125
 #define __NR_sigprocmask	126
-#define __NR_create_module	127
+/*#define __NR_create_module	127*/
 #define __NR_init_module	128
 #define __NR_delete_module	129
-#define __NR_get_kernel_syms	130
+/*#define __NR_get_kernel_syms	130*/
 #define __NR_quotactl		131
 #define __NR_getpgid		132
 #define __NR_fchdir		133
 #define __NR_bdflush		134
 #define __NR_sysfs		135
 #define __NR_personality	136
-#define __NR_afs_syscall	137 /* Syscall for Andrew File System */
+/*#define __NR_afs_syscall	137*/ /* Syscall for Andrew File System */
 #define __NR_setfsuid		138
 #define __NR_setfsgid		139
 #define __NR__llseek		140
@@ -172,7 +172,7 @@
 #define __NR_setresuid		164
 #define __NR_getresuid		165
 #define __NR_getpagesize	166
-#define __NR_query_module	167
+/*#define __NR_query_module	167*/
 #define __NR_poll		168
 #define __NR_nfsservctl		169
 #define __NR_setresgid		170
@@ -193,8 +193,8 @@
 #define __NR_capset		185
 #define __NR_sigaltstack	186
 #define __NR_sendfile		187
-#define __NR_getpmsg		188	/* some people actually want streams */
-#define __NR_putpmsg		189	/* some people actually want streams */
+/*#define __NR_getpmsg		188*/	/* some people actually want streams */
+/*#define __NR_putpmsg		189*/	/* some people actually want streams */
 #define __NR_vfork		190
 #define __NR_ugetrlimit		191
 #define __NR_mmap2		192
@@ -223,6 +223,8 @@
 #define __NR_setfsuid32		215
 #define __NR_setfsgid32		216
 #define __NR_pivot_root		217
+/* 218*/
+/* 219*/
 #define __NR_getdents64		220
 #define __NR_gettid		221
 #define __NR_tkill		222
@@ -281,7 +283,7 @@
 #define __NR_mq_notify		275
 #define __NR_mq_getsetattr	276
 #define __NR_waitid		277
-#define __NR_vserver		278
+/*#define __NR_vserver		278*/
 #define __NR_add_key		279
 #define __NR_request_key	280
 #define __NR_keyctl		281
@@ -304,8 +306,8 @@
 #define __NR_readlinkat		298
 #define __NR_fchmodat		299
 #define __NR_faccessat		300
-#define __NR_pselect6		301
-#define __NR_ppoll		302
+/*#define __NR_pselect6		301*/
+/*#define __NR_ppoll		302*/
 #define __NR_unshare		303
 #define __NR_set_robust_list	304
 #define __NR_get_robust_list	305
-- 
1.7.0.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05 18:44     ` Geert Uytterhoeven
@ 2011-05-05 20:37       ` Arnd Bergmann
  -1 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2011-05-05 20:37 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Thursday 05 May 2011 20:44:20 Geert Uytterhoeven wrote:
> On Thu, 5 May 2011, Arnd Bergmann wrote:
> > Did you check the macros in unistd to see if they match the
> > actual table? I guess it would be a good time to comment out
> > the ones that are not implemented in either of the two ABIs.
> 
> Like this?

Looks good!

> warning: #warning syscall pselect6 not implemented
> warning: #warning syscall ppoll not implemented
> warning: #warning syscall recvmmsg not implemented
> 
> Do we need pselect6 and ppoll? I have vague memories not requiring it.

I'm pretty sure you need them. Glibc provides wrappers for them
when they are not there, but the wrappers not completely reliable.

> recvmmsg is a false positive, as we set __ARCH_WANT_SYS_SOCKETCALL.

This looks really strange. The commit that introduced recvmmsg (a2e27255)
added it to both socketcall and as a separate syscall in a number of
architectures, without a good reason for it. I guess it's too late
to change that now, but we should at least fix the script so we
don't report it missing when socketcall is set.

However, if your unistd.h has defined __NR_recvmmsg before, you should
probably add it to the syscall table, just in case that someone built
a binary with that number.

	Arnd

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-05 20:37       ` Arnd Bergmann
  0 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2011-05-05 20:37 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Thursday 05 May 2011 20:44:20 Geert Uytterhoeven wrote:
> On Thu, 5 May 2011, Arnd Bergmann wrote:
> > Did you check the macros in unistd to see if they match the
> > actual table? I guess it would be a good time to comment out
> > the ones that are not implemented in either of the two ABIs.
> 
> Like this?

Looks good!

> warning: #warning syscall pselect6 not implemented
> warning: #warning syscall ppoll not implemented
> warning: #warning syscall recvmmsg not implemented
> 
> Do we need pselect6 and ppoll? I have vague memories not requiring it.

I'm pretty sure you need them. Glibc provides wrappers for them
when they are not there, but the wrappers not completely reliable.

> recvmmsg is a false positive, as we set __ARCH_WANT_SYS_SOCKETCALL.

This looks really strange. The commit that introduced recvmmsg (a2e27255)
added it to both socketcall and as a separate syscall in a number of
architectures, without a good reason for it. I guess it's too late
to change that now, but we should at least fix the script so we
don't report it missing when socketcall is set.

However, if your unistd.h has defined __NR_recvmmsg before, you should
probably add it to the syscall table, just in case that someone built
a binary with that number.

	Arnd

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05 18:44     ` Geert Uytterhoeven
  (?)
  (?)
@ 2011-05-05 20:39     ` Mikael Pettersson
  2011-05-07  8:34         ` Geert Uytterhoeven
  -1 siblings, 1 reply; 35+ messages in thread
From: Mikael Pettersson @ 2011-05-05 20:39 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Geert Uytterhoeven writes:
 > On Thu, 5 May 2011, Arnd Bergmann wrote:
 > > Did you check the macros in unistd to see if they match the
 > > actual table? I guess it would be a good time to comment out
 > > the ones that are not implemented in either of the two ABIs.
 > 
 > Like this?
 > 
 > warning: #warning syscall pselect6 not implemented
 > warning: #warning syscall ppoll not implemented
 > warning: #warning syscall recvmmsg not implemented
 > 
 > Do we need pselect6 and ppoll? I have vague memories not requiring it.

They close user-space race conditions, so you want them.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05 20:37       ` Arnd Bergmann
  (?)
  (?)
@ 2011-05-06  5:11       ` Geert Uytterhoeven
  2011-05-06  8:24           ` Andreas Schwab
  -1 siblings, 1 reply; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-06  5:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Thu, May 5, 2011 at 22:37, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 05 May 2011 20:44:20 Geert Uytterhoeven wrote:
>> recvmmsg is a false positive, as we set __ARCH_WANT_SYS_SOCKETCALL.
>
> This looks really strange. The commit that introduced recvmmsg (a2e27255)
> added it to both socketcall and as a separate syscall in a number of
> architectures, without a good reason for it. I guess it's too late
> to change that now, but we should at least fix the script so we
> don't report it missing when socketcall is set.

Some architectures don't use socketcall, so they use a separate syscall.
IIRC, powerpc is migrating away from socketcall (commit
86250b9d12caa1a3dee12a7cf638b7dd70eaadb6, "powerpc: Wire up direct
socket system calls"), hence they added a separate call for it.

> However, if your unistd.h has defined __NR_recvmmsg before, you should
> probably add it to the syscall table, just in case that someone built
> a binary with that number.

We never had it.

BTW, we have a hole at 218/219. I don't remember why, but it may have been
a placeholder for pselect6 and ppoll when that implementation was still in flux.
Couldn't find anything about it in git/cvs archives, so I'll check
have to check my
old mailing list archives...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05 20:37       ` Arnd Bergmann
  (?)
@ 2011-05-06  5:11       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-06  5:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux/m68k, Greg Ungerer, Linux Kernel Development, uClinux list

On Thu, May 5, 2011 at 22:37, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 05 May 2011 20:44:20 Geert Uytterhoeven wrote:
>> recvmmsg is a false positive, as we set __ARCH_WANT_SYS_SOCKETCALL.
>
> This looks really strange. The commit that introduced recvmmsg (a2e27255)
> added it to both socketcall and as a separate syscall in a number of
> architectures, without a good reason for it. I guess it's too late
> to change that now, but we should at least fix the script so we
> don't report it missing when socketcall is set.

Some architectures don't use socketcall, so they use a separate syscall.
IIRC, powerpc is migrating away from socketcall (commit
86250b9d12caa1a3dee12a7cf638b7dd70eaadb6, "powerpc: Wire up direct
socket system calls"), hence they added a separate call for it.

> However, if your unistd.h has defined __NR_recvmmsg before, you should
> probably add it to the syscall table, just in case that someone built
> a binary with that number.

We never had it.

BTW, we have a hole at 218/219. I don't remember why, but it may have been
a placeholder for pselect6 and ppoll when that implementation was still in flux.
Couldn't find anything about it in git/cvs archives, so I'll check
have to check my
old mailing list archives...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-06  5:11       ` Geert Uytterhoeven
@ 2011-05-06  8:24           ` Andreas Schwab
  0 siblings, 0 replies; 35+ messages in thread
From: Andreas Schwab @ 2011-05-06  8:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> BTW, we have a hole at 218/219. I don't remember why, but it may have been
> a placeholder for pselect6 and ppoll when that implementation was still in flux.
> Couldn't find anything about it in git/cvs archives, so I'll check
> have to check my
> old mailing list archives...

Probably it originated from the time when it was still deemed useful to
keep the numbers in sync with the x86 ones.  The hole is filled with
mincore and madvice there (pselect6 and ppoll came much later).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-06  8:24           ` Andreas Schwab
  0 siblings, 0 replies; 35+ messages in thread
From: Andreas Schwab @ 2011-05-06  8:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> BTW, we have a hole at 218/219. I don't remember why, but it may have been
> a placeholder for pselect6 and ppoll when that implementation was still in flux.
> Couldn't find anything about it in git/cvs archives, so I'll check
> have to check my
> old mailing list archives...

Probably it originated from the time when it was still deemed useful to
keep the numbers in sync with the x86 ones.  The hole is filled with
mincore and madvice there (pselect6 and ppoll came much later).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-06  8:24           ` Andreas Schwab
@ 2011-05-06 18:56             ` Geert Uytterhoeven
  -1 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-06 18:56 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

On Fri, May 6, 2011 at 10:24, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Geert Uytterhoeven <geert@linux-m68k.org> writes:
>
>> BTW, we have a hole at 218/219. I don't remember why, but it may have been
>> a placeholder for pselect6 and ppoll when that implementation was still in flux.
>> Couldn't find anything about it in git/cvs archives, so I'll check
>> have to check my
>> old mailing list archives...
>
> Probably it originated from the time when it was still deemed useful to
> keep the numbers in sync with the x86 ones.  The hole is filled with

Found it. Originally we kept the numbers in sync with i386.
For 217/218/219 there was a brief period of overlap of up to 3 different
syscalls for the same number: pivot_root, mincore, madvise, timer_* (which
got accepted later), and sys_setenviron/sys_setarguments (which never
got accepted). So we kept the boat of, and never filled the
conflicting gap (except with pivot_root some time later), and lost
compatibility with i386
numbers from then on.

> mincore and madvice there (pselect6 and ppoll came much later).

Yep. pselect6 and ppoll were introduced in many archs in two steps (a
syscall number reservation and an actual hook up), because they need
TIF_RESTORE_SIGMASK. As m68k only got TIF_RESTORE_SIGMASK
last year, we never completed the second step.

Will fix.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-06 18:56             ` Geert Uytterhoeven
  0 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-06 18:56 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

On Fri, May 6, 2011 at 10:24, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Geert Uytterhoeven <geert@linux-m68k.org> writes:
>
>> BTW, we have a hole at 218/219. I don't remember why, but it may have been
>> a placeholder for pselect6 and ppoll when that implementation was still in flux.
>> Couldn't find anything about it in git/cvs archives, so I'll check
>> have to check my
>> old mailing list archives...
>
> Probably it originated from the time when it was still deemed useful to
> keep the numbers in sync with the x86 ones.  The hole is filled with

Found it. Originally we kept the numbers in sync with i386.
For 217/218/219 there was a brief period of overlap of up to 3 different
syscalls for the same number: pivot_root, mincore, madvise, timer_* (which
got accepted later), and sys_setenviron/sys_setarguments (which never
got accepted). So we kept the boat of, and never filled the
conflicting gap (except with pivot_root some time later), and lost
compatibility with i386
numbers from then on.

> mincore and madvice there (pselect6 and ppoll came much later).

Yep. pselect6 and ppoll were introduced in many archs in two steps (a
syscall number reservation and an actual hook up), because they need
TIF_RESTORE_SIGMASK. As m68k only got TIF_RESTORE_SIGMASK
last year, we never completed the second step.

Will fix.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05 20:39     ` Mikael Pettersson
@ 2011-05-07  8:34         ` Geert Uytterhoeven
  0 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-07  8:34 UTC (permalink / raw)
  To: Mikael Pettersson
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

On Thu, May 5, 2011 at 22:39, Mikael Pettersson <mikpe@it.uu.se> wrote:
> Geert Uytterhoeven writes:
>  > On Thu, 5 May 2011, Arnd Bergmann wrote:
>  > > Did you check the macros in unistd to see if they match the
>  > > actual table? I guess it would be a good time to comment out
>  > > the ones that are not implemented in either of the two ABIs.
>  >
>  > Like this?
>  >
>  > warning: #warning syscall pselect6 not implemented
>  > warning: #warning syscall ppoll not implemented
>  > warning: #warning syscall recvmmsg not implemented
>  >
>  > Do we need pselect6 and ppoll? I have vague memories not requiring it.
>
> They close user-space race conditions, so you want them.

So do you recommend to backport the wiring up of pselect6/ppoll to -stable?
We always had their _NR_* defines, so I guess glibc was always compiled
with pselect6/ppoll support, and will use it if it's present.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-05-07  8:34         ` Geert Uytterhoeven
  0 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-05-07  8:34 UTC (permalink / raw)
  To: Mikael Pettersson
  Cc: Linux/m68k, uClinux list, Linux Kernel Development,
	Arnd Bergmann, Greg Ungerer

On Thu, May 5, 2011 at 22:39, Mikael Pettersson <mikpe@it.uu.se> wrote:
> Geert Uytterhoeven writes:
>  > On Thu, 5 May 2011, Arnd Bergmann wrote:
>  > > Did you check the macros in unistd to see if they match the
>  > > actual table? I guess it would be a good time to comment out
>  > > the ones that are not implemented in either of the two ABIs.
>  >
>  > Like this?
>  >
>  > warning: #warning syscall pselect6 not implemented
>  > warning: #warning syscall ppoll not implemented
>  > warning: #warning syscall recvmmsg not implemented
>  >
>  > Do we need pselect6 and ppoll? I have vague memories not requiring it.
>
> They close user-space race conditions, so you want them.

So do you recommend to backport the wiring up of pselect6/ppoll to -stable?
We always had their _NR_* defines, so I guess glibc was always compiled
with pselect6/ppoll support, and will use it if it's present.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-07  8:34         ` Geert Uytterhoeven
  (?)
@ 2011-05-07 13:16         ` Mikael Pettersson
  -1 siblings, 0 replies; 35+ messages in thread
From: Mikael Pettersson @ 2011-05-07 13:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mikael Pettersson, Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

On Sat, 7 May 2011 10:34:25 +0200, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, May 5, 2011 at 22:39, Mikael Pettersson <mikpe@it.uu.se> wrote:
> > Geert Uytterhoeven writes:
> > =C2=A0> On Thu, 5 May 2011, Arnd Bergmann wrote:
> > =C2=A0> > Did you check the macros in unistd to see if they match the
> > =C2=A0> > actual table? I guess it would be a good time to comment out
> > =C2=A0> > the ones that are not implemented in either of the two ABIs.
> > =C2=A0>
> > =C2=A0> Like this?
> > =C2=A0>
> > =C2=A0> warning: #warning syscall pselect6 not implemented
> > =C2=A0> warning: #warning syscall ppoll not implemented
> > =C2=A0> warning: #warning syscall recvmmsg not implemented
> > =C2=A0>
> > =C2=A0> Do we need pselect6 and ppoll? I have vague memories not requirin=
> g it.
> >
> > They close user-space race conditions, so you want them.
> 
> So do you recommend to backport the wiring up of pselect6/ppoll to -stable?
> We always had their _NR_* defines, so I guess glibc was always compiled
> with pselect6/ppoll support, and will use it if it's present.

Any kernel with working TIF_RESTORE_SIGMASK should ideally also
wire up pselect6/ppoll.  But their omission is not a regression
so backporting to 2.6.38 is probably sufficient.

/Mikael

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-05-05 18:44     ` Geert Uytterhoeven
                       ` (2 preceding siblings ...)
  (?)
@ 2011-10-23  9:53     ` Andreas Schwab
  2011-10-23 12:20       ` Geert Uytterhoeven
  -1 siblings, 1 reply; 35+ messages in thread
From: Andreas Schwab @ 2011-10-23  9:53 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> From 5739b340b334de21c6da4f65d5194957662a6dd0 Mon Sep 17 00:00:00 2001
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Date: Thu, 5 May 2011 20:33:02 +0200
> Subject: [PATCH] m68k: unistd - Comment out definitions for unimplemented syscalls

This is not a good idea at least for the syscalls referenced by glibc.
It means that a glibc compiled against this <asm/unistd.h> will lose the
ability to call those syscalls even if the running kernel happens to
implement them.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-10-23  9:53     ` Andreas Schwab
@ 2011-10-23 12:20       ` Geert Uytterhoeven
  2011-10-23 14:59           ` Andreas Schwab
  0 siblings, 1 reply; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-10-23 12:20 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

On Sun, Oct 23, 2011 at 11:53, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Geert Uytterhoeven <geert@linux-m68k.org> writes:
>
>> From 5739b340b334de21c6da4f65d5194957662a6dd0 Mon Sep 17 00:00:00 2001
>> From: Geert Uytterhoeven <geert@linux-m68k.org>
>> Date: Thu, 5 May 2011 20:33:02 +0200
>> Subject: [PATCH] m68k: unistd - Comment out definitions for unimplemented syscalls
>
> This is not a good idea at least for the syscalls referenced by glibc.
> It means that a glibc compiled against this <asm/unistd.h> will lose the
> ability to call those syscalls even if the running kernel happens to
> implement them.

But is any of them likely to be ever implemented on m68k?
Perhaps AFS, vserver and {get,put}pmsg()?
All others seem to be old, obsolete, or i386-only.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-10-23 12:20       ` Geert Uytterhoeven
@ 2011-10-23 14:59           ` Andreas Schwab
  0 siblings, 0 replies; 35+ messages in thread
From: Andreas Schwab @ 2011-10-23 14:59 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> All others seem to be old, obsolete, or i386-only.

Those are not referenced by glibc anyway.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-10-23 14:59           ` Andreas Schwab
  0 siblings, 0 replies; 35+ messages in thread
From: Andreas Schwab @ 2011-10-23 14:59 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Linux/m68k, Greg Ungerer,
	Linux Kernel Development, uClinux list

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> All others seem to be old, obsolete, or i386-only.

Those are not referenced by glibc anyway.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-19  8:21       ` Arnd Bergmann
  2011-04-19  8:30         ` Geert Uytterhoeven
  2011-04-19  8:52         ` Arnd Bergmann
@ 2011-04-19 12:26         ` Greg Ungerer
  2 siblings, 0 replies; 35+ messages in thread
From: Greg Ungerer @ 2011-04-19 12:26 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Geert Uytterhoeven, Linux/m68k, uClinux list


Hi Arnd,

On 19/04/11 18:21, Arnd Bergmann wrote:
> On Tuesday 19 April 2011, Greg Ungerer wrote:
>> On 18/04/11 06:13, Arnd Bergmann wrote:
>
>>> If so, what are these
>>> syscalls supposed to do in that case? I assume that they don't actually
>>> change the physical location of a virtual address.
>>>
>>> Since the unistd.h file is shared with m68k, I see nothing wrong here,
>>> they should simply get stubbed out like the other NOMMU syscalls (swapon,
>>> mprotect, msync, ...)
>>
>> I have no objection to changing these to be sys_ni_syscall for the
>> CONFIG_MMU=n case of m68k. I am pretty sure they will never have
>> been used in any way on m68knommu systems. (It does look like uClibc
>> for example does support these even on no-mmu systems though. I just
>> don't think they will have actually been used by anyone).
>
> They are already sys_ni_syscall, by means of kernel/sys_ni.c.
> I wouldn't bother changing them. The real question is whether
> you should define the __NR_* macros for the syscalls that are
> not provided. For a new architecture I think you should not,
> but removing them might cause regressions. Then again, it's
> probably very useful to match the unistd.h file with the system
> call table.

Ok, then it looks like we don't need the long redefine list
for the non-mmu case in Geert's original patch.Those that are
not implemented by the non-mmu build will just end up being
sys_ni_syscall anyway.

I built (and run tested) that for m68knommu targets, removing
the redefine list - expect for sys_mmap2/sys_mmap_pgoff - and
that of course works fine.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-19  8:21       ` Arnd Bergmann
  2011-04-19  8:30         ` Geert Uytterhoeven
@ 2011-04-19  8:52         ` Arnd Bergmann
  2011-04-19 12:26         ` Greg Ungerer
  2 siblings, 0 replies; 35+ messages in thread
From: Arnd Bergmann @ 2011-04-19  8:52 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: Geert Uytterhoeven, Linux/m68k, uClinux list

On Tuesday 19 April 2011, Arnd Bergmann wrote:
> They are already sys_ni_syscall, by means of kernel/sys_ni.c.
> I wouldn't bother changing them. The real question is whether
> you should define the __NR_* macros for the syscalls that are
> not provided. For a new architecture I think you should not,
> but removing them might cause regressions. Then again, it's
> probably very useful to match the unistd.h file with the system
> call table.

I've just looked at the diff between the m68k and m68knommu
syscall tables, and it seems that you should be able to just
use the m68k variant, with a slight adaptation for mmap2/mmap_pgoff.

You might want to use the same method as asm-generic, in order
to provide a way to better synchronize unistd.h and syscalltable.

	Arnd

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-19  8:21       ` Arnd Bergmann
@ 2011-04-19  8:30         ` Geert Uytterhoeven
  2011-04-19  8:52         ` Arnd Bergmann
  2011-04-19 12:26         ` Greg Ungerer
  2 siblings, 0 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-04-19  8:30 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Greg Ungerer, Linux/m68k, uClinux list

On Tue, Apr 19, 2011 at 10:21, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 19 April 2011, Greg Ungerer wrote:
>> On 18/04/11 06:13, Arnd Bergmann wrote:
>> >> M68knommu does not implement:
>> >>    - sys_mremap
>> >>    - sys_nfsservct
>> >
>> > Shouldn't you get a warning about these from scripts/checksyscalls.sh ?
>>
>> It doesn't complain.
>
> Ah, you actually define the syscall numbers for these, so it will not warn,
> despite the fact that the entry is missing.

Yep, asm/unistd.h is shared between mmu and nommu.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-19  4:32     ` Greg Ungerer
@ 2011-04-19  8:21       ` Arnd Bergmann
  2011-04-19  8:30         ` Geert Uytterhoeven
                           ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Arnd Bergmann @ 2011-04-19  8:21 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: Geert Uytterhoeven, Linux/m68k, uClinux list

On Tuesday 19 April 2011, Greg Ungerer wrote:
> On 18/04/11 06:13, Arnd Bergmann wrote:

> > If so, what are these
> > syscalls supposed to do in that case? I assume that they don't actually
> > change the physical location of a virtual address.
> >
> > Since the unistd.h file is shared with m68k, I see nothing wrong here,
> > they should simply get stubbed out like the other NOMMU syscalls (swapon,
> > mprotect, msync, ...)
> 
> I have no objection to changing these to be sys_ni_syscall for the
> CONFIG_MMU=n case of m68k. I am pretty sure they will never have
> been used in any way on m68knommu systems. (It does look like uClibc
> for example does support these even on no-mmu systems though. I just
> don't think they will have actually been used by anyone).

They are already sys_ni_syscall, by means of kernel/sys_ni.c.
I wouldn't bother changing them. The real question is whether
you should define the __NR_* macros for the syscalls that are
not provided. For a new architecture I think you should not,
but removing them might cause regressions. Then again, it's
probably very useful to match the unistd.h file with the system
call table.

> >>    - sys_fork, although it returns -EINVAL, not -ENOSYS
> 
> I can't recall why it is that way :-)
> For one thing uClibc doesn't even generate a library symbol for it.
> So the only way someone would be able to get to it normally on an
> m68knommu system is to code the raw system call. And even then all
> they will ever get is a fail. I doubt the change in errno return
> type would be a problem.
> 
> I have no problem with being consistent with asm-generic/unistd.h,
> and stubbing this to a sys_ni_syscall as well.

Makes sense. Note that the man page defines neither return code.

> >> M68knommu does not implement:
> >>    - sys_mremap
> >>    - sys_nfsservct
> >
> > Shouldn't you get a warning about these from scripts/checksyscalls.sh ?
> 
> It doesn't complain.

Ah, you actually define the syscall numbers for these, so it will not warn,
despite the fact that the entry is missing.

> > mremap should really work, except for MREMAP_FIXED, as documented in mm/nommu.c.
> > nfsservctl is probably not needed, but I see no reason to leave it out either.
> 
> They should work exactly the same as any other non-mmu arch.
> I just compile tested with those enabled (as per asm-generic/unistd.h)
> and it worked fine. So I would be happy to see those removed from the
> stub list for m68k/m68knommu.

Ok, good.

	Arnd

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-17 20:13   ` Arnd Bergmann
@ 2011-04-19  4:32     ` Greg Ungerer
  2011-04-19  8:21       ` Arnd Bergmann
  0 siblings, 1 reply; 35+ messages in thread
From: Greg Ungerer @ 2011-04-19  4:32 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Geert Uytterhoeven, Linux/m68k, uClinux list

On 18/04/11 06:13, Arnd Bergmann wrote:
> On Wednesday 13 April 2011, Geert Uytterhoeven wrote:
>> When comparing this to the MMU comments in include/asm-generic/unistd.h,
>> I noticed this:
>>
>> M68knommu does have:
>>    - sys_mbind
>>    - sys_get_mempolicy
>>    - sys_set_mempolicy
>>    - sys_migrate_pages
>>    - sys_move_pages
>
> scripts/checksyscalls.sh ignores these on NOMMU, so I did not list them.
> Are there any NOMMU system with NUMA support?

Certainly no m68k/ColdFire ones...


> If so, what are these
> syscalls supposed to do in that case? I assume that they don't actually
> change the physical location of a virtual address.
>
> Since the unistd.h file is shared with m68k, I see nothing wrong here,
> they should simply get stubbed out like the other NOMMU syscalls (swapon,
> mprotect, msync, ...)

I have no objection to changing these to be sys_ni_syscall for the
CONFIG_MMU=n case of m68k. I am pretty sure they will never have
been used in any way on m68knommu systems. (It does look like uClibc
for example does support these even on no-mmu systems though. I just
don't think they will have actually been used by anyone).


>>    - sys_fork, although it returns -EINVAL, not -ENOSYS

I can't recall why it is that way :-)
For one thing uClibc doesn't even generate a library symbol for it.
So the only way someone would be able to get to it normally on an
m68knommu system is to code the raw system call. And even then all
they will ever get is a fail. I doubt the change in errno return
type would be a problem.

I have no problem with being consistent with asm-generic/unistd.h,
and stubbing this to a sys_ni_syscall as well.


>> M68knommu does not implement:
>>    - sys_mremap
>>    - sys_nfsservct
>
> Shouldn't you get a warning about these from scripts/checksyscalls.sh ?

It doesn't complain.


> mremap should really work, except for MREMAP_FIXED, as documented in mm/nommu.c.
> nfsservctl is probably not needed, but I see no reason to leave it out either.

They should work exactly the same as any other non-mmu arch.
I just compile tested with those enabled (as per asm-generic/unistd.h)
and it worked fine. So I would be happy to see those removed from the
stub list for m68k/m68knommu.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-13 18:16 ` Geert Uytterhoeven
@ 2011-04-17 20:13   ` Arnd Bergmann
  2011-04-19  4:32     ` Greg Ungerer
  0 siblings, 1 reply; 35+ messages in thread
From: Arnd Bergmann @ 2011-04-17 20:13 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Greg Ungerer, Linux/m68k, uClinux list

On Wednesday 13 April 2011, Geert Uytterhoeven wrote:
> When comparing this to the MMU comments in include/asm-generic/unistd.h,
> I noticed this:
> 
> M68knommu does have:
>   - sys_mbind
>   - sys_get_mempolicy
>   - sys_set_mempolicy
>   - sys_migrate_pages
>   - sys_move_pages

scripts/checksyscalls.sh ignores these on NOMMU, so I did not list them.
Are there any NOMMU system with NUMA support? If so, what are these
syscalls supposed to do in that case? I assume that they don't actually
change the physical location of a virtual address.

Since the unistd.h file is shared with m68k, I see nothing wrong here,
they should simply get stubbed out like the other NOMMU syscalls (swapon,
mprotect, msync, ...)

>   - sys_fork, although it returns -EINVAL, not -ENOSYS
> 
> M68knommu does not implement:
>   - sys_mremap
>   - sys_nfsservct

Shouldn't you get a warning about these from scripts/checksyscalls.sh ?

mremap should really work, except for MREMAP_FIXED, as documented in mm/nommu.c.
nfsservctl is probably not needed, but I see no reason to leave it out either.

	Arnd

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-06 20:33 Geert Uytterhoeven
  2011-04-07  1:53 ` Greg Ungerer
@ 2011-04-13 18:16 ` Geert Uytterhoeven
  2011-04-17 20:13   ` Arnd Bergmann
  1 sibling, 1 reply; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-04-13 18:16 UTC (permalink / raw)
  To: Greg Ungerer, Arnd Bergmann; +Cc: Linux/m68k, uClinux list

On Wed, Apr 6, 2011 at 22:33, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> +#ifndef CONFIG_MMU
> +#define sys_swapon             sys_ni_syscall
> +#define sys_swapoff            sys_ni_syscall
> +#define sys_mprotect           sys_ni_syscall
> +#define sys_msync              sys_ni_syscall
> +#define sys_mlock              sys_ni_syscall
> +#define sys_munlock            sys_ni_syscall
> +#define sys_mlockall           sys_ni_syscall
> +#define sys_munlockall         sys_ni_syscall
> +#define sys_mremap             sys_ni_syscall
> +#define sys_nfsservctl         sys_ni_syscall
> +#define sys_mincore            sys_ni_syscall
> +#define sys_madvise            sys_ni_syscall
> +#define sys_remap_file_pages   sys_ni_syscall
> +
> +#define sys_mmap2              sys_mmap_pgoff
> +#endif

When comparing this to the MMU comments in include/asm-generic/unistd.h,
I noticed this:

M68knommu does have:
  - sys_mbind
  - sys_get_mempolicy
  - sys_set_mempolicy
  - sys_migrate_pages
  - sys_move_pages
  - sys_fork, although it returns -EINVAL, not -ENOSYS

M68knommu does not implement:
  - sys_mremap
  - sys_nfsservctl

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
  2011-04-06 20:33 Geert Uytterhoeven
@ 2011-04-07  1:53 ` Greg Ungerer
  2011-04-13 18:16 ` Geert Uytterhoeven
  1 sibling, 0 replies; 35+ messages in thread
From: Greg Ungerer @ 2011-04-07  1:53 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Greg Ungerer, Linux/m68k, uClinux list


Hi Geert,

On 07/04/11 06:33, Geert Uytterhoeven wrote:
> Impact for m68knommu:
>    - The table is now stored in .data instead of .text,
>    - Removed unused padding at the end of the table.
>
> Signed-off-by: Geert Uytterhoeven<geert@linux-m68k.org>
> ---
> Not tested on m68knommu

Compile and run tested on m68knommu.


> Questions:
>    - Why was it .text?
>    - Was NR_syscalls ever larger than the actual number of syscalls?

A long time ago (circa 2.4 kernels). Not even sure why then.
It may have had something to do with maintaining the same number
of syscalls as true MMU m68k had.

Certainly doesn't need to be that way now.

Acked-by: Greg Ungerer <gerg@uclinux.org>

Are you going to be pushing this via your m68k git tree?

Regards
Greg


>
>   arch/m68k/kernel/Makefile_mm    |    2 +-
>   arch/m68k/kernel/entry_mm.S     |  348 ---------------------------------------
>   arch/m68k/kernel/syscalltable.S |  205 ++++++++++++-----------
>   3 files changed, 110 insertions(+), 445 deletions(-)
>
> diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
> index 55d5d6b..aced678 100644
> --- a/arch/m68k/kernel/Makefile_mm
> +++ b/arch/m68k/kernel/Makefile_mm
> @@ -10,7 +10,7 @@ endif
>   extra-y	+= vmlinux.lds
>
>   obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
> -	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
> +	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o
>
>   devres-y = ../../../kernel/irq/devres.o
>
> diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
> index 1359ee6..bd0ec05 100644
> --- a/arch/m68k/kernel/entry_mm.S
> +++ b/arch/m68k/kernel/entry_mm.S
> @@ -407,351 +407,3 @@ resume:
>
>   	rts
>
> -.data
> -ALIGN
> -sys_call_table:
> -	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
> -	.long sys_exit
> -	.long sys_fork
> -	.long sys_read
> -	.long sys_write
> -	.long sys_open		/* 5 */
> -	.long sys_close
> -	.long sys_waitpid
> -	.long sys_creat
> -	.long sys_link
> -	.long sys_unlink	/* 10 */
> -	.long sys_execve
> -	.long sys_chdir
> -	.long sys_time
> -	.long sys_mknod
> -	.long sys_chmod		/* 15 */
> -	.long sys_chown16
> -	.long sys_ni_syscall				/* old break syscall holder */
> -	.long sys_stat
> -	.long sys_lseek
> -	.long sys_getpid	/* 20 */
> -	.long sys_mount
> -	.long sys_oldumount
> -	.long sys_setuid16
> -	.long sys_getuid16
> -	.long sys_stime		/* 25 */
> -	.long sys_ptrace
> -	.long sys_alarm
> -	.long sys_fstat
> -	.long sys_pause
> -	.long sys_utime		/* 30 */
> -	.long sys_ni_syscall				/* old stty syscall holder */
> -	.long sys_ni_syscall				/* old gtty syscall holder */
> -	.long sys_access
> -	.long sys_nice
> -	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */
> -	.long sys_sync
> -	.long sys_kill
> -	.long sys_rename
> -	.long sys_mkdir
> -	.long sys_rmdir		/* 40 */
> -	.long sys_dup
> -	.long sys_pipe
> -	.long sys_times
> -	.long sys_ni_syscall				/* old prof syscall holder */
> -	.long sys_brk		/* 45 */
> -	.long sys_setgid16
> -	.long sys_getgid16
> -	.long sys_signal
> -	.long sys_geteuid16
> -	.long sys_getegid16	/* 50 */
> -	.long sys_acct
> -	.long sys_umount				/* recycled never used phys() */
> -	.long sys_ni_syscall				/* old lock syscall holder */
> -	.long sys_ioctl
> -	.long sys_fcntl		/* 55 */
> -	.long sys_ni_syscall				/* old mpx syscall holder */
> -	.long sys_setpgid
> -	.long sys_ni_syscall				/* old ulimit syscall holder */
> -	.long sys_ni_syscall
> -	.long sys_umask		/* 60 */
> -	.long sys_chroot
> -	.long sys_ustat
> -	.long sys_dup2
> -	.long sys_getppid
> -	.long sys_getpgrp	/* 65 */
> -	.long sys_setsid
> -	.long sys_sigaction
> -	.long sys_sgetmask
> -	.long sys_ssetmask
> -	.long sys_setreuid16	/* 70 */
> -	.long sys_setregid16
> -	.long sys_sigsuspend
> -	.long sys_sigpending
> -	.long sys_sethostname
> -	.long sys_setrlimit	/* 75 */
> -	.long sys_old_getrlimit
> -	.long sys_getrusage
> -	.long sys_gettimeofday
> -	.long sys_settimeofday
> -	.long sys_getgroups16	/* 80 */
> -	.long sys_setgroups16
> -	.long sys_old_select
> -	.long sys_symlink
> -	.long sys_lstat
> -	.long sys_readlink	/* 85 */
> -	.long sys_uselib
> -	.long sys_swapon
> -	.long sys_reboot
> -	.long sys_old_readdir
> -	.long sys_old_mmap	/* 90 */
> -	.long sys_munmap
> -	.long sys_truncate
> -	.long sys_ftruncate
> -	.long sys_fchmod
> -	.long sys_fchown16	/* 95 */
> -	.long sys_getpriority
> -	.long sys_setpriority
> -	.long sys_ni_syscall				/* old profil syscall holder */
> -	.long sys_statfs
> -	.long sys_fstatfs	/* 100 */
> -	.long sys_ni_syscall				/* ioperm for i386 */
> -	.long sys_socketcall
> -	.long sys_syslog
> -	.long sys_setitimer
> -	.long sys_getitimer	/* 105 */
> -	.long sys_newstat
> -	.long sys_newlstat
> -	.long sys_newfstat
> -	.long sys_ni_syscall
> -	.long sys_ni_syscall	/* 110 */	/* iopl for i386 */
> -	.long sys_vhangup
> -	.long sys_ni_syscall				/* obsolete idle() syscall */
> -	.long sys_ni_syscall				/* vm86old for i386 */
> -	.long sys_wait4
> -	.long sys_swapoff	/* 115 */
> -	.long sys_sysinfo
> -	.long sys_ipc
> -	.long sys_fsync
> -	.long sys_sigreturn
> -	.long sys_clone		/* 120 */
> -	.long sys_setdomainname
> -	.long sys_newuname
> -	.long sys_cacheflush				/* modify_ldt for i386 */
> -	.long sys_adjtimex
> -	.long sys_mprotect	/* 125 */
> -	.long sys_sigprocmask
> -	.long sys_ni_syscall		/* old "create_module" */
> -	.long sys_init_module
> -	.long sys_delete_module
> -	.long sys_ni_syscall	/* 130 - old "get_kernel_syms" */
> -	.long sys_quotactl
> -	.long sys_getpgid
> -	.long sys_fchdir
> -	.long sys_bdflush
> -	.long sys_sysfs		/* 135 */
> -	.long sys_personality
> -	.long sys_ni_syscall				/* for afs_syscall */
> -	.long sys_setfsuid16
> -	.long sys_setfsgid16
> -	.long sys_llseek	/* 140 */
> -	.long sys_getdents
> -	.long sys_select
> -	.long sys_flock
> -	.long sys_msync
> -	.long sys_readv		/* 145 */
> -	.long sys_writev
> -	.long sys_getsid
> -	.long sys_fdatasync
> -	.long sys_sysctl
> -	.long sys_mlock		/* 150 */
> -	.long sys_munlock
> -	.long sys_mlockall
> -	.long sys_munlockall
> -	.long sys_sched_setparam
> -	.long sys_sched_getparam	/* 155 */
> -	.long sys_sched_setscheduler
> -	.long sys_sched_getscheduler
> -	.long sys_sched_yield
> -	.long sys_sched_get_priority_max
> -	.long sys_sched_get_priority_min  /* 160 */
> -	.long sys_sched_rr_get_interval
> -	.long sys_nanosleep
> -	.long sys_mremap
> -	.long sys_setresuid16
> -	.long sys_getresuid16	/* 165 */
> -	.long sys_getpagesize
> -	.long sys_ni_syscall		/* old sys_query_module */
> -	.long sys_poll
> -	.long sys_nfsservctl
> -	.long sys_setresgid16	/* 170 */
> -	.long sys_getresgid16
> -	.long sys_prctl
> -	.long sys_rt_sigreturn
> -	.long sys_rt_sigaction
> -	.long sys_rt_sigprocmask	/* 175 */
> -	.long sys_rt_sigpending
> -	.long sys_rt_sigtimedwait
> -	.long sys_rt_sigqueueinfo
> -	.long sys_rt_sigsuspend
> -	.long sys_pread64	/* 180 */
> -	.long sys_pwrite64
> -	.long sys_lchown16;
> -	.long sys_getcwd
> -	.long sys_capget
> -	.long sys_capset	/* 185 */
> -	.long sys_sigaltstack
> -	.long sys_sendfile
> -	.long sys_ni_syscall				/* streams1 */
> -	.long sys_ni_syscall				/* streams2 */
> -	.long sys_vfork		/* 190 */
> -	.long sys_getrlimit
> -	.long sys_mmap2
> -	.long sys_truncate64
> -	.long sys_ftruncate64
> -	.long sys_stat64	/* 195 */
> -	.long sys_lstat64
> -	.long sys_fstat64
> -	.long sys_chown
> -	.long sys_getuid
> -	.long sys_getgid	/* 200 */
> -	.long sys_geteuid
> -	.long sys_getegid
> -	.long sys_setreuid
> -	.long sys_setregid
> -	.long sys_getgroups	/* 205 */
> -	.long sys_setgroups
> -	.long sys_fchown
> -	.long sys_setresuid
> -	.long sys_getresuid
> -	.long sys_setresgid	/* 210 */
> -	.long sys_getresgid
> -	.long sys_lchown
> -	.long sys_setuid
> -	.long sys_setgid
> -	.long sys_setfsuid	/* 215 */
> -	.long sys_setfsgid
> -	.long sys_pivot_root
> -	.long sys_ni_syscall
> -	.long sys_ni_syscall
> -	.long sys_getdents64	/* 220 */
> -	.long sys_gettid
> -	.long sys_tkill
> -	.long sys_setxattr
> -	.long sys_lsetxattr
> -	.long sys_fsetxattr	/* 225 */
> -	.long sys_getxattr
> -	.long sys_lgetxattr
> -	.long sys_fgetxattr
> -	.long sys_listxattr
> -	.long sys_llistxattr	/* 230 */
> -	.long sys_flistxattr
> -	.long sys_removexattr
> -	.long sys_lremovexattr
> -	.long sys_fremovexattr
> -	.long sys_futex		/* 235 */
> -	.long sys_sendfile64
> -	.long sys_mincore
> -	.long sys_madvise
> -	.long sys_fcntl64
> -	.long sys_readahead	/* 240 */
> -	.long sys_io_setup
> -	.long sys_io_destroy
> -	.long sys_io_getevents
> -	.long sys_io_submit
> -	.long sys_io_cancel	/* 245 */
> -	.long sys_fadvise64
> -	.long sys_exit_group
> -	.long sys_lookup_dcookie
> -	.long sys_epoll_create
> -	.long sys_epoll_ctl	/* 250 */
> -	.long sys_epoll_wait
> -	.long sys_remap_file_pages
> -	.long sys_set_tid_address
> -	.long sys_timer_create
> -	.long sys_timer_settime	/* 255 */
> -	.long sys_timer_gettime
> -	.long sys_timer_getoverrun
> -	.long sys_timer_delete
> -	.long sys_clock_settime
> -	.long sys_clock_gettime	/* 260 */
> -	.long sys_clock_getres
> -	.long sys_clock_nanosleep
> -	.long sys_statfs64
> -	.long sys_fstatfs64
> -	.long sys_tgkill	/* 265 */
> -	.long sys_utimes
> -	.long sys_fadvise64_64
> -	.long sys_mbind
> -	.long sys_get_mempolicy
> -	.long sys_set_mempolicy	/* 270 */
> -	.long sys_mq_open
> -	.long sys_mq_unlink
> -	.long sys_mq_timedsend
> -	.long sys_mq_timedreceive
> -	.long sys_mq_notify	/* 275 */
> -	.long sys_mq_getsetattr
> -	.long sys_waitid
> -	.long sys_ni_syscall	/* for sys_vserver */
> -	.long sys_add_key
> -	.long sys_request_key	/* 280 */
> -	.long sys_keyctl
> -	.long sys_ioprio_set
> -	.long sys_ioprio_get
> -	.long sys_inotify_init
> -	.long sys_inotify_add_watch	/* 285 */
> -	.long sys_inotify_rm_watch
> -	.long sys_migrate_pages
> -	.long sys_openat
> -	.long sys_mkdirat
> -	.long sys_mknodat		/* 290 */
> -	.long sys_fchownat
> -	.long sys_futimesat
> -	.long sys_fstatat64
> -	.long sys_unlinkat
> -	.long sys_renameat		/* 295 */
> -	.long sys_linkat
> -	.long sys_symlinkat
> -	.long sys_readlinkat
> -	.long sys_fchmodat
> -	.long sys_faccessat		/* 300 */
> -	.long sys_ni_syscall		/* Reserved for pselect6 */
> -	.long sys_ni_syscall		/* Reserved for ppoll */
> -	.long sys_unshare
> -	.long sys_set_robust_list
> -	.long sys_get_robust_list	/* 305 */
> -	.long sys_splice
> -	.long sys_sync_file_range
> -	.long sys_tee
> -	.long sys_vmsplice
> -	.long sys_move_pages		/* 310 */
> -	.long sys_sched_setaffinity
> -	.long sys_sched_getaffinity
> -	.long sys_kexec_load
> -	.long sys_getcpu
> -	.long sys_epoll_pwait		/* 315 */
> -	.long sys_utimensat
> -	.long sys_signalfd
> -	.long sys_timerfd_create
> -	.long sys_eventfd
> -	.long sys_fallocate		/* 320 */
> -	.long sys_timerfd_settime
> -	.long sys_timerfd_gettime
> -	.long sys_signalfd4
> -	.long sys_eventfd2
> -	.long sys_epoll_create1		/* 325 */
> -	.long sys_dup3
> -	.long sys_pipe2
> -	.long sys_inotify_init1
> -	.long sys_preadv
> -	.long sys_pwritev		/* 330 */
> -	.long sys_rt_tgsigqueueinfo
> -	.long sys_perf_event_open
> -	.long sys_get_thread_area
> -	.long sys_set_thread_area
> -	.long sys_atomic_cmpxchg_32	/* 335 */
> -	.long sys_atomic_barrier
> -	.long sys_fanotify_init
> -	.long sys_fanotify_mark
> -	.long sys_prlimit64
> -	.long sys_name_to_handle_at	/* 340 */
> -	.long sys_open_by_handle_at
> -	.long sys_clock_adjtime
> -	.long sys_syncfs
> -
> diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
> index 01d91cb..8ad4f8e 100644
> --- a/arch/m68k/kernel/syscalltable.S
> +++ b/arch/m68k/kernel/syscalltable.S
> @@ -1,6 +1,4 @@
>   /*
> - *  linux/arch/m68knommu/kernel/syscalltable.S
> - *
>    *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
>    *
>    *  Based on older entry.S files, the following copyrights apply:
> @@ -9,170 +7,189 @@
>    *                      Kenneth Albanowski<kjahds@kjahds.com>,
>    *  Copyright (C) 2000  Lineo Inc. (www.lineo.com)
>    *  Copyright (C) 1991, 1992  Linus Torvalds
> + *
> + *  Linux/m68k support by Hamish Macdonald
>    */
>
>   #include<linux/linkage.h>
> -#include<asm/unistd.h>
>
> -.text
> +#ifndef CONFIG_MMU
> +#define sys_swapon		sys_ni_syscall
> +#define sys_swapoff		sys_ni_syscall
> +#define sys_mprotect		sys_ni_syscall
> +#define sys_msync		sys_ni_syscall
> +#define sys_mlock		sys_ni_syscall
> +#define sys_munlock		sys_ni_syscall
> +#define sys_mlockall		sys_ni_syscall
> +#define sys_munlockall		sys_ni_syscall
> +#define sys_mremap		sys_ni_syscall
> +#define sys_nfsservctl		sys_ni_syscall
> +#define sys_mincore		sys_ni_syscall
> +#define sys_madvise		sys_ni_syscall
> +#define sys_remap_file_pages	sys_ni_syscall
> +
> +#define sys_mmap2		sys_mmap_pgoff
> +#endif
> +
> +.data
>   ALIGN
>   ENTRY(sys_call_table)
> -	.long sys_restart_syscall	/* 0  -  old "setup()" system call */
> +	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
>   	.long sys_exit
>   	.long sys_fork
>   	.long sys_read
>   	.long sys_write
> -	.long sys_open		/* 5 */
> +	.long sys_open			/* 5 */
>   	.long sys_close
>   	.long sys_waitpid
>   	.long sys_creat
>   	.long sys_link
> -	.long sys_unlink	/* 10 */
> +	.long sys_unlink		/* 10 */
>   	.long sys_execve
>   	.long sys_chdir
>   	.long sys_time
>   	.long sys_mknod
> -	.long sys_chmod		/* 15 */
> +	.long sys_chmod			/* 15 */
>   	.long sys_chown16
> -	.long sys_ni_syscall	/* old break syscall holder */
> +	.long sys_ni_syscall		/* old break syscall holder */
>   	.long sys_stat
>   	.long sys_lseek
> -	.long sys_getpid	/* 20 */
> +	.long sys_getpid		/* 20 */
>   	.long sys_mount
>   	.long sys_oldumount
>   	.long sys_setuid16
>   	.long sys_getuid16
> -	.long sys_stime		/* 25 */
> +	.long sys_stime			/* 25 */
>   	.long sys_ptrace
>   	.long sys_alarm
>   	.long sys_fstat
>   	.long sys_pause
> -	.long sys_utime		/* 30 */
> -	.long sys_ni_syscall	/* old stty syscall holder */
> -	.long sys_ni_syscall	/* old gtty syscall holder */
> +	.long sys_utime			/* 30 */
> +	.long sys_ni_syscall		/* old stty syscall holder */
> +	.long sys_ni_syscall		/* old gtty syscall holder */
>   	.long sys_access
>   	.long sys_nice
> -	.long sys_ni_syscall	/* 35 */ /* old ftime syscall holder */
> +	.long sys_ni_syscall		/* 35 - old ftime syscall holder */
>   	.long sys_sync
>   	.long sys_kill
>   	.long sys_rename
>   	.long sys_mkdir
> -	.long sys_rmdir		/* 40 */
> +	.long sys_rmdir			/* 40 */
>   	.long sys_dup
>   	.long sys_pipe
>   	.long sys_times
> -	.long sys_ni_syscall	/* old prof syscall holder */
> -	.long sys_brk		/* 45 */
> +	.long sys_ni_syscall		/* old prof syscall holder */
> +	.long sys_brk			/* 45 */
>   	.long sys_setgid16
>   	.long sys_getgid16
>   	.long sys_signal
>   	.long sys_geteuid16
> -	.long sys_getegid16	/* 50 */
> +	.long sys_getegid16		/* 50 */
>   	.long sys_acct
> -	.long sys_umount	/* recycled never used phys() */
> -	.long sys_ni_syscall	/* old lock syscall holder */
> +	.long sys_umount		/* recycled never used phys() */
> +	.long sys_ni_syscall		/* old lock syscall holder */
>   	.long sys_ioctl
> -	.long sys_fcntl		/* 55 */
> -	.long sys_ni_syscall	/* old mpx syscall holder */
> +	.long sys_fcntl			/* 55 */
> +	.long sys_ni_syscall		/* old mpx syscall holder */
>   	.long sys_setpgid
> -	.long sys_ni_syscall	/* old ulimit syscall holder */
> +	.long sys_ni_syscall		/* old ulimit syscall holder */
>   	.long sys_ni_syscall
> -	.long sys_umask		/* 60 */
> +	.long sys_umask			/* 60 */
>   	.long sys_chroot
>   	.long sys_ustat
>   	.long sys_dup2
>   	.long sys_getppid
> -	.long sys_getpgrp	/* 65 */
> +	.long sys_getpgrp		/* 65 */
>   	.long sys_setsid
>   	.long sys_sigaction
>   	.long sys_sgetmask
>   	.long sys_ssetmask
> -	.long sys_setreuid16	/* 70 */
> +	.long sys_setreuid16		/* 70 */
>   	.long sys_setregid16
>   	.long sys_sigsuspend
>   	.long sys_sigpending
>   	.long sys_sethostname
> -	.long sys_setrlimit	/* 75 */
> +	.long sys_setrlimit		/* 75 */
>   	.long sys_old_getrlimit
>   	.long sys_getrusage
>   	.long sys_gettimeofday
>   	.long sys_settimeofday
> -	.long sys_getgroups16	/* 80 */
> +	.long sys_getgroups16		/* 80 */
>   	.long sys_setgroups16
>   	.long sys_old_select
>   	.long sys_symlink
>   	.long sys_lstat
> -	.long sys_readlink	/* 85 */
> +	.long sys_readlink		/* 85 */
>   	.long sys_uselib
> -	.long sys_ni_syscall	/* sys_swapon */
> +	.long sys_swapon
>   	.long sys_reboot
>   	.long sys_old_readdir
> -	.long sys_old_mmap	/* 90 */
> +	.long sys_old_mmap		/* 90 */
>   	.long sys_munmap
>   	.long sys_truncate
>   	.long sys_ftruncate
>   	.long sys_fchmod
> -	.long sys_fchown16	/* 95 */
> +	.long sys_fchown16		/* 95 */
>   	.long sys_getpriority
>   	.long sys_setpriority
> -	.long sys_ni_syscall	/* old profil syscall holder */
> +	.long sys_ni_syscall		/* old profil syscall holder */
>   	.long sys_statfs
> -	.long sys_fstatfs	/* 100 */
> -	.long sys_ni_syscall	/* ioperm for i386 */
> +	.long sys_fstatfs		/* 100 */
> +	.long sys_ni_syscall		/* ioperm for i386 */
>   	.long sys_socketcall
>   	.long sys_syslog
>   	.long sys_setitimer
> -	.long sys_getitimer	/* 105 */
> +	.long sys_getitimer		/* 105 */
>   	.long sys_newstat
>   	.long sys_newlstat
>   	.long sys_newfstat
>   	.long sys_ni_syscall
> -	.long sys_ni_syscall	/* iopl for i386 */ /* 110 */
> +	.long sys_ni_syscall		/* 110 - iopl for i386 */
>   	.long sys_vhangup
> -	.long sys_ni_syscall	/* obsolete idle() syscall */
> -	.long sys_ni_syscall	/* vm86old for i386 */
> +	.long sys_ni_syscall		/* obsolete idle() syscall */
> +	.long sys_ni_syscall		/* vm86old for i386 */
>   	.long sys_wait4
> -	.long sys_ni_syscall	/* 115 */ /* sys_swapoff */
> +	.long sys_swapoff		/* 115 */
>   	.long sys_sysinfo
>   	.long sys_ipc
>   	.long sys_fsync
>   	.long sys_sigreturn
> -	.long sys_clone		/* 120 */
> +	.long sys_clone			/* 120 */
>   	.long sys_setdomainname
>   	.long sys_newuname
> -	.long sys_cacheflush	/* modify_ldt for i386 */
> +	.long sys_cacheflush		/* modify_ldt for i386 */
>   	.long sys_adjtimex
> -	.long sys_ni_syscall	/* 125 */ /* sys_mprotect */
> +	.long sys_mprotect		/* 125 */
>   	.long sys_sigprocmask
> -	.long sys_ni_syscall	/* old "creat_module" */
> +	.long sys_ni_syscall		/* old "create_module" */
>   	.long sys_init_module
>   	.long sys_delete_module
> -	.long sys_ni_syscall	/* 130: old "get_kernel_syms" */
> +	.long sys_ni_syscall		/* 130 - old "get_kernel_syms" */
>   	.long sys_quotactl
>   	.long sys_getpgid
>   	.long sys_fchdir
>   	.long sys_bdflush
> -	.long sys_sysfs		/* 135 */
> +	.long sys_sysfs			/* 135 */
>   	.long sys_personality
> -	.long sys_ni_syscall	/* for afs_syscall */
> +	.long sys_ni_syscall		/* for afs_syscall */
>   	.long sys_setfsuid16
>   	.long sys_setfsgid16
> -	.long sys_llseek	/* 140 */
> +	.long sys_llseek		/* 140 */
>   	.long sys_getdents
>   	.long sys_select
>   	.long sys_flock
> -	.long sys_ni_syscall	/* sys_msync */
> -	.long sys_readv		/* 145 */
> +	.long sys_msync
> +	.long sys_readv			/* 145 */
>   	.long sys_writev
>   	.long sys_getsid
>   	.long sys_fdatasync
>   	.long sys_sysctl
> -	.long sys_ni_syscall	/* 150 */ /* sys_mlock */
> -	.long sys_ni_syscall	/* sys_munlock */
> -	.long sys_ni_syscall	/* sys_mlockall */
> -	.long sys_ni_syscall	/* sys_munlockall */
> +	.long sys_mlock			/* 150 */
> +	.long sys_munlock
> +	.long sys_mlockall
> +	.long sys_munlockall
>   	.long sys_sched_setparam
> -	.long sys_sched_getparam /* 155 */
> +	.long sys_sched_getparam	/* 155 */
>   	.long sys_sched_setscheduler
>   	.long sys_sched_getscheduler
>   	.long sys_sched_yield
> @@ -180,124 +197,124 @@ ENTRY(sys_call_table)
>   	.long sys_sched_get_priority_min  /* 160 */
>   	.long sys_sched_rr_get_interval
>   	.long sys_nanosleep
> -	.long sys_ni_syscall	/* sys_mremap */
> +	.long sys_mremap
>   	.long sys_setresuid16
> -	.long sys_getresuid16	/* 165 */
> -	.long sys_getpagesize	/* sys_getpagesize */
> -	.long sys_ni_syscall	/* old "query_module" */
> +	.long sys_getresuid16		/* 165 */
> +	.long sys_getpagesize
> +	.long sys_ni_syscall		/* old "query_module" */
>   	.long sys_poll
> -	.long sys_ni_syscall	/* sys_nfsservctl */
> -	.long sys_setresgid16	/* 170 */
> +	.long sys_nfsservctl
> +	.long sys_setresgid16		/* 170 */
>   	.long sys_getresgid16
>   	.long sys_prctl
>   	.long sys_rt_sigreturn
>   	.long sys_rt_sigaction
> -	.long sys_rt_sigprocmask /* 175 */
> +	.long sys_rt_sigprocmask	/* 175 */
>   	.long sys_rt_sigpending
>   	.long sys_rt_sigtimedwait
>   	.long sys_rt_sigqueueinfo
>   	.long sys_rt_sigsuspend
> -	.long sys_pread64	/* 180 */
> +	.long sys_pread64		/* 180 */
>   	.long sys_pwrite64
>   	.long sys_lchown16
>   	.long sys_getcwd
>   	.long sys_capget
> -	.long sys_capset	/* 185 */
> +	.long sys_capset		/* 185 */
>   	.long sys_sigaltstack
>   	.long sys_sendfile
> -	.long sys_ni_syscall	/* streams1 */
> -	.long sys_ni_syscall	/* streams2 */
> -	.long sys_vfork		/* 190 */
> +	.long sys_ni_syscall		/* streams1 */
> +	.long sys_ni_syscall		/* streams2 */
> +	.long sys_vfork			/* 190 */
>   	.long sys_getrlimit
> -	.long sys_mmap_pgoff
> +	.long sys_mmap2
>   	.long sys_truncate64
>   	.long sys_ftruncate64
> -	.long sys_stat64	/* 195 */
> +	.long sys_stat64		/* 195 */
>   	.long sys_lstat64
>   	.long sys_fstat64
>   	.long sys_chown
>   	.long sys_getuid
> -	.long sys_getgid	/* 200 */
> +	.long sys_getgid		/* 200 */
>   	.long sys_geteuid
>   	.long sys_getegid
>   	.long sys_setreuid
>   	.long sys_setregid
> -	.long sys_getgroups	/* 205 */
> +	.long sys_getgroups		/* 205 */
>   	.long sys_setgroups
>   	.long sys_fchown
>   	.long sys_setresuid
>   	.long sys_getresuid
> -	.long sys_setresgid	/* 210 */
> +	.long sys_setresgid		/* 210 */
>   	.long sys_getresgid
>   	.long sys_lchown
>   	.long sys_setuid
>   	.long sys_setgid
> -	.long sys_setfsuid	/* 215 */
> +	.long sys_setfsuid		/* 215 */
>   	.long sys_setfsgid
>   	.long sys_pivot_root
>   	.long sys_ni_syscall
>   	.long sys_ni_syscall
> -	.long sys_getdents64	/* 220 */
> +	.long sys_getdents64		/* 220 */
>   	.long sys_gettid
>   	.long sys_tkill
>   	.long sys_setxattr
>   	.long sys_lsetxattr
> -	.long sys_fsetxattr	/* 225 */
> +	.long sys_fsetxattr		/* 225 */
>   	.long sys_getxattr
>   	.long sys_lgetxattr
>   	.long sys_fgetxattr
>   	.long sys_listxattr
> -	.long sys_llistxattr	/* 230 */
> +	.long sys_llistxattr		/* 230 */
>   	.long sys_flistxattr
>   	.long sys_removexattr
>   	.long sys_lremovexattr
>   	.long sys_fremovexattr
> -	.long sys_futex		/* 235 */
> +	.long sys_futex			/* 235 */
>   	.long sys_sendfile64
> -	.long sys_ni_syscall	/* sys_mincore */
> -	.long sys_ni_syscall	/* sys_madvise */
> +	.long sys_mincore
> +	.long sys_madvise
>   	.long sys_fcntl64
> -	.long sys_readahead	/* 240 */
> +	.long sys_readahead		/* 240 */
>   	.long sys_io_setup
>   	.long sys_io_destroy
>   	.long sys_io_getevents
>   	.long sys_io_submit
> -	.long sys_io_cancel	/* 245 */
> +	.long sys_io_cancel		/* 245 */
>   	.long sys_fadvise64
>   	.long sys_exit_group
>   	.long sys_lookup_dcookie
>   	.long sys_epoll_create
> -	.long sys_epoll_ctl	/* 250 */
> +	.long sys_epoll_ctl		/* 250 */
>   	.long sys_epoll_wait
> -	.long sys_ni_syscall	/* sys_remap_file_pages */
> +	.long sys_remap_file_pages
>   	.long sys_set_tid_address
>   	.long sys_timer_create
> -	.long sys_timer_settime	/* 255 */
> +	.long sys_timer_settime		/* 255 */
>   	.long sys_timer_gettime
>   	.long sys_timer_getoverrun
>   	.long sys_timer_delete
>   	.long sys_clock_settime
> -	.long sys_clock_gettime	/* 260 */
> +	.long sys_clock_gettime		/* 260 */
>   	.long sys_clock_getres
>   	.long sys_clock_nanosleep
>   	.long sys_statfs64
>   	.long sys_fstatfs64
> -	.long sys_tgkill	/* 265 */
> +	.long sys_tgkill		/* 265 */
>   	.long sys_utimes
>   	.long sys_fadvise64_64
> -	.long sys_mbind	
> +	.long sys_mbind
>   	.long sys_get_mempolicy
> -	.long sys_set_mempolicy	/* 270 */
> +	.long sys_set_mempolicy		/* 270 */
>   	.long sys_mq_open
>   	.long sys_mq_unlink
>   	.long sys_mq_timedsend
>   	.long sys_mq_timedreceive
> -	.long sys_mq_notify	/* 275 */
> +	.long sys_mq_notify		/* 275 */
>   	.long sys_mq_getsetattr
>   	.long sys_waitid
> -	.long sys_ni_syscall	/* for sys_vserver */
> +	.long sys_ni_syscall		/* for sys_vserver */
>   	.long sys_add_key
> -	.long sys_request_key	/* 280 */
> +	.long sys_request_key		/* 280 */
>   	.long sys_keyctl
>   	.long sys_ioprio_set
>   	.long sys_ioprio_get
> @@ -362,7 +379,3 @@ ENTRY(sys_call_table)
>   	.long sys_clock_adjtime
>   	.long sys_syncfs
>
> -	.rept NR_syscalls-(.-sys_call_table)/4
> -		.long sys_ni_syscall
> -	.endr
> -


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table
@ 2011-04-06 20:33 Geert Uytterhoeven
  2011-04-07  1:53 ` Greg Ungerer
  2011-04-13 18:16 ` Geert Uytterhoeven
  0 siblings, 2 replies; 35+ messages in thread
From: Geert Uytterhoeven @ 2011-04-06 20:33 UTC (permalink / raw)
  To: Greg Ungerer; +Cc: Linux/m68k, uClinux list

Impact for m68knommu:
  - The table is now stored in .data instead of .text,
  - Removed unused padding at the end of the table.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Not tested on m68knommu

Questions:
  - Why was it .text?
  - Was NR_syscalls ever larger than the actual number of syscalls?

 arch/m68k/kernel/Makefile_mm    |    2 +-
 arch/m68k/kernel/entry_mm.S     |  348 ---------------------------------------
 arch/m68k/kernel/syscalltable.S |  205 ++++++++++++-----------
 3 files changed, 110 insertions(+), 445 deletions(-)

diff --git a/arch/m68k/kernel/Makefile_mm b/arch/m68k/kernel/Makefile_mm
index 55d5d6b..aced678 100644
--- a/arch/m68k/kernel/Makefile_mm
+++ b/arch/m68k/kernel/Makefile_mm
@@ -10,7 +10,7 @@ endif
 extra-y	+= vmlinux.lds
 
 obj-y	:= entry.o process.o traps.o ints.o signal.o ptrace.o module.o \
-	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o
+	   sys_m68k.o time.o setup.o m68k_ksyms.o devres.o syscalltable.o
 
 devres-y = ../../../kernel/irq/devres.o
 
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S
index 1359ee6..bd0ec05 100644
--- a/arch/m68k/kernel/entry_mm.S
+++ b/arch/m68k/kernel/entry_mm.S
@@ -407,351 +407,3 @@ resume:
 
 	rts
 
-.data
-ALIGN
-sys_call_table:
-	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
-	.long sys_exit
-	.long sys_fork
-	.long sys_read
-	.long sys_write
-	.long sys_open		/* 5 */
-	.long sys_close
-	.long sys_waitpid
-	.long sys_creat
-	.long sys_link
-	.long sys_unlink	/* 10 */
-	.long sys_execve
-	.long sys_chdir
-	.long sys_time
-	.long sys_mknod
-	.long sys_chmod		/* 15 */
-	.long sys_chown16
-	.long sys_ni_syscall				/* old break syscall holder */
-	.long sys_stat
-	.long sys_lseek
-	.long sys_getpid	/* 20 */
-	.long sys_mount
-	.long sys_oldumount
-	.long sys_setuid16
-	.long sys_getuid16
-	.long sys_stime		/* 25 */
-	.long sys_ptrace
-	.long sys_alarm
-	.long sys_fstat
-	.long sys_pause
-	.long sys_utime		/* 30 */
-	.long sys_ni_syscall				/* old stty syscall holder */
-	.long sys_ni_syscall				/* old gtty syscall holder */
-	.long sys_access
-	.long sys_nice
-	.long sys_ni_syscall	/* 35 */	/* old ftime syscall holder */
-	.long sys_sync
-	.long sys_kill
-	.long sys_rename
-	.long sys_mkdir
-	.long sys_rmdir		/* 40 */
-	.long sys_dup
-	.long sys_pipe
-	.long sys_times
-	.long sys_ni_syscall				/* old prof syscall holder */
-	.long sys_brk		/* 45 */
-	.long sys_setgid16
-	.long sys_getgid16
-	.long sys_signal
-	.long sys_geteuid16
-	.long sys_getegid16	/* 50 */
-	.long sys_acct
-	.long sys_umount				/* recycled never used phys() */
-	.long sys_ni_syscall				/* old lock syscall holder */
-	.long sys_ioctl
-	.long sys_fcntl		/* 55 */
-	.long sys_ni_syscall				/* old mpx syscall holder */
-	.long sys_setpgid
-	.long sys_ni_syscall				/* old ulimit syscall holder */
-	.long sys_ni_syscall
-	.long sys_umask		/* 60 */
-	.long sys_chroot
-	.long sys_ustat
-	.long sys_dup2
-	.long sys_getppid
-	.long sys_getpgrp	/* 65 */
-	.long sys_setsid
-	.long sys_sigaction
-	.long sys_sgetmask
-	.long sys_ssetmask
-	.long sys_setreuid16	/* 70 */
-	.long sys_setregid16
-	.long sys_sigsuspend
-	.long sys_sigpending
-	.long sys_sethostname
-	.long sys_setrlimit	/* 75 */
-	.long sys_old_getrlimit
-	.long sys_getrusage
-	.long sys_gettimeofday
-	.long sys_settimeofday
-	.long sys_getgroups16	/* 80 */
-	.long sys_setgroups16
-	.long sys_old_select
-	.long sys_symlink
-	.long sys_lstat
-	.long sys_readlink	/* 85 */
-	.long sys_uselib
-	.long sys_swapon
-	.long sys_reboot
-	.long sys_old_readdir
-	.long sys_old_mmap	/* 90 */
-	.long sys_munmap
-	.long sys_truncate
-	.long sys_ftruncate
-	.long sys_fchmod
-	.long sys_fchown16	/* 95 */
-	.long sys_getpriority
-	.long sys_setpriority
-	.long sys_ni_syscall				/* old profil syscall holder */
-	.long sys_statfs
-	.long sys_fstatfs	/* 100 */
-	.long sys_ni_syscall				/* ioperm for i386 */
-	.long sys_socketcall
-	.long sys_syslog
-	.long sys_setitimer
-	.long sys_getitimer	/* 105 */
-	.long sys_newstat
-	.long sys_newlstat
-	.long sys_newfstat
-	.long sys_ni_syscall
-	.long sys_ni_syscall	/* 110 */	/* iopl for i386 */
-	.long sys_vhangup
-	.long sys_ni_syscall				/* obsolete idle() syscall */
-	.long sys_ni_syscall				/* vm86old for i386 */
-	.long sys_wait4
-	.long sys_swapoff	/* 115 */
-	.long sys_sysinfo
-	.long sys_ipc
-	.long sys_fsync
-	.long sys_sigreturn
-	.long sys_clone		/* 120 */
-	.long sys_setdomainname
-	.long sys_newuname
-	.long sys_cacheflush				/* modify_ldt for i386 */
-	.long sys_adjtimex
-	.long sys_mprotect	/* 125 */
-	.long sys_sigprocmask
-	.long sys_ni_syscall		/* old "create_module" */
-	.long sys_init_module
-	.long sys_delete_module
-	.long sys_ni_syscall	/* 130 - old "get_kernel_syms" */
-	.long sys_quotactl
-	.long sys_getpgid
-	.long sys_fchdir
-	.long sys_bdflush
-	.long sys_sysfs		/* 135 */
-	.long sys_personality
-	.long sys_ni_syscall				/* for afs_syscall */
-	.long sys_setfsuid16
-	.long sys_setfsgid16
-	.long sys_llseek	/* 140 */
-	.long sys_getdents
-	.long sys_select
-	.long sys_flock
-	.long sys_msync
-	.long sys_readv		/* 145 */
-	.long sys_writev
-	.long sys_getsid
-	.long sys_fdatasync
-	.long sys_sysctl
-	.long sys_mlock		/* 150 */
-	.long sys_munlock
-	.long sys_mlockall
-	.long sys_munlockall
-	.long sys_sched_setparam
-	.long sys_sched_getparam	/* 155 */
-	.long sys_sched_setscheduler
-	.long sys_sched_getscheduler
-	.long sys_sched_yield
-	.long sys_sched_get_priority_max
-	.long sys_sched_get_priority_min  /* 160 */
-	.long sys_sched_rr_get_interval
-	.long sys_nanosleep
-	.long sys_mremap
-	.long sys_setresuid16
-	.long sys_getresuid16	/* 165 */
-	.long sys_getpagesize
-	.long sys_ni_syscall		/* old sys_query_module */
-	.long sys_poll
-	.long sys_nfsservctl
-	.long sys_setresgid16	/* 170 */
-	.long sys_getresgid16
-	.long sys_prctl
-	.long sys_rt_sigreturn
-	.long sys_rt_sigaction
-	.long sys_rt_sigprocmask	/* 175 */
-	.long sys_rt_sigpending
-	.long sys_rt_sigtimedwait
-	.long sys_rt_sigqueueinfo
-	.long sys_rt_sigsuspend
-	.long sys_pread64	/* 180 */
-	.long sys_pwrite64
-	.long sys_lchown16;
-	.long sys_getcwd
-	.long sys_capget
-	.long sys_capset	/* 185 */
-	.long sys_sigaltstack
-	.long sys_sendfile
-	.long sys_ni_syscall				/* streams1 */
-	.long sys_ni_syscall				/* streams2 */
-	.long sys_vfork		/* 190 */
-	.long sys_getrlimit
-	.long sys_mmap2
-	.long sys_truncate64
-	.long sys_ftruncate64
-	.long sys_stat64	/* 195 */
-	.long sys_lstat64
-	.long sys_fstat64
-	.long sys_chown
-	.long sys_getuid
-	.long sys_getgid	/* 200 */
-	.long sys_geteuid
-	.long sys_getegid
-	.long sys_setreuid
-	.long sys_setregid
-	.long sys_getgroups	/* 205 */
-	.long sys_setgroups
-	.long sys_fchown
-	.long sys_setresuid
-	.long sys_getresuid
-	.long sys_setresgid	/* 210 */
-	.long sys_getresgid
-	.long sys_lchown
-	.long sys_setuid
-	.long sys_setgid
-	.long sys_setfsuid	/* 215 */
-	.long sys_setfsgid
-	.long sys_pivot_root
-	.long sys_ni_syscall
-	.long sys_ni_syscall
-	.long sys_getdents64	/* 220 */
-	.long sys_gettid
-	.long sys_tkill
-	.long sys_setxattr
-	.long sys_lsetxattr
-	.long sys_fsetxattr	/* 225 */
-	.long sys_getxattr
-	.long sys_lgetxattr
-	.long sys_fgetxattr
-	.long sys_listxattr
-	.long sys_llistxattr	/* 230 */
-	.long sys_flistxattr
-	.long sys_removexattr
-	.long sys_lremovexattr
-	.long sys_fremovexattr
-	.long sys_futex		/* 235 */
-	.long sys_sendfile64
-	.long sys_mincore
-	.long sys_madvise
-	.long sys_fcntl64
-	.long sys_readahead	/* 240 */
-	.long sys_io_setup
-	.long sys_io_destroy
-	.long sys_io_getevents
-	.long sys_io_submit
-	.long sys_io_cancel	/* 245 */
-	.long sys_fadvise64
-	.long sys_exit_group
-	.long sys_lookup_dcookie
-	.long sys_epoll_create
-	.long sys_epoll_ctl	/* 250 */
-	.long sys_epoll_wait
-	.long sys_remap_file_pages
-	.long sys_set_tid_address
-	.long sys_timer_create
-	.long sys_timer_settime	/* 255 */
-	.long sys_timer_gettime
-	.long sys_timer_getoverrun
-	.long sys_timer_delete
-	.long sys_clock_settime
-	.long sys_clock_gettime	/* 260 */
-	.long sys_clock_getres
-	.long sys_clock_nanosleep
-	.long sys_statfs64
-	.long sys_fstatfs64
-	.long sys_tgkill	/* 265 */
-	.long sys_utimes
-	.long sys_fadvise64_64
-	.long sys_mbind
-	.long sys_get_mempolicy
-	.long sys_set_mempolicy	/* 270 */
-	.long sys_mq_open
-	.long sys_mq_unlink
-	.long sys_mq_timedsend
-	.long sys_mq_timedreceive
-	.long sys_mq_notify	/* 275 */
-	.long sys_mq_getsetattr
-	.long sys_waitid
-	.long sys_ni_syscall	/* for sys_vserver */
-	.long sys_add_key
-	.long sys_request_key	/* 280 */
-	.long sys_keyctl
-	.long sys_ioprio_set
-	.long sys_ioprio_get
-	.long sys_inotify_init
-	.long sys_inotify_add_watch	/* 285 */
-	.long sys_inotify_rm_watch
-	.long sys_migrate_pages
-	.long sys_openat
-	.long sys_mkdirat
-	.long sys_mknodat		/* 290 */
-	.long sys_fchownat
-	.long sys_futimesat
-	.long sys_fstatat64
-	.long sys_unlinkat
-	.long sys_renameat		/* 295 */
-	.long sys_linkat
-	.long sys_symlinkat
-	.long sys_readlinkat
-	.long sys_fchmodat
-	.long sys_faccessat		/* 300 */
-	.long sys_ni_syscall		/* Reserved for pselect6 */
-	.long sys_ni_syscall		/* Reserved for ppoll */
-	.long sys_unshare
-	.long sys_set_robust_list
-	.long sys_get_robust_list	/* 305 */
-	.long sys_splice
-	.long sys_sync_file_range
-	.long sys_tee
-	.long sys_vmsplice
-	.long sys_move_pages		/* 310 */
-	.long sys_sched_setaffinity
-	.long sys_sched_getaffinity
-	.long sys_kexec_load
-	.long sys_getcpu
-	.long sys_epoll_pwait		/* 315 */
-	.long sys_utimensat
-	.long sys_signalfd
-	.long sys_timerfd_create
-	.long sys_eventfd
-	.long sys_fallocate		/* 320 */
-	.long sys_timerfd_settime
-	.long sys_timerfd_gettime
-	.long sys_signalfd4
-	.long sys_eventfd2
-	.long sys_epoll_create1		/* 325 */
-	.long sys_dup3
-	.long sys_pipe2
-	.long sys_inotify_init1
-	.long sys_preadv
-	.long sys_pwritev		/* 330 */
-	.long sys_rt_tgsigqueueinfo
-	.long sys_perf_event_open
-	.long sys_get_thread_area
-	.long sys_set_thread_area
-	.long sys_atomic_cmpxchg_32	/* 335 */
-	.long sys_atomic_barrier
-	.long sys_fanotify_init
-	.long sys_fanotify_mark
-	.long sys_prlimit64
-	.long sys_name_to_handle_at	/* 340 */
-	.long sys_open_by_handle_at
-	.long sys_clock_adjtime
-	.long sys_syncfs
-
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index 01d91cb..8ad4f8e 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -1,6 +1,4 @@
 /*
- *  linux/arch/m68knommu/kernel/syscalltable.S
- *
  *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
  *
  *  Based on older entry.S files, the following copyrights apply:
@@ -9,170 +7,189 @@
  *                      Kenneth Albanowski <kjahds@kjahds.com>,
  *  Copyright (C) 2000  Lineo Inc. (www.lineo.com) 
  *  Copyright (C) 1991, 1992  Linus Torvalds
+ *
+ *  Linux/m68k support by Hamish Macdonald
  */
 
 #include <linux/linkage.h>
-#include <asm/unistd.h>
 
-.text
+#ifndef CONFIG_MMU
+#define sys_swapon		sys_ni_syscall
+#define sys_swapoff		sys_ni_syscall
+#define sys_mprotect		sys_ni_syscall
+#define sys_msync		sys_ni_syscall
+#define sys_mlock		sys_ni_syscall
+#define sys_munlock		sys_ni_syscall
+#define sys_mlockall		sys_ni_syscall
+#define sys_munlockall		sys_ni_syscall
+#define sys_mremap		sys_ni_syscall
+#define sys_nfsservctl		sys_ni_syscall
+#define sys_mincore		sys_ni_syscall
+#define sys_madvise		sys_ni_syscall
+#define sys_remap_file_pages	sys_ni_syscall
+
+#define sys_mmap2		sys_mmap_pgoff
+#endif
+
+.data
 ALIGN
 ENTRY(sys_call_table)
-	.long sys_restart_syscall	/* 0  -  old "setup()" system call */
+	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
 	.long sys_exit
 	.long sys_fork
 	.long sys_read
 	.long sys_write
-	.long sys_open		/* 5 */
+	.long sys_open			/* 5 */
 	.long sys_close
 	.long sys_waitpid
 	.long sys_creat
 	.long sys_link
-	.long sys_unlink	/* 10 */
+	.long sys_unlink		/* 10 */
 	.long sys_execve
 	.long sys_chdir
 	.long sys_time
 	.long sys_mknod
-	.long sys_chmod		/* 15 */
+	.long sys_chmod			/* 15 */
 	.long sys_chown16
-	.long sys_ni_syscall	/* old break syscall holder */
+	.long sys_ni_syscall		/* old break syscall holder */
 	.long sys_stat
 	.long sys_lseek
-	.long sys_getpid	/* 20 */
+	.long sys_getpid		/* 20 */
 	.long sys_mount
 	.long sys_oldumount
 	.long sys_setuid16
 	.long sys_getuid16
-	.long sys_stime		/* 25 */
+	.long sys_stime			/* 25 */
 	.long sys_ptrace
 	.long sys_alarm
 	.long sys_fstat
 	.long sys_pause
-	.long sys_utime		/* 30 */
-	.long sys_ni_syscall	/* old stty syscall holder */
-	.long sys_ni_syscall	/* old gtty syscall holder */
+	.long sys_utime			/* 30 */
+	.long sys_ni_syscall		/* old stty syscall holder */
+	.long sys_ni_syscall		/* old gtty syscall holder */
 	.long sys_access
 	.long sys_nice
-	.long sys_ni_syscall	/* 35 */ /* old ftime syscall holder */
+	.long sys_ni_syscall		/* 35 - old ftime syscall holder */
 	.long sys_sync
 	.long sys_kill
 	.long sys_rename
 	.long sys_mkdir
-	.long sys_rmdir		/* 40 */
+	.long sys_rmdir			/* 40 */
 	.long sys_dup
 	.long sys_pipe
 	.long sys_times
-	.long sys_ni_syscall	/* old prof syscall holder */
-	.long sys_brk		/* 45 */
+	.long sys_ni_syscall		/* old prof syscall holder */
+	.long sys_brk			/* 45 */
 	.long sys_setgid16
 	.long sys_getgid16
 	.long sys_signal
 	.long sys_geteuid16
-	.long sys_getegid16	/* 50 */
+	.long sys_getegid16		/* 50 */
 	.long sys_acct
-	.long sys_umount	/* recycled never used phys() */
-	.long sys_ni_syscall	/* old lock syscall holder */
+	.long sys_umount		/* recycled never used phys() */
+	.long sys_ni_syscall		/* old lock syscall holder */
 	.long sys_ioctl
-	.long sys_fcntl		/* 55 */
-	.long sys_ni_syscall	/* old mpx syscall holder */
+	.long sys_fcntl			/* 55 */
+	.long sys_ni_syscall		/* old mpx syscall holder */
 	.long sys_setpgid
-	.long sys_ni_syscall	/* old ulimit syscall holder */
+	.long sys_ni_syscall		/* old ulimit syscall holder */
 	.long sys_ni_syscall
-	.long sys_umask		/* 60 */
+	.long sys_umask			/* 60 */
 	.long sys_chroot
 	.long sys_ustat
 	.long sys_dup2
 	.long sys_getppid
-	.long sys_getpgrp	/* 65 */
+	.long sys_getpgrp		/* 65 */
 	.long sys_setsid
 	.long sys_sigaction
 	.long sys_sgetmask
 	.long sys_ssetmask
-	.long sys_setreuid16	/* 70 */
+	.long sys_setreuid16		/* 70 */
 	.long sys_setregid16
 	.long sys_sigsuspend
 	.long sys_sigpending
 	.long sys_sethostname
-	.long sys_setrlimit	/* 75 */
+	.long sys_setrlimit		/* 75 */
 	.long sys_old_getrlimit
 	.long sys_getrusage
 	.long sys_gettimeofday
 	.long sys_settimeofday
-	.long sys_getgroups16	/* 80 */
+	.long sys_getgroups16		/* 80 */
 	.long sys_setgroups16
 	.long sys_old_select
 	.long sys_symlink
 	.long sys_lstat
-	.long sys_readlink	/* 85 */
+	.long sys_readlink		/* 85 */
 	.long sys_uselib
-	.long sys_ni_syscall	/* sys_swapon */
+	.long sys_swapon
 	.long sys_reboot
 	.long sys_old_readdir
-	.long sys_old_mmap	/* 90 */
+	.long sys_old_mmap		/* 90 */
 	.long sys_munmap
 	.long sys_truncate
 	.long sys_ftruncate
 	.long sys_fchmod
-	.long sys_fchown16	/* 95 */
+	.long sys_fchown16		/* 95 */
 	.long sys_getpriority
 	.long sys_setpriority
-	.long sys_ni_syscall	/* old profil syscall holder */
+	.long sys_ni_syscall		/* old profil syscall holder */
 	.long sys_statfs
-	.long sys_fstatfs	/* 100 */
-	.long sys_ni_syscall	/* ioperm for i386 */
+	.long sys_fstatfs		/* 100 */
+	.long sys_ni_syscall		/* ioperm for i386 */
 	.long sys_socketcall
 	.long sys_syslog
 	.long sys_setitimer
-	.long sys_getitimer	/* 105 */
+	.long sys_getitimer		/* 105 */
 	.long sys_newstat
 	.long sys_newlstat
 	.long sys_newfstat
 	.long sys_ni_syscall
-	.long sys_ni_syscall	/* iopl for i386 */ /* 110 */
+	.long sys_ni_syscall		/* 110 - iopl for i386 */
 	.long sys_vhangup
-	.long sys_ni_syscall	/* obsolete idle() syscall */
-	.long sys_ni_syscall	/* vm86old for i386 */
+	.long sys_ni_syscall		/* obsolete idle() syscall */
+	.long sys_ni_syscall		/* vm86old for i386 */
 	.long sys_wait4
-	.long sys_ni_syscall	/* 115 */ /* sys_swapoff */
+	.long sys_swapoff		/* 115 */
 	.long sys_sysinfo
 	.long sys_ipc
 	.long sys_fsync
 	.long sys_sigreturn
-	.long sys_clone		/* 120 */
+	.long sys_clone			/* 120 */
 	.long sys_setdomainname
 	.long sys_newuname
-	.long sys_cacheflush	/* modify_ldt for i386 */
+	.long sys_cacheflush		/* modify_ldt for i386 */
 	.long sys_adjtimex
-	.long sys_ni_syscall	/* 125 */ /* sys_mprotect */
+	.long sys_mprotect		/* 125 */
 	.long sys_sigprocmask
-	.long sys_ni_syscall	/* old "creat_module" */
+	.long sys_ni_syscall		/* old "create_module" */
 	.long sys_init_module
 	.long sys_delete_module
-	.long sys_ni_syscall	/* 130: old "get_kernel_syms" */
+	.long sys_ni_syscall		/* 130 - old "get_kernel_syms" */
 	.long sys_quotactl
 	.long sys_getpgid
 	.long sys_fchdir
 	.long sys_bdflush
-	.long sys_sysfs		/* 135 */
+	.long sys_sysfs			/* 135 */
 	.long sys_personality
-	.long sys_ni_syscall	/* for afs_syscall */
+	.long sys_ni_syscall		/* for afs_syscall */
 	.long sys_setfsuid16
 	.long sys_setfsgid16
-	.long sys_llseek	/* 140 */
+	.long sys_llseek		/* 140 */
 	.long sys_getdents
 	.long sys_select
 	.long sys_flock
-	.long sys_ni_syscall	/* sys_msync */
-	.long sys_readv		/* 145 */
+	.long sys_msync
+	.long sys_readv			/* 145 */
 	.long sys_writev
 	.long sys_getsid
 	.long sys_fdatasync
 	.long sys_sysctl
-	.long sys_ni_syscall	/* 150 */ /* sys_mlock */
-	.long sys_ni_syscall	/* sys_munlock */
-	.long sys_ni_syscall	/* sys_mlockall */
-	.long sys_ni_syscall	/* sys_munlockall */
+	.long sys_mlock			/* 150 */
+	.long sys_munlock
+	.long sys_mlockall
+	.long sys_munlockall
 	.long sys_sched_setparam
-	.long sys_sched_getparam /* 155 */
+	.long sys_sched_getparam	/* 155 */
 	.long sys_sched_setscheduler
 	.long sys_sched_getscheduler
 	.long sys_sched_yield
@@ -180,124 +197,124 @@ ENTRY(sys_call_table)
 	.long sys_sched_get_priority_min  /* 160 */
 	.long sys_sched_rr_get_interval
 	.long sys_nanosleep
-	.long sys_ni_syscall	/* sys_mremap */
+	.long sys_mremap
 	.long sys_setresuid16
-	.long sys_getresuid16	/* 165 */
-	.long sys_getpagesize	/* sys_getpagesize */
-	.long sys_ni_syscall	/* old "query_module" */
+	.long sys_getresuid16		/* 165 */
+	.long sys_getpagesize
+	.long sys_ni_syscall		/* old "query_module" */
 	.long sys_poll
-	.long sys_ni_syscall	/* sys_nfsservctl */
-	.long sys_setresgid16	/* 170 */
+	.long sys_nfsservctl
+	.long sys_setresgid16		/* 170 */
 	.long sys_getresgid16
 	.long sys_prctl
 	.long sys_rt_sigreturn
 	.long sys_rt_sigaction
-	.long sys_rt_sigprocmask /* 175 */
+	.long sys_rt_sigprocmask	/* 175 */
 	.long sys_rt_sigpending
 	.long sys_rt_sigtimedwait
 	.long sys_rt_sigqueueinfo
 	.long sys_rt_sigsuspend
-	.long sys_pread64	/* 180 */
+	.long sys_pread64		/* 180 */
 	.long sys_pwrite64
 	.long sys_lchown16
 	.long sys_getcwd
 	.long sys_capget
-	.long sys_capset	/* 185 */
+	.long sys_capset		/* 185 */
 	.long sys_sigaltstack
 	.long sys_sendfile
-	.long sys_ni_syscall	/* streams1 */
-	.long sys_ni_syscall	/* streams2 */
-	.long sys_vfork		/* 190 */
+	.long sys_ni_syscall		/* streams1 */
+	.long sys_ni_syscall		/* streams2 */
+	.long sys_vfork			/* 190 */
 	.long sys_getrlimit
-	.long sys_mmap_pgoff
+	.long sys_mmap2
 	.long sys_truncate64
 	.long sys_ftruncate64
-	.long sys_stat64	/* 195 */
+	.long sys_stat64		/* 195 */
 	.long sys_lstat64
 	.long sys_fstat64
 	.long sys_chown
 	.long sys_getuid
-	.long sys_getgid	/* 200 */
+	.long sys_getgid		/* 200 */
 	.long sys_geteuid
 	.long sys_getegid
 	.long sys_setreuid
 	.long sys_setregid
-	.long sys_getgroups	/* 205 */
+	.long sys_getgroups		/* 205 */
 	.long sys_setgroups
 	.long sys_fchown
 	.long sys_setresuid
 	.long sys_getresuid
-	.long sys_setresgid	/* 210 */
+	.long sys_setresgid		/* 210 */
 	.long sys_getresgid
 	.long sys_lchown
 	.long sys_setuid
 	.long sys_setgid
-	.long sys_setfsuid	/* 215 */
+	.long sys_setfsuid		/* 215 */
 	.long sys_setfsgid
 	.long sys_pivot_root
 	.long sys_ni_syscall
 	.long sys_ni_syscall
-	.long sys_getdents64	/* 220 */
+	.long sys_getdents64		/* 220 */
 	.long sys_gettid
 	.long sys_tkill
 	.long sys_setxattr
 	.long sys_lsetxattr
-	.long sys_fsetxattr	/* 225 */
+	.long sys_fsetxattr		/* 225 */
 	.long sys_getxattr
 	.long sys_lgetxattr
 	.long sys_fgetxattr
 	.long sys_listxattr
-	.long sys_llistxattr	/* 230 */
+	.long sys_llistxattr		/* 230 */
 	.long sys_flistxattr
 	.long sys_removexattr
 	.long sys_lremovexattr
 	.long sys_fremovexattr
-	.long sys_futex		/* 235 */
+	.long sys_futex			/* 235 */
 	.long sys_sendfile64
-	.long sys_ni_syscall	/* sys_mincore */
-	.long sys_ni_syscall	/* sys_madvise */
+	.long sys_mincore
+	.long sys_madvise
 	.long sys_fcntl64
-	.long sys_readahead	/* 240 */
+	.long sys_readahead		/* 240 */
 	.long sys_io_setup
 	.long sys_io_destroy
 	.long sys_io_getevents
 	.long sys_io_submit
-	.long sys_io_cancel	/* 245 */
+	.long sys_io_cancel		/* 245 */
 	.long sys_fadvise64
 	.long sys_exit_group
 	.long sys_lookup_dcookie
 	.long sys_epoll_create
-	.long sys_epoll_ctl	/* 250 */
+	.long sys_epoll_ctl		/* 250 */
 	.long sys_epoll_wait
-	.long sys_ni_syscall	/* sys_remap_file_pages */
+	.long sys_remap_file_pages
 	.long sys_set_tid_address
 	.long sys_timer_create
-	.long sys_timer_settime	/* 255 */
+	.long sys_timer_settime		/* 255 */
 	.long sys_timer_gettime
 	.long sys_timer_getoverrun
 	.long sys_timer_delete
 	.long sys_clock_settime
-	.long sys_clock_gettime	/* 260 */
+	.long sys_clock_gettime		/* 260 */
 	.long sys_clock_getres
 	.long sys_clock_nanosleep
 	.long sys_statfs64
 	.long sys_fstatfs64
-	.long sys_tgkill	/* 265 */
+	.long sys_tgkill		/* 265 */
 	.long sys_utimes
 	.long sys_fadvise64_64
-	.long sys_mbind	
+	.long sys_mbind
 	.long sys_get_mempolicy
-	.long sys_set_mempolicy	/* 270 */
+	.long sys_set_mempolicy		/* 270 */
 	.long sys_mq_open
 	.long sys_mq_unlink
 	.long sys_mq_timedsend
 	.long sys_mq_timedreceive
-	.long sys_mq_notify	/* 275 */
+	.long sys_mq_notify		/* 275 */
 	.long sys_mq_getsetattr
 	.long sys_waitid
-	.long sys_ni_syscall	/* for sys_vserver */
+	.long sys_ni_syscall		/* for sys_vserver */
 	.long sys_add_key
-	.long sys_request_key	/* 280 */
+	.long sys_request_key		/* 280 */
 	.long sys_keyctl
 	.long sys_ioprio_set
 	.long sys_ioprio_get
@@ -362,7 +379,3 @@ ENTRY(sys_call_table)
 	.long sys_clock_adjtime
 	.long sys_syncfs
 
-	.rept NR_syscalls-(.-sys_call_table)/4
-		.long sys_ni_syscall
-	.endr
-
-- 
1.7.0.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2011-10-23 14:59 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 18:37 [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table Geert Uytterhoeven
2011-05-04 18:37 ` Geert Uytterhoeven
2011-05-04 22:18 ` Greg Ungerer
2011-05-04 22:18   ` Greg Ungerer
2011-05-05  6:24 ` Arnd Bergmann
2011-05-05  6:24   ` Arnd Bergmann
2011-05-05  7:55   ` Greg Ungerer
2011-05-05  7:55   ` Greg Ungerer
2011-05-05 18:44   ` Geert Uytterhoeven
2011-05-05 18:44     ` Geert Uytterhoeven
2011-05-05 20:37     ` Arnd Bergmann
2011-05-05 20:37       ` Arnd Bergmann
2011-05-06  5:11       ` Geert Uytterhoeven
2011-05-06  5:11       ` Geert Uytterhoeven
2011-05-06  8:24         ` Andreas Schwab
2011-05-06  8:24           ` Andreas Schwab
2011-05-06 18:56           ` Geert Uytterhoeven
2011-05-06 18:56             ` Geert Uytterhoeven
2011-05-05 20:39     ` Mikael Pettersson
2011-05-07  8:34       ` Geert Uytterhoeven
2011-05-07  8:34         ` Geert Uytterhoeven
2011-05-07 13:16         ` Mikael Pettersson
2011-10-23  9:53     ` Andreas Schwab
2011-10-23 12:20       ` Geert Uytterhoeven
2011-10-23 14:59         ` Andreas Schwab
2011-10-23 14:59           ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2011-04-06 20:33 Geert Uytterhoeven
2011-04-07  1:53 ` Greg Ungerer
2011-04-13 18:16 ` Geert Uytterhoeven
2011-04-17 20:13   ` Arnd Bergmann
2011-04-19  4:32     ` Greg Ungerer
2011-04-19  8:21       ` Arnd Bergmann
2011-04-19  8:30         ` Geert Uytterhoeven
2011-04-19  8:52         ` Arnd Bergmann
2011-04-19 12:26         ` Greg Ungerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.