Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: add system call table generation support

The system call tables are in different format in all
architecture and it will be difficult to manually add or
modify the system calls in the respective files. To make
it easy by keeping a script and which will generate the
uapi header and syscall table file. This change will also
help to unify the implementation across all architectures.

The system call table generation script is added in
syscalls directory which contain the script to generate
both uapi header file and system call table files.
The syscall.tbl file will be the input for the scripts.

syscall.tbl contains the list of available system calls
along with system call number and corresponding entry point.
Add a new system call in this architecture will be possible
by adding new entry in the syscall.tbl file.

Adding a new table entry consisting of:
- System call number.
- ABI.
- System call name.
- Entry point name.
- Compat entry name, if required.

syscallhdr.sh and syscalltbl.sh will generate uapi header-
unistd_32/64.h and syscall_table_32/64/c32/spu.h files
respectively. File syscall_table_32/64/c32/spu.h is incl-
uded by syscall.S - the real system call table. Both *.sh
files will parse the content syscall.tbl to generate the
header and table files.

ARM, s390 and x86 architecuture does have similar support.
I leverage their implementation to come up with a generic
solution.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Firoz Khan and committed by
Michael Ellerman
aff85039 fbf508da

+563
+63
arch/powerpc/kernel/syscalls/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + kapi := arch/$(SRCARCH)/include/generated/asm 3 + uapi := arch/$(SRCARCH)/include/generated/uapi/asm 4 + 5 + _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ 6 + $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7 + 8 + syscall := $(srctree)/$(src)/syscall.tbl 9 + syshdr := $(srctree)/$(src)/syscallhdr.sh 10 + systbl := $(srctree)/$(src)/syscalltbl.sh 11 + 12 + quiet_cmd_syshdr = SYSHDR $@ 13 + cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 14 + '$(syshdr_abis_$(basetarget))' \ 15 + '$(syshdr_pfx_$(basetarget))' \ 16 + '$(syshdr_offset_$(basetarget))' 17 + 18 + quiet_cmd_systbl = SYSTBL $@ 19 + cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ 20 + '$(systbl_abis_$(basetarget))' \ 21 + '$(systbl_abi_$(basetarget))' \ 22 + '$(systbl_offset_$(basetarget))' 23 + 24 + syshdr_abis_unistd_32 := common,nospu,32 25 + $(uapi)/unistd_32.h: $(syscall) $(syshdr) 26 + $(call if_changed,syshdr) 27 + 28 + syshdr_abis_unistd_64 := common,nospu,64 29 + $(uapi)/unistd_64.h: $(syscall) $(syshdr) 30 + $(call if_changed,syshdr) 31 + 32 + systbl_abis_syscall_table_32 := common,nospu,32 33 + systbl_abi_syscall_table_32 := 32 34 + $(kapi)/syscall_table_32.h: $(syscall) $(systbl) 35 + $(call if_changed,systbl) 36 + 37 + systbl_abis_syscall_table_64 := common,nospu,64 38 + systbl_abi_syscall_table_64 := 64 39 + $(kapi)/syscall_table_64.h: $(syscall) $(systbl) 40 + $(call if_changed,systbl) 41 + 42 + systbl_abis_syscall_table_c32 := common,nospu,32 43 + systbl_abi_syscall_table_c32 := c32 44 + $(kapi)/syscall_table_c32.h: $(syscall) $(systbl) 45 + $(call if_changed,systbl) 46 + 47 + systbl_abis_syscall_table_spu := common,spu 48 + systbl_abi_syscall_table_spu := spu 49 + $(kapi)/syscall_table_spu.h: $(syscall) $(systbl) 50 + $(call if_changed,systbl) 51 + 52 + uapisyshdr-y += unistd_32.h unistd_64.h 53 + kapisyshdr-y += syscall_table_32.h \ 54 + syscall_table_64.h \ 55 + syscall_table_c32.h \ 56 + syscall_table_spu.h 57 + 58 + targets += $(uapisyshdr-y) $(kapisyshdr-y) 59 + 60 + PHONY += all 61 + all: $(addprefix $(uapi)/,$(uapisyshdr-y)) 62 + all: $(addprefix $(kapi)/,$(kapisyshdr-y)) 63 + @:
+427
arch/powerpc/kernel/syscalls/syscall.tbl
··· 1 + # SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 2 + # 3 + # system call numbers and entry vectors for powerpc 4 + # 5 + # The format is: 6 + # <number> <abi> <name> <entry point> <compat entry point> 7 + # 8 + # The <abi> can be common, spu, nospu, 64, or 32 for this file. 9 + # 10 + 0 nospu restart_syscall sys_restart_syscall 11 + 1 nospu exit sys_exit 12 + 2 nospu fork ppc_fork 13 + 3 common read sys_read 14 + 4 common write sys_write 15 + 5 common open sys_open compat_sys_open 16 + 6 common close sys_close 17 + 7 common waitpid sys_waitpid 18 + 8 common creat sys_creat 19 + 9 common link sys_link 20 + 10 common unlink sys_unlink 21 + 11 nospu execve sys_execve compat_sys_execve 22 + 12 common chdir sys_chdir 23 + 13 common time sys_time compat_sys_time 24 + 14 common mknod sys_mknod 25 + 15 common chmod sys_chmod 26 + 16 common lchown sys_lchown 27 + 17 common break sys_ni_syscall 28 + 18 32 oldstat sys_stat sys_ni_syscall 29 + 18 64 oldstat sys_ni_syscall 30 + 18 spu oldstat sys_ni_syscall 31 + 19 common lseek sys_lseek compat_sys_lseek 32 + 20 common getpid sys_getpid 33 + 21 nospu mount sys_mount compat_sys_mount 34 + 22 32 umount sys_oldumount 35 + 22 64 umount sys_ni_syscall 36 + 22 spu umount sys_ni_syscall 37 + 23 common setuid sys_setuid 38 + 24 common getuid sys_getuid 39 + 25 common stime sys_stime compat_sys_stime 40 + 26 nospu ptrace sys_ptrace compat_sys_ptrace 41 + 27 common alarm sys_alarm 42 + 28 32 oldfstat sys_fstat sys_ni_syscall 43 + 28 64 oldfstat sys_ni_syscall 44 + 28 spu oldfstat sys_ni_syscall 45 + 29 nospu pause sys_pause 46 + 30 nospu utime sys_utime compat_sys_utime 47 + 31 common stty sys_ni_syscall 48 + 32 common gtty sys_ni_syscall 49 + 33 common access sys_access 50 + 34 common nice sys_nice 51 + 35 common ftime sys_ni_syscall 52 + 36 common sync sys_sync 53 + 37 common kill sys_kill 54 + 38 common rename sys_rename 55 + 39 common mkdir sys_mkdir 56 + 40 common rmdir sys_rmdir 57 + 41 common dup sys_dup 58 + 42 common pipe sys_pipe 59 + 43 common times sys_times compat_sys_times 60 + 44 common prof sys_ni_syscall 61 + 45 common brk sys_brk 62 + 46 common setgid sys_setgid 63 + 47 common getgid sys_getgid 64 + 48 nospu signal sys_signal 65 + 49 common geteuid sys_geteuid 66 + 50 common getegid sys_getegid 67 + 51 nospu acct sys_acct 68 + 52 nospu umount2 sys_umount 69 + 53 common lock sys_ni_syscall 70 + 54 common ioctl sys_ioctl compat_sys_ioctl 71 + 55 common fcntl sys_fcntl compat_sys_fcntl 72 + 56 common mpx sys_ni_syscall 73 + 57 common setpgid sys_setpgid 74 + 58 common ulimit sys_ni_syscall 75 + 59 32 oldolduname sys_olduname 76 + 59 64 oldolduname sys_ni_syscall 77 + 59 spu oldolduname sys_ni_syscall 78 + 60 common umask sys_umask 79 + 61 common chroot sys_chroot 80 + 62 nospu ustat sys_ustat compat_sys_ustat 81 + 63 common dup2 sys_dup2 82 + 64 common getppid sys_getppid 83 + 65 common getpgrp sys_getpgrp 84 + 66 common setsid sys_setsid 85 + 67 32 sigaction sys_sigaction compat_sys_sigaction 86 + 67 64 sigaction sys_ni_syscall 87 + 67 spu sigaction sys_ni_syscall 88 + 68 common sgetmask sys_sgetmask 89 + 69 common ssetmask sys_ssetmask 90 + 70 common setreuid sys_setreuid 91 + 71 common setregid sys_setregid 92 + 72 32 sigsuspend sys_sigsuspend 93 + 72 64 sigsuspend sys_ni_syscall 94 + 72 spu sigsuspend sys_ni_syscall 95 + 73 32 sigpending sys_sigpending compat_sys_sigpending 96 + 73 64 sigpending sys_ni_syscall 97 + 73 spu sigpending sys_ni_syscall 98 + 74 common sethostname sys_sethostname 99 + 75 common setrlimit sys_setrlimit compat_sys_setrlimit 100 + 76 32 getrlimit sys_old_getrlimit compat_sys_old_getrlimit 101 + 76 64 getrlimit sys_ni_syscall 102 + 76 spu getrlimit sys_ni_syscall 103 + 77 common getrusage sys_getrusage compat_sys_getrusage 104 + 78 common gettimeofday sys_gettimeofday compat_sys_gettimeofday 105 + 79 common settimeofday sys_settimeofday compat_sys_settimeofday 106 + 80 common getgroups sys_getgroups 107 + 81 common setgroups sys_setgroups 108 + 82 32 select ppc_select sys_ni_syscall 109 + 82 64 select sys_ni_syscall 110 + 82 spu select sys_ni_syscall 111 + 83 common symlink sys_symlink 112 + 84 32 oldlstat sys_lstat sys_ni_syscall 113 + 84 64 oldlstat sys_ni_syscall 114 + 84 spu oldlstat sys_ni_syscall 115 + 85 common readlink sys_readlink 116 + 86 nospu uselib sys_uselib 117 + 87 nospu swapon sys_swapon 118 + 88 nospu reboot sys_reboot 119 + 89 32 readdir sys_old_readdir compat_sys_old_readdir 120 + 89 64 readdir sys_ni_syscall 121 + 89 spu readdir sys_ni_syscall 122 + 90 common mmap sys_mmap 123 + 91 common munmap sys_munmap 124 + 92 common truncate sys_truncate compat_sys_truncate 125 + 93 common ftruncate sys_ftruncate compat_sys_ftruncate 126 + 94 common fchmod sys_fchmod 127 + 95 common fchown sys_fchown 128 + 96 common getpriority sys_getpriority 129 + 97 common setpriority sys_setpriority 130 + 98 common profil sys_ni_syscall 131 + 99 nospu statfs sys_statfs compat_sys_statfs 132 + 100 nospu fstatfs sys_fstatfs compat_sys_fstatfs 133 + 101 common ioperm sys_ni_syscall 134 + 102 common socketcall sys_socketcall compat_sys_socketcall 135 + 103 common syslog sys_syslog 136 + 104 common setitimer sys_setitimer compat_sys_setitimer 137 + 105 common getitimer sys_getitimer compat_sys_getitimer 138 + 106 common stat sys_newstat compat_sys_newstat 139 + 107 common lstat sys_newlstat compat_sys_newlstat 140 + 108 common fstat sys_newfstat compat_sys_newfstat 141 + 109 32 olduname sys_uname 142 + 109 64 olduname sys_ni_syscall 143 + 109 spu olduname sys_ni_syscall 144 + 110 common iopl sys_ni_syscall 145 + 111 common vhangup sys_vhangup 146 + 112 common idle sys_ni_syscall 147 + 113 common vm86 sys_ni_syscall 148 + 114 common wait4 sys_wait4 compat_sys_wait4 149 + 115 nospu swapoff sys_swapoff 150 + 116 common sysinfo sys_sysinfo compat_sys_sysinfo 151 + 117 nospu ipc sys_ipc compat_sys_ipc 152 + 118 common fsync sys_fsync 153 + 119 32 sigreturn sys_sigreturn compat_sys_sigreturn 154 + 119 64 sigreturn sys_ni_syscall 155 + 119 spu sigreturn sys_ni_syscall 156 + 120 nospu clone ppc_clone 157 + 121 common setdomainname sys_setdomainname 158 + 122 common uname sys_newuname 159 + 123 common modify_ldt sys_ni_syscall 160 + 124 common adjtimex sys_adjtimex compat_sys_adjtimex 161 + 125 common mprotect sys_mprotect 162 + 126 32 sigprocmask sys_sigprocmask compat_sys_sigprocmask 163 + 126 64 sigprocmask sys_ni_syscall 164 + 126 spu sigprocmask sys_ni_syscall 165 + 127 common create_module sys_ni_syscall 166 + 128 nospu init_module sys_init_module 167 + 129 nospu delete_module sys_delete_module 168 + 130 common get_kernel_syms sys_ni_syscall 169 + 131 nospu quotactl sys_quotactl 170 + 132 common getpgid sys_getpgid 171 + 133 common fchdir sys_fchdir 172 + 134 common bdflush sys_bdflush 173 + 135 common sysfs sys_sysfs 174 + 136 32 personality sys_personality ppc64_personality 175 + 136 64 personality ppc64_personality 176 + 136 spu personality ppc64_personality 177 + 137 common afs_syscall sys_ni_syscall 178 + 138 common setfsuid sys_setfsuid 179 + 139 common setfsgid sys_setfsgid 180 + 140 common _llseek sys_llseek 181 + 141 common getdents sys_getdents compat_sys_getdents 182 + 142 common _newselect sys_select compat_sys_select 183 + 143 common flock sys_flock 184 + 144 common msync sys_msync 185 + 145 common readv sys_readv compat_sys_readv 186 + 146 common writev sys_writev compat_sys_writev 187 + 147 common getsid sys_getsid 188 + 148 common fdatasync sys_fdatasync 189 + 149 nospu _sysctl sys_sysctl compat_sys_sysctl 190 + 150 common mlock sys_mlock 191 + 151 common munlock sys_munlock 192 + 152 common mlockall sys_mlockall 193 + 153 common munlockall sys_munlockall 194 + 154 common sched_setparam sys_sched_setparam 195 + 155 common sched_getparam sys_sched_getparam 196 + 156 common sched_setscheduler sys_sched_setscheduler 197 + 157 common sched_getscheduler sys_sched_getscheduler 198 + 158 common sched_yield sys_sched_yield 199 + 159 common sched_get_priority_max sys_sched_get_priority_max 200 + 160 common sched_get_priority_min sys_sched_get_priority_min 201 + 161 common sched_rr_get_interval sys_sched_rr_get_interval compat_sys_sched_rr_get_interval 202 + 162 common nanosleep sys_nanosleep compat_sys_nanosleep 203 + 163 common mremap sys_mremap 204 + 164 common setresuid sys_setresuid 205 + 165 common getresuid sys_getresuid 206 + 166 common query_module sys_ni_syscall 207 + 167 common poll sys_poll 208 + 168 common nfsservctl sys_ni_syscall 209 + 169 common setresgid sys_setresgid 210 + 170 common getresgid sys_getresgid 211 + 171 common prctl sys_prctl 212 + 172 nospu rt_sigreturn sys_rt_sigreturn compat_sys_rt_sigreturn 213 + 173 nospu rt_sigaction sys_rt_sigaction compat_sys_rt_sigaction 214 + 174 nospu rt_sigprocmask sys_rt_sigprocmask compat_sys_rt_sigprocmask 215 + 175 nospu rt_sigpending sys_rt_sigpending compat_sys_rt_sigpending 216 + 176 nospu rt_sigtimedwait sys_rt_sigtimedwait compat_sys_rt_sigtimedwait 217 + 177 nospu rt_sigqueueinfo sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo 218 + 178 nospu rt_sigsuspend sys_rt_sigsuspend compat_sys_rt_sigsuspend 219 + 179 common pread64 sys_pread64 compat_sys_pread64 220 + 180 common pwrite64 sys_pwrite64 compat_sys_pwrite64 221 + 181 common chown sys_chown 222 + 182 common getcwd sys_getcwd 223 + 183 common capget sys_capget 224 + 184 common capset sys_capset 225 + 185 nospu sigaltstack sys_sigaltstack compat_sys_sigaltstack 226 + 186 32 sendfile sys_sendfile compat_sys_sendfile 227 + 186 64 sendfile sys_sendfile64 228 + 186 spu sendfile sys_sendfile64 229 + 187 common getpmsg sys_ni_syscall 230 + 188 common putpmsg sys_ni_syscall 231 + 189 nospu vfork ppc_vfork 232 + 190 common ugetrlimit sys_getrlimit compat_sys_getrlimit 233 + 191 common readahead sys_readahead compat_sys_readahead 234 + 192 32 mmap2 sys_mmap2 compat_sys_mmap2 235 + 193 32 truncate64 sys_truncate64 compat_sys_truncate64 236 + 194 32 ftruncate64 sys_ftruncate64 compat_sys_ftruncate64 237 + 195 32 stat64 sys_stat64 238 + 196 32 lstat64 sys_lstat64 239 + 197 32 fstat64 sys_fstat64 240 + 198 nospu pciconfig_read sys_pciconfig_read 241 + 199 nospu pciconfig_write sys_pciconfig_write 242 + 200 nospu pciconfig_iobase sys_pciconfig_iobase 243 + 201 common multiplexer sys_ni_syscall 244 + 202 common getdents64 sys_getdents64 245 + 203 common pivot_root sys_pivot_root 246 + 204 32 fcntl64 sys_fcntl64 compat_sys_fcntl64 247 + 205 common madvise sys_madvise 248 + 206 common mincore sys_mincore 249 + 207 common gettid sys_gettid 250 + 208 common tkill sys_tkill 251 + 209 common setxattr sys_setxattr 252 + 210 common lsetxattr sys_lsetxattr 253 + 211 common fsetxattr sys_fsetxattr 254 + 212 common getxattr sys_getxattr 255 + 213 common lgetxattr sys_lgetxattr 256 + 214 common fgetxattr sys_fgetxattr 257 + 215 common listxattr sys_listxattr 258 + 216 common llistxattr sys_llistxattr 259 + 217 common flistxattr sys_flistxattr 260 + 218 common removexattr sys_removexattr 261 + 219 common lremovexattr sys_lremovexattr 262 + 220 common fremovexattr sys_fremovexattr 263 + 221 common futex sys_futex compat_sys_futex 264 + 222 common sched_setaffinity sys_sched_setaffinity compat_sys_sched_setaffinity 265 + 223 common sched_getaffinity sys_sched_getaffinity compat_sys_sched_getaffinity 266 + # 224 unused 267 + 225 common tuxcall sys_ni_syscall 268 + 226 32 sendfile64 sys_sendfile64 compat_sys_sendfile64 269 + 227 common io_setup sys_io_setup compat_sys_io_setup 270 + 228 common io_destroy sys_io_destroy 271 + 229 common io_getevents sys_io_getevents compat_sys_io_getevents 272 + 230 common io_submit sys_io_submit compat_sys_io_submit 273 + 231 common io_cancel sys_io_cancel 274 + 232 nospu set_tid_address sys_set_tid_address 275 + 233 common fadvise64 sys_fadvise64 ppc32_fadvise64 276 + 234 nospu exit_group sys_exit_group 277 + 235 nospu lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie 278 + 236 common epoll_create sys_epoll_create 279 + 237 common epoll_ctl sys_epoll_ctl 280 + 238 common epoll_wait sys_epoll_wait 281 + 239 common remap_file_pages sys_remap_file_pages 282 + 240 common timer_create sys_timer_create compat_sys_timer_create 283 + 241 common timer_settime sys_timer_settime compat_sys_timer_settime 284 + 242 common timer_gettime sys_timer_gettime compat_sys_timer_gettime 285 + 243 common timer_getoverrun sys_timer_getoverrun 286 + 244 common timer_delete sys_timer_delete 287 + 245 common clock_settime sys_clock_settime compat_sys_clock_settime 288 + 246 common clock_gettime sys_clock_gettime compat_sys_clock_gettime 289 + 247 common clock_getres sys_clock_getres compat_sys_clock_getres 290 + 248 common clock_nanosleep sys_clock_nanosleep compat_sys_clock_nanosleep 291 + 249 32 swapcontext ppc_swapcontext ppc32_swapcontext 292 + 249 64 swapcontext ppc64_swapcontext 293 + 249 spu swapcontext sys_ni_syscall 294 + 250 common tgkill sys_tgkill 295 + 251 common utimes sys_utimes compat_sys_utimes 296 + 252 common statfs64 sys_statfs64 compat_sys_statfs64 297 + 253 common fstatfs64 sys_fstatfs64 compat_sys_fstatfs64 298 + 254 32 fadvise64_64 ppc_fadvise64_64 299 + 254 spu fadvise64_64 sys_ni_syscall 300 + 255 common rtas sys_rtas 301 + 256 32 sys_debug_setcontext sys_debug_setcontext sys_ni_syscall 302 + 256 64 sys_debug_setcontext sys_ni_syscall 303 + 256 spu sys_debug_setcontext sys_ni_syscall 304 + # 257 reserved for vserver 305 + 258 nospu migrate_pages sys_migrate_pages compat_sys_migrate_pages 306 + 259 nospu mbind sys_mbind compat_sys_mbind 307 + 260 nospu get_mempolicy sys_get_mempolicy compat_sys_get_mempolicy 308 + 261 nospu set_mempolicy sys_set_mempolicy compat_sys_set_mempolicy 309 + 262 nospu mq_open sys_mq_open compat_sys_mq_open 310 + 263 nospu mq_unlink sys_mq_unlink 311 + 264 nospu mq_timedsend sys_mq_timedsend compat_sys_mq_timedsend 312 + 265 nospu mq_timedreceive sys_mq_timedreceive compat_sys_mq_timedreceive 313 + 266 nospu mq_notify sys_mq_notify compat_sys_mq_notify 314 + 267 nospu mq_getsetattr sys_mq_getsetattr compat_sys_mq_getsetattr 315 + 268 nospu kexec_load sys_kexec_load compat_sys_kexec_load 316 + 269 nospu add_key sys_add_key 317 + 270 nospu request_key sys_request_key 318 + 271 nospu keyctl sys_keyctl compat_sys_keyctl 319 + 272 nospu waitid sys_waitid compat_sys_waitid 320 + 273 nospu ioprio_set sys_ioprio_set 321 + 274 nospu ioprio_get sys_ioprio_get 322 + 275 nospu inotify_init sys_inotify_init 323 + 276 nospu inotify_add_watch sys_inotify_add_watch 324 + 277 nospu inotify_rm_watch sys_inotify_rm_watch 325 + 278 nospu spu_run sys_spu_run 326 + 279 nospu spu_create sys_spu_create 327 + 280 nospu pselect6 sys_pselect6 compat_sys_pselect6 328 + 281 nospu ppoll sys_ppoll compat_sys_ppoll 329 + 282 common unshare sys_unshare 330 + 283 common splice sys_splice 331 + 284 common tee sys_tee 332 + 285 common vmsplice sys_vmsplice compat_sys_vmsplice 333 + 286 common openat sys_openat compat_sys_openat 334 + 287 common mkdirat sys_mkdirat 335 + 288 common mknodat sys_mknodat 336 + 289 common fchownat sys_fchownat 337 + 290 common futimesat sys_futimesat compat_sys_futimesat 338 + 291 32 fstatat64 sys_fstatat64 339 + 291 64 newfstatat sys_newfstatat 340 + 291 spu newfstatat sys_newfstatat 341 + 292 common unlinkat sys_unlinkat 342 + 293 common renameat sys_renameat 343 + 294 common linkat sys_linkat 344 + 295 common symlinkat sys_symlinkat 345 + 296 common readlinkat sys_readlinkat 346 + 297 common fchmodat sys_fchmodat 347 + 298 common faccessat sys_faccessat 348 + 299 common get_robust_list sys_get_robust_list compat_sys_get_robust_list 349 + 300 common set_robust_list sys_set_robust_list compat_sys_set_robust_list 350 + 301 common move_pages sys_move_pages compat_sys_move_pages 351 + 302 common getcpu sys_getcpu 352 + 303 nospu epoll_pwait sys_epoll_pwait compat_sys_epoll_pwait 353 + 304 common utimensat sys_utimensat compat_sys_utimensat 354 + 305 common signalfd sys_signalfd compat_sys_signalfd 355 + 306 common timerfd_create sys_timerfd_create 356 + 307 common eventfd sys_eventfd 357 + 308 common sync_file_range2 sys_sync_file_range2 compat_sys_sync_file_range2 358 + 309 nospu fallocate sys_fallocate compat_sys_fallocate 359 + 310 nospu subpage_prot sys_subpage_prot 360 + 311 common timerfd_settime sys_timerfd_settime compat_sys_timerfd_settime 361 + 312 common timerfd_gettime sys_timerfd_gettime compat_sys_timerfd_gettime 362 + 313 common signalfd4 sys_signalfd4 compat_sys_signalfd4 363 + 314 common eventfd2 sys_eventfd2 364 + 315 common epoll_create1 sys_epoll_create1 365 + 316 common dup3 sys_dup3 366 + 317 common pipe2 sys_pipe2 367 + 318 nospu inotify_init1 sys_inotify_init1 368 + 319 common perf_event_open sys_perf_event_open 369 + 320 common preadv sys_preadv compat_sys_preadv 370 + 321 common pwritev sys_pwritev compat_sys_pwritev 371 + 322 nospu rt_tgsigqueueinfo sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo 372 + 323 nospu fanotify_init sys_fanotify_init 373 + 324 nospu fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark 374 + 325 common prlimit64 sys_prlimit64 375 + 326 common socket sys_socket 376 + 327 common bind sys_bind 377 + 328 common connect sys_connect 378 + 329 common listen sys_listen 379 + 330 common accept sys_accept 380 + 331 common getsockname sys_getsockname 381 + 332 common getpeername sys_getpeername 382 + 333 common socketpair sys_socketpair 383 + 334 common send sys_send 384 + 335 common sendto sys_sendto 385 + 336 common recv sys_recv compat_sys_recv 386 + 337 common recvfrom sys_recvfrom compat_sys_recvfrom 387 + 338 common shutdown sys_shutdown 388 + 339 common setsockopt sys_setsockopt compat_sys_setsockopt 389 + 340 common getsockopt sys_getsockopt compat_sys_getsockopt 390 + 341 common sendmsg sys_sendmsg compat_sys_sendmsg 391 + 342 common recvmsg sys_recvmsg compat_sys_recvmsg 392 + 343 common recvmmsg sys_recvmmsg compat_sys_recvmmsg 393 + 344 common accept4 sys_accept4 394 + 345 common name_to_handle_at sys_name_to_handle_at 395 + 346 common open_by_handle_at sys_open_by_handle_at compat_sys_open_by_handle_at 396 + 347 common clock_adjtime sys_clock_adjtime compat_sys_clock_adjtime 397 + 348 common syncfs sys_syncfs 398 + 349 common sendmmsg sys_sendmmsg compat_sys_sendmmsg 399 + 350 common setns sys_setns 400 + 351 nospu process_vm_readv sys_process_vm_readv compat_sys_process_vm_readv 401 + 352 nospu process_vm_writev sys_process_vm_writev compat_sys_process_vm_writev 402 + 353 nospu finit_module sys_finit_module 403 + 354 nospu kcmp sys_kcmp 404 + 355 common sched_setattr sys_sched_setattr 405 + 356 common sched_getattr sys_sched_getattr 406 + 357 common renameat2 sys_renameat2 407 + 358 common seccomp sys_seccomp 408 + 359 common getrandom sys_getrandom 409 + 360 common memfd_create sys_memfd_create 410 + 361 common bpf sys_bpf 411 + 362 nospu execveat sys_execveat compat_sys_execveat 412 + 363 32 switch_endian sys_ni_syscall 413 + 363 64 switch_endian ppc_switch_endian 414 + 363 spu switch_endian sys_ni_syscall 415 + 364 common userfaultfd sys_userfaultfd 416 + 365 common membarrier sys_membarrier 417 + 378 nospu mlock2 sys_mlock2 418 + 379 nospu copy_file_range sys_copy_file_range 419 + 380 common preadv2 sys_preadv2 compat_sys_preadv2 420 + 381 common pwritev2 sys_pwritev2 compat_sys_pwritev2 421 + 382 nospu kexec_file_load sys_kexec_file_load 422 + 383 nospu statx sys_statx 423 + 384 nospu pkey_alloc sys_pkey_alloc 424 + 385 nospu pkey_free sys_pkey_free 425 + 386 nospu pkey_mprotect sys_pkey_mprotect 426 + 387 nospu rseq sys_rseq 427 + 388 nospu io_pgetevents sys_io_pgetevents compat_sys_io_pgetevents
+37
arch/powerpc/kernel/syscalls/syscallhdr.sh
··· 1 + #!/bin/sh 2 + # SPDX-License-Identifier: GPL-2.0 3 + 4 + in="$1" 5 + out="$2" 6 + my_abis=`echo "($3)" | tr ',' '|'` 7 + prefix="$4" 8 + offset="$5" 9 + 10 + fileguard=_UAPI_ASM_POWERPC_`basename "$out" | sed \ 11 + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ 12 + -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` 13 + grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( 14 + printf "#ifndef %s\n" "${fileguard}" 15 + printf "#define %s\n" "${fileguard}" 16 + printf "\n" 17 + 18 + nxt=0 19 + while read nr abi name entry compat ; do 20 + if [ -z "$offset" ]; then 21 + printf "#define __NR_%s%s\t%s\n" \ 22 + "${prefix}" "${name}" "${nr}" 23 + else 24 + printf "#define __NR_%s%s\t(%s + %s)\n" \ 25 + "${prefix}" "${name}" "${offset}" "${nr}" 26 + fi 27 + nxt=$((nr+1)) 28 + done 29 + 30 + printf "\n" 31 + printf "#ifdef __KERNEL__\n" 32 + printf "#define __NR_syscalls\t%s\n" "${nxt}" 33 + printf "#endif\n" 34 + printf "\n" 35 + printf "#endif /* %s */" "${fileguard}" 36 + printf "\n" 37 + ) > "$out"
+36
arch/powerpc/kernel/syscalls/syscalltbl.sh
··· 1 + #!/bin/sh 2 + # SPDX-License-Identifier: GPL-2.0 3 + 4 + in="$1" 5 + out="$2" 6 + my_abis=`echo "($3)" | tr ',' '|'` 7 + my_abi="$4" 8 + offset="$5" 9 + 10 + emit() { 11 + t_nxt="$1" 12 + t_nr="$2" 13 + t_entry="$3" 14 + 15 + while [ $t_nxt -lt $t_nr ]; do 16 + printf "__SYSCALL(%s,sys_ni_syscall, )\n" "${t_nxt}" 17 + t_nxt=$((t_nxt+1)) 18 + done 19 + printf "__SYSCALL(%s,%s, )\n" "${t_nxt}" "${t_entry}" 20 + } 21 + 22 + grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( 23 + nxt=0 24 + if [ -z "$offset" ]; then 25 + offset=0 26 + fi 27 + 28 + while read nr abi name entry compat ; do 29 + if [ "$my_abi" = "c32" ] && [ ! -z "$compat" ]; then 30 + emit $((nxt+offset)) $((nr+offset)) $compat 31 + else 32 + emit $((nxt+offset)) $((nr+offset)) $entry 33 + fi 34 + nxt=$((nr+1)) 35 + done 36 + ) > "$out"