2 # SPDX-License-Identifier: GPL-2.0
4 # Generate system call table for perf. Derived from
7 # Copyright IBM Corp. 2017
8 # Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
9 # Changed by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
14 if ! test -r $SYSCALL_TBL; then
15 echo "Could not read input file" >&2
22 local max_nr nr abi sc discard
26 echo "static const char *syscalltbl_powerpc_${wordsize}[] = {"
27 while read nr abi sc discard
; do
28 if [ "$max_nr" -lt "$nr" ]; then
29 printf '\t[%d] = "%s",\n' $nr $sc
34 echo "#define SYSCALLTBL_POWERPC_${wordsize}_MAX_ID $max_nr"
37 grep -E "^[[:digit:]]+[[:space:]]+(common|spu|nospu|${wordsize})" $SYSCALL_TBL \
39 |create_table
${wordsize}