From patchwork Wed Jan 2 14:56:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154649 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp261751ljp; Wed, 2 Jan 2019 06:57:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/VkILhBJWpmRunlwBcGngEoEMnCt23UrpTnv9xtWbPVbzRdH40wXgONnP5bC1ZIPYuWvzQ+ X-Received: by 2002:a62:5dd1:: with SMTP id n78mr44116739pfj.58.1546441023589; Wed, 02 Jan 2019 06:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546441023; cv=none; d=google.com; s=arc-20160816; b=ym+M85eMC6kuqHAyUQSBt2JNXUULJKLql8SdWSL/tIx4Qt4FzUZUmU/a9bPgLso6fi vJJG+ko89k+m5OupMC2lHGvJFCwQ+IIGMrsJahob/j3fe3ME3TanP6Zrvb/C2bR4xEip qVCcJSoU69aZEZmS3w7QYR3RkSCDrTy9gUGeW3tqhrlhKLdgUIv46BPue74aWFTB64yi 3VTp95hPkM1+xaf+UxvqcgsKPAVxa5+PC3FMJd9XcmtChTdMBAvrkGLNkvZLyPd/e3xi 1oUfKKp+TdxbhupLtHPXNMiverg9QMaayv9qariYs6OkFVQJkAMy6BFFYxHe9Fx0C3cj Vw8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=AZpMXadv7N+HBsKpir5Le3ZPxvZAqE7DPpdjcjx0uwU=; b=pVtOC4O7k3mt4oAMVWjRG0/mLZheJOAaldqfLDkrjV5VsueqsuZlUOrUWdY/2j0cIR vWQlyXdIAF1feSxd1E0FUb/p4Nf6/+TrN6nxzA1y+mJx/MLrCjpclXF+qXjTS+y39paX agIn5UpKEW79gpQYIXNYIAlXJO6Ac+eVgA6/XmfFj6WS3PEx9j9ePxRq1L9wMsWu2ZwV M0W8DezcsCwAVwDxN8rsm/LO7GsdbQEvM2/NAtmTR7zUb1MlnNq7FUbckuNo2UEITmUV 0daykUwrLKGBY3hE1YRQyGwg6QaKoGJ04X5nZaxSWEeWf9fEw1nKEOj09WviQ1i0nJtj +2qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jHfbseUN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k35si47744920pgm.225.2019.01.02.06.57.03; Wed, 02 Jan 2019 06:57:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jHfbseUN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729742AbfABO44 (ORCPT + 31 others); Wed, 2 Jan 2019 09:56:56 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43488 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729700AbfABO4z (ORCPT ); Wed, 2 Jan 2019 09:56:55 -0500 Received: by mail-pg1-f196.google.com with SMTP id v28so14681644pgk.10 for ; Wed, 02 Jan 2019 06:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AZpMXadv7N+HBsKpir5Le3ZPxvZAqE7DPpdjcjx0uwU=; b=jHfbseUNtttCualNw9t94SDtdc8ElaepYh15xpb0kpx9V6TEQciFQFV9kWnPGeNb4C ae8jwZxAGJf51YD8k35hl+RNVN1XQrYrRZh1EE5KbrFLLFJwLosmS4DNc0I0Lxg5pw0X UhyV/kuS40hJjkcQ7yXy9kt3jii5/tLvIiqD4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AZpMXadv7N+HBsKpir5Le3ZPxvZAqE7DPpdjcjx0uwU=; b=FA2p4nad4FWXRAcLqPdeyyTc9vmV2EBQ/1EhycBCzBx1x7tAzBqpzdWnj9fb/RvMkw Wm4rVIyajER69rD7S0u8Xo9V0g96Akgp9xq2jdTcqkUN2pDK4/kLF9mkDnkZEits9uLk qgD6lFojeYF6DunkiI0CXkF7x5h8NIyfEscpwFiQSRK1QEHd3egVbX+YMzo+FfO+KaRg fAsW+r1jiJ6ZcTighzSdmfArjoHyW1TmbfWpNl7HnPeloexnximOtmkJ8nCTe+pKuy+X kgojUTWlIaFzB3J/oMRrDr2dnfC+hNADIVPM2kiRJTJXBFBxzj+P0/fQQQ2nmlkfAQoi VHwA== X-Gm-Message-State: AJcUukcWVXCbp7SwtckyIj6gLJeZ4RnOCj7f2RSuReiBqEL4c+BdZmjr YibqkJZ4MOYzvlSiOEMUsP+1CA== X-Received: by 2002:a63:d450:: with SMTP id i16mr41308693pgj.246.1546441014589; Wed, 02 Jan 2019 06:56:54 -0800 (PST) Received: from qualcomm-HP-ZBook-14-G2.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id 5sm96745685pfz.149.2019.01.02.06.56.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 06:56:54 -0800 (PST) From: Firoz Khan To: Paul Burton , Ralf Baechle , James Hogan , linux-mips@vger.kernel.org, Greg Kroah-Hartman , Philippe Ombredanne , Thomas Gleixner , Kate Stewart Cc: y2038@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, arnd@arndb.de, deepa.kernel@gmail.com, marcin.juszkiewicz@linaro.org, firoz.khan@linaro.org Subject: [PATCH 2/2] mips: generate uapi header and system call table files Date: Wed, 2 Jan 2019 20:26:18 +0530 Message-Id: <1546440978-19569-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546440978-19569-1-git-send-email-firoz.khan@linaro.org> References: <1546440978-19569-1-git-send-email-firoz.khan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Unified system call table generation script must be run to generate unistd_(nr_)n64/n32/o32.h and syscall_table- _32_o32/64_n64/64_n32/64-o32.h files. This patch will have changes which will invokes the script. This patch will generate unistd_(nr_)n64/n32/o32.h and syscall_table_32_o32/64_n64/64-n32/64-o32.h files by the syscall table generation script invoked by parisc/Make- file and the generated files against the removed files must be identical. The generated uapi header file will be included in uapi/- asm/unistd.h and generated system call table header file will be included by kernel/scall32-o32/64-n64/64-n32/- 64-o32.Sfile. Signed-off-by: Firoz Khan --- arch/mips/kernel/syscalls/Makefile | 6 +++--- arch/mips/kernel/syscalls/syscallhdr.sh | 37 --------------------------------- arch/mips/kernel/syscalls/syscallnr.sh | 28 ------------------------- arch/mips/kernel/syscalls/syscalltbl.sh | 36 -------------------------------- 4 files changed, 3 insertions(+), 104 deletions(-) delete mode 100644 arch/mips/kernel/syscalls/syscallhdr.sh delete mode 100644 arch/mips/kernel/syscalls/syscallnr.sh delete mode 100644 arch/mips/kernel/syscalls/syscalltbl.sh -- 1.9.1 diff --git a/arch/mips/kernel/syscalls/Makefile b/arch/mips/kernel/syscalls/Makefile index a3d4bec..8b7013e 100644 --- a/arch/mips/kernel/syscalls/Makefile +++ b/arch/mips/kernel/syscalls/Makefile @@ -8,9 +8,9 @@ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ syscalln32 := $(srctree)/$(src)/syscall_n32.tbl syscalln64 := $(srctree)/$(src)/syscall_n64.tbl syscallo32 := $(srctree)/$(src)/syscall_o32.tbl -syshdr := $(srctree)/$(src)/syscallhdr.sh -sysnr := $(srctree)/$(src)/syscallnr.sh -systbl := $(srctree)/$(src)/syscalltbl.sh +syshdr := $(srctree)/scripts/syscallhdr.sh +sysnr := $(srctree)/scripts/syscallnr.sh +systbl := $(srctree)/scripts/syscalltbl.sh quiet_cmd_syshdr = SYSHDR $@ cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ diff --git a/arch/mips/kernel/syscalls/syscallhdr.sh b/arch/mips/kernel/syscalls/syscallhdr.sh deleted file mode 100644 index d2bcfa8..0000000 --- a/arch/mips/kernel/syscalls/syscallhdr.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 - -in="$1" -out="$2" -my_abis=`echo "($3)" | tr ',' '|'` -prefix="$4" -offset="$5" - -fileguard=_UAPI_ASM_MIPS_`basename "$out" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ - -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` -grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( - printf "#ifndef %s\n" "${fileguard}" - printf "#define %s\n" "${fileguard}" - printf "\n" - - nxt=0 - while read nr abi name entry compat ; do - if [ -z "$offset" ]; then - printf "#define __NR_%s%s\t%s\n" \ - "${prefix}" "${name}" "${nr}" - else - printf "#define __NR_%s%s\t(%s + %s)\n" \ - "${prefix}" "${name}" "${offset}" "${nr}" - fi - nxt=$((nr+1)) - done - - printf "\n" - printf "#ifdef __KERNEL__\n" - printf "#define __NR_syscalls\t%s\n" "${nxt}" - printf "#endif\n" - printf "\n" - printf "#endif /* %s */" "${fileguard}" - printf "\n" -) > "$out" diff --git a/arch/mips/kernel/syscalls/syscallnr.sh b/arch/mips/kernel/syscalls/syscallnr.sh deleted file mode 100644 index 60bbdb3..0000000 --- a/arch/mips/kernel/syscalls/syscallnr.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 - -in="$1" -out="$2" -my_abis=`echo "($3)" | tr ',' '|'` -prefix="$4" -offset="$5" - -fileguard=_UAPI_ASM_MIPS_`basename "$out" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ - -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` -grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( - printf "#ifndef %s\n" "${fileguard}" - printf "#define %s\n" "${fileguard}" - printf "\n" - - nxt=0 - while read nr abi name entry compat ; do - nxt=$((nr+1)) - done - - printf "#define __NR_%s_Linux\t%s\n" "${prefix}" "${offset}" - printf "#define __NR_%s_Linux_syscalls\t%s\n" "${prefix}" "${nxt}" - printf "\n" - printf "#endif /* %s */" "${fileguard}" - printf "\n" -) > "$out" diff --git a/arch/mips/kernel/syscalls/syscalltbl.sh b/arch/mips/kernel/syscalls/syscalltbl.sh deleted file mode 100644 index 1e25707..0000000 --- a/arch/mips/kernel/syscalls/syscalltbl.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 - -in="$1" -out="$2" -my_abis=`echo "($3)" | tr ',' '|'` -my_abi="$4" -offset="$5" - -emit() { - t_nxt="$1" - t_nr="$2" - t_entry="$3" - - while [ $t_nxt -lt $t_nr ]; do - printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}" - t_nxt=$((t_nxt+1)) - done - printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}" -} - -grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( - nxt=0 - if [ -z "$offset" ]; then - offset=0 - fi - - while read nr abi name entry compat ; do - if [ "$my_abi" = "64_o32" ] && [ ! -z "$compat" ]; then - emit $((nxt+offset)) $((nr+offset)) $compat - else - emit $((nxt+offset)) $((nr+offset)) $entry - fi - nxt=$((nr+1)) - done -) > "$out"