OSDN Git Service

powerpc: add system call table generation support
authorFiroz Khan <firoz.khan@linaro.org>
Mon, 17 Dec 2018 10:40:34 +0000 (16:10 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Dec 2018 03:46:50 +0000 (14:46 +1100)
commitaff8503932004d10eec4d550ec3527117fe18724
tree74f4b2acd98073ceb477bbe34ff7de82deb34678
parentfbf508da744053ff289777d6dd6e11ca8682be49
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>
arch/powerpc/kernel/syscalls/Makefile [new file with mode: 0644]
arch/powerpc/kernel/syscalls/syscall.tbl [new file with mode: 0644]
arch/powerpc/kernel/syscalls/syscallhdr.sh [new file with mode: 0644]
arch/powerpc/kernel/syscalls/syscalltbl.sh [new file with mode: 0644]