]> asedeno.scripts.mit.edu Git - linux.git/commit
mips: add system call table generation support
authorFiroz Khan <firoz.khan@linaro.org>
Thu, 13 Dec 2018 09:07:38 +0000 (14:37 +0530)
committerPaul Burton <paul.burton@mips.com>
Fri, 14 Dec 2018 19:19:01 +0000 (11:19 -0800)
commit9bcbf97c62931f27ab2c52f0848dec0cd48aee78
tree2fde894ae90c2424d9dacc4860dbe71c5fe85062
parent6a00cb6175a4212e314a8f3166a66cfc2eee9e05
mips: 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,
modify or delete the syscall table entries in the res-
pective 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 implemen-
tation across all architectures.

The system call table generation script is added in
kernel/syscalls directory which contain the scripts to
generate both uapi header file and system call table
files. The syscall.tbl will be 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, syscallnr.sh and syscalltbl.sh will gene-
rate uapi header unistd_n64/n32/o32.h, unistd_nr_n64/n32/-
o32.h and syscall_table_32_o32/64_n64/64-n32/64-o32.h files
respectively. All *.sh files will parse the content sys-
call.tbl to generate the header and table files. unistd-
_n64/n32/o32.h and unistd_nr_n64/n32/o32.h will be included
by uapi/asm/unistd.h and syscall_table_32_o32/64_n64/64-n32-
/64-o32.h is included by kernel/syscall_table32_o32/64-
_n64/64-n32/64-o32.S - the real system call table.

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>
[paul.burton@mips.com:
 - Change sysnr_pfx_unistd_nr_n64 to 64.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: y2038@lists.linaro.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: arnd@arndb.de
Cc: deepa.kernel@gmail.com
Cc: marcin.juszkiewicz@linaro.org
arch/mips/kernel/syscalls/Makefile [new file with mode: 0644]
arch/mips/kernel/syscalls/syscall_n32.tbl [new file with mode: 0644]
arch/mips/kernel/syscalls/syscall_n64.tbl [new file with mode: 0644]
arch/mips/kernel/syscalls/syscall_o32.tbl [new file with mode: 0644]
arch/mips/kernel/syscalls/syscallhdr.sh [new file with mode: 0644]
arch/mips/kernel/syscalls/syscallnr.sh [new file with mode: 0644]
arch/mips/kernel/syscalls/syscalltbl.sh [new file with mode: 0644]