[PATCH RFC v3 6/8] sparc: Use the common syscall table
André Almeida <[email protected]>
| Newsgroups | gmane.linux.kbuild.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
Remove some of the duplicated code by using the common syscall number table. The generated files are not exactly the same as before, but they have no functional changes: - syscall_table_32.h would generated lines like the following __SYSCALL_WITH_COMPAT(422, sys_futex, sys_futex), which is equivalent to __SYSCALL(422, sys_futex) Signed-off-by: André Almeida <[email protected]> --- arch/sparc/kernel/syscalls/Makefile | 8 +++- arch/sparc/kernel/syscalls/syscall.tbl | 68 ---------------------------------- 2 files changed, 6 insertions(+), 70 deletions(-) diff --git a/arch/sparc/kernel/syscalls/Makefile b/arch/sparc/kernel/syscalls/Makefile index 8440c16dfb22..925d7886af74 100644 --- a/arch/sparc/kernel/syscalls/Makefile +++ b/arch/sparc/kernel/syscalls/Makefile @@ -5,14 +5,18 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm $(shell mkdir -p $(uapi) $(kapi)) syscall := $(src)/syscall.tbl +syscalltbl_common := $(srctree)/scripts/syscall_common.tbl syshdr := $(srctree)/scripts/syscallhdr.sh systbl := $(srctree)/scripts/syscalltbl.sh +abis := __cln3,common quiet_cmd_syshdr = SYSHDR $@ - cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis common,$* $< $@ + cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis $(abis),$* \ + --common-tbl $(syscalltbl_common) $< $@ quiet_cmd_systbl = SYSTBL $@ - cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@ + cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis),$* \ + --common-tbl $(syscalltbl_common) $< $@ $(uapi)/unistd_%.h: $(syscall) $(syshdr) FORCE $(call if_changed,syshdr) diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl index 7e71bf7fcd14..5f407da6b9da 100644 --- a/arch/sparc/kernel/syscalls/syscall.tbl +++ b/arch/sparc/kernel/syscalls/syscall.tbl @@ -449,71 +449,3 @@ 400 common msgsnd sys_msgsnd compat_sys_msgsnd 401 common msgrcv sys_msgrcv compat_sys_msgrcv 402 common msgctl sys_msgctl compat_sys_msgctl -403 32 clock_gettime64 sys_clock_gettime sys_clock_gettime -404 32 clock_settime64 sys_clock_settime sys_clock_settime -405 32 clock_adjtime64 sys_clock_adjtime sys_clock_adjtime -406 32 clock_getres_time64 sys_clock_getres sys_clock_getres -407 32 clock_nanosleep_time64 sys_clock_nanosleep sys_clock_nanosleep -408 32 timer_gettime64 sys_timer_gettime sys_timer_gettime -409 32 timer_settime64 sys_timer_settime sys_timer_settime -410 32 timerfd_gettime64 sys_timerfd_gettime sys_timerfd_gettime -411 32 timerfd_settime64 sys_timerfd_settime sys_timerfd_settime -412 32 utimensat_time64 sys_utimensat sys_utimensat -413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 -414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 -416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64 -417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 -418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend -419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive -420 32 semtimedop_time64 sys_semtimedop sys_semtimedop -421 32 rt_sigtimedwait_time64 sys_rt_sigtimedwait compat_sys_rt_sigtimedwait_time64 -422 32 futex_time64 sys_futex sys_futex -423 32 sched_rr_get_interval_time64 sys_sched_rr_get_interval sys_sched_rr_get_interval -424 common pidfd_send_signal sys_pidfd_send_signal -425 common io_uring_setup sys_io_uring_setup -426 common io_uring_enter sys_io_uring_enter -427 common io_uring_register sys_io_uring_register -428 common open_tree sys_open_tree -429 common move_mount sys_move_mount -430 common fsopen sys_fsopen -431 common fsconfig sys_fsconfig -432 common fsmount sys_fsmount -433 common fspick sys_fspick -434 common pidfd_open sys_pidfd_open -435 common clone3 __sys_clone3 -436 common close_range sys_close_range -437 common openat2 sys_openat2 -438 common pidfd_getfd sys_pidfd_getfd -439 common faccessat2 sys_faccessat2 -440 common process_madvise sys_process_madvise -441 common epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 -442 common mount_setattr sys_mount_setattr -443 common quotactl_fd sys_quotactl_fd -444 common landlock_create_ruleset sys_landlock_create_ruleset -445 common landlock_add_rule sys_landlock_add_rule -446 common landlock_restrict_self sys_landlock_restrict_self -# 447 reserved for memfd_secret -448 common process_mrelease sys_process_mrelease -449 common futex_waitv sys_futex_waitv -450 common set_mempolicy_home_node sys_set_mempolicy_home_node -451 common cachestat sys_cachestat -452 common fchmodat2 sys_fchmodat2 -453 common map_shadow_stack sys_map_shadow_stack -454 common futex_wake sys_futex_wake -455 common futex_wait sys_futex_wait -456 common futex_requeue sys_futex_requeue -457 common statmount sys_statmount -458 common listmount sys_listmount -459 common lsm_get_self_attr sys_lsm_get_self_attr -460 common lsm_set_self_attr sys_lsm_set_self_attr -461 common lsm_list_modules sys_lsm_list_modules -462 common mseal sys_mseal -463 common setxattrat sys_setxattrat -464 common getxattrat sys_getxattrat -465 common listxattrat sys_listxattrat -466 common removexattrat sys_removexattrat -467 common open_tree_attr sys_open_tree_attr -468 common file_getattr sys_file_getattr -469 common file_setattr sys_file_setattr -470 common listns sys_listns -471 common rseq_slice_yield sys_rseq_slice_yield -- 2.55.0