[PATCH 00/17] arch: convert everything to syscall.tbl

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann There are eight architectures using include/uapi/asm-generic/unistd.h, which is still in an old format and not easily parsed by scripts. In addition, arm64 uses the old format for the 32-bit arm compat syscalls, despite them using the modern syscall.tbl format for the native c

[PATCH 01/17] syscalls: add generic scripts/syscall.tbl

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The asm-generic/unistd.h header still follows the old style of defining system call numbers and the table. Most architectures got the new syscall.tbl format as part of the y2038 conversion back in 2018, but the newer architectures that share a single table never did. I did a

[PATCH 02/17] csky: drop asm/gpio.h wrapper

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The asm/gpio.h header is gone now that all architectures just use gpiolib, and so the redirect is no longer valid. Signed-off-by: Arnd Bergmann --- arch/csky/include/asm/Kbuild | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/csky/include/asm/Kbuild b/arch/csky/inclu

[PATCH 03/17] um: don't generate asm/bpf_perf_event.h

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann If we start validating the existence of the asm-generic side of generated headers, this one causes a warning: make[3]: *** No rule to make target 'arch/um/include/generated/asm/bpf_perf_event.h', needed by 'all'. Stop. The problem is that the asm-generic header only exists

[PATCH 04/17] loongarch: avoid generating extra header files

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The list of generated headers is rather outdated, some of these no longer exist, while others are already listed in include/asm-generic/Kbuild so there is no need to list them here. As we start validating the list of headers against the files that exist, the outdated ones now

[PATCH 05/17] kbuild: verify asm-generic header list

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann In order to integrate the system call header generation with generating the asm-generic wrappers, restrict the generated headers to those that actually exist in include/asm-generic/. The path is already known, so add these as a dependency. The asm-generic/bugs.h header was r

[PATCH 06/17] kbuild: add syscall table generation to scripts/Makefile.asm-headers

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann There are 11 copies of arch/*/kernel/syscalls/Makefile that all implement the same basic logic in a somewhat awkward way. I tried out various ways of unifying the existing copies and ended up with something that hooks into the logic for generating the redirections to asm-gene

[PATCH 07/17] clone3: drop __ARCH_WANT_SYS_CLONE3 macro

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann When clone3() was introduced, it was not obvious how each architecture deals with setting up the stack and keeping the register contents in a fork()-like system call, so this was left for the architecture maintainers to implement, with __ARCH_WANT_SYS_CLONE3 defined by those t

[PATCH 08/17] arc: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. arc has a couple of architecture specific system calls, which I add to the gene

[PATCH 09/17] arm64: convert unistd_32.h to syscall.tbl format

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann This is a straight conversion from the old asm/unistd32.h into the format used by 32-bit arm and most other architectures, calling scripts to generate the asm/unistd32.h header and a new asm/syscalls32.h headers. I used a semi-automated text replacement method to do the conve

[PATCH 10/17] arm64: generate 64-bit syscall.tbl

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann Change the asm/unistd.h header for arm64 to no longer include asm-generic/unistd.h itself, but instead generate both the asm/unistd.h contents and the list of entry points using the syscall.tbl scripts that we use on most other architectures. Once his is done for the remainin

[PATCH 11/17] arm64: rework compat syscall macros

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The generated asm/unistd_compat_32.h header file now contains macros that can be used directly in the vdso and the signal trampolines, so remove the duplicate definitions. Signed-off-by: Arnd Bergmann --- arch/arm64/include/asm/seccomp.h | 10 +- arch/

[PATCH 12/17] csky: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. csky has two architecture specific system calls, which I add to the generic tab

[PATCH 13/17] hexagon: use new system call table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. The time32, stat64, rlimit and renameat entries in the syscall_abis_32 line are

[PATCH 14/17] loongarch: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_64.h and asm/syscall_table_64.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. Unlike the other architectures using the asm-generic header, loongarch uses non

[PATCH 15/17] nios2: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. nios2 has one extra system call that gets added to scripts/syscall.tbl. The ti

[PATCH 16/17] openrisc: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. openrisc has one extra system call that gets added to scripts/syscall.tbl. The

[PATCH 17/17] riscv: convert to generic syscall table

2024-07-04 Thread Arnd Bergmann
From: Arnd Bergmann The uapi/asm/unistd_{32,64}.h and asm/syscall_table_{32,64}.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. riscv has two extra system call that gets added to scripts/syscall.tb