From patchwork Wed Jan 2 14:56:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154648 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp261623ljp; Wed, 2 Jan 2019 06:56:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN4RLxNFlZyrnsOFCopLLf7csBmCLtE834EZa+JXGlb/ZzAWZcOOQbFuNe9lrYcotfXUzM7F X-Received: by 2002:a65:4946:: with SMTP id q6mr13429051pgs.201.1546441014420; Wed, 02 Jan 2019 06:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546441014; cv=none; d=google.com; s=arc-20160816; b=DPJPK+v6Z65BBb4xMX36sT5Rf7gf09eIBUqisnd1RUtA6y3iROkeAY4cCJ/ohvozFM joDtnz4CjbZg5k8rQE3rFVYd8LwW+LUjEFlGc1I/l9e31qp5pu57eSjTbdMXQXzsN0xu LOQjfZCBI+5lft53Os5IJcoi5esXx+PchK3BWsKwppsavnDLbZly8EhtHFozQ2tvaY6M h9bpCglaN16Y8uwcVKYZdBlUlboTyQSkrb6MOJkcLV3AtIkv1llt8/vkaNA2G6leO7Kd ziPkgAwpbGnztpzq3ftj3zxnDGfvmuVMzX6mTjvROvrDS6h1QVd+/sKfey4AW5OhWe3J 9PmQ== 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=PE7tuPVD5ji389rrnaCznzLxbmlbwQF30eStDamFN0I=; b=xxo6/W3R+mZwDp3M/T4De2kTym9EjcgO4pT5HP7zvnlqhmsRtkNFDe7SQpm4qSsR9R WFuxBTYdULFhX81v+ouGgqIcvoLdOekU/HDc1/0rGjfGc7esSxtFQPBsC7ADwgIZVVva n3Uct+7g8GvPmpXtmbyIOBNG3Gz0Ovt7ylvCb4uXa73TIJ0wOYSiI1XqowFJGZjRNoRi 9d4lAayHuHX8fdw+4g7nRp2I8Z/9vGpHKclNYseEon5OfW7uAgzDrW/3iup+PUOaXs2U IC0wkPfgkSAlfrgfc/Q8JiXUR+b/xZhDYJ62OL8dIrHA7qINQGBjoYrT+SowACLM2XBW II5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OIiEqvn8; 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 o11si25958395pgd.234.2019.01.02.06.56.54; Wed, 02 Jan 2019 06:56:54 -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=OIiEqvn8; 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 S1729647AbfABO4v (ORCPT + 31 others); Wed, 2 Jan 2019 09:56:51 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44737 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729377AbfABO4u (ORCPT ); Wed, 2 Jan 2019 09:56:50 -0500 Received: by mail-pf1-f196.google.com with SMTP id u6so15271358pfh.11 for ; Wed, 02 Jan 2019 06:56:49 -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=PE7tuPVD5ji389rrnaCznzLxbmlbwQF30eStDamFN0I=; b=OIiEqvn8P3Gv2S9b//iL2+G1CwFUU985SGmKBytRaaODKFSpllQnYB6g+zJdesH/kH 4vpLyyq/WJBwYzhxcO61pyK39hYavWXri4rBilsICuUs4rxCNVdnO6Ewl7SKlvx74meu 74ztBJEPmk2GWXZGcfBj7bq3WGVk4xmN4zShE= 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=PE7tuPVD5ji389rrnaCznzLxbmlbwQF30eStDamFN0I=; b=A8vCR+MLCNgjo9wLy1wVNGSHtrI/Ot6HKbXydR9io9ajmNPwe11tOd5iKAjfnwpoKA jYRNMVZmHJm4B0YWI5IcLSjccfi4C0uqme7748MNAW9E9WhdbxePVwARKlzyDDk1hATM kNkvHUwAThByWq+5WJTluydw4wYFNyQBIdGhF07KMQv6zlE3VvsnRpZxAbMkJ7Y0tEO6 cFw2sQfekErWoodqpmbbBymNNMRlgtBFuR+pnUyasYtrAGRTLujedIw8RyyPHA5JKwf2 xwZmcpGR7ViHkZBECK2fi2uU55RkBO4XDvTHLEexjAzgJokEmTUUGbalbcybsL3DGLX9 azSQ== X-Gm-Message-State: AJcUukcM7ppJvxhkl0Ky2ncMqjuoKZl8pZE/W2I6oTwoCnhS8+VGDkW+ 0jJEbLhxxrWbsbtl+qW5ICALCw== X-Received: by 2002:a63:7e1a:: with SMTP id z26mr30008986pgc.216.1546441009526; Wed, 02 Jan 2019 06:56:49 -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.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 06:56:49 -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 1/2] mips: remove nargs from __SYSCALL Date: Wed, 2 Jan 2019 20:26:17 +0530 Message-Id: <1546440978-19569-2-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 The __SYSCALL macro's arguments are system call number, system call entry name and number of arguments for the system call. Argument- nargs in __SYSCALL(nr, entry, nargs) is neither calculated nor used anywhere. So it would be better to keep the implementaion as __SYSCALL(nr, entry). This will unifies the implementation with some other architetures too. Signed-off-by: Firoz Khan --- arch/mips/kernel/scall32-o32.S | 2 +- arch/mips/kernel/scall64-n32.S | 2 +- arch/mips/kernel/scall64-n64.S | 2 +- arch/mips/kernel/scall64-o32.S | 2 +- arch/mips/kernel/syscalls/syscalltbl.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) -- 1.9.1 diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index d9434cd..b449b68 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -217,7 +217,7 @@ einval: li v0, -ENOSYS #define sys_sched_getaffinity mipsmt_sys_sched_getaffinity #endif /* CONFIG_MIPS_MT_FPAFF */ -#define __SYSCALL(nr, entry, nargs) PTR entry +#define __SYSCALL(nr, entry) PTR entry .align 2 .type sys_call_table, @object EXPORT(sys_call_table) diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index c761ddf..35d8c86 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S @@ -101,7 +101,7 @@ not_n32_scall: END(handle_sysn32) -#define __SYSCALL(nr, entry, nargs) PTR entry +#define __SYSCALL(nr, entry) PTR entry .type sysn32_call_table, @object EXPORT(sysn32_call_table) #include diff --git a/arch/mips/kernel/scall64-n64.S b/arch/mips/kernel/scall64-n64.S index 727fb8a..23b2e2b 100644 --- a/arch/mips/kernel/scall64-n64.S +++ b/arch/mips/kernel/scall64-n64.S @@ -109,7 +109,7 @@ illegal_syscall: j n64_syscall_exit END(handle_sys64) -#define __SYSCALL(nr, entry, nargs) PTR entry +#define __SYSCALL(nr, entry) PTR entry .align 3 .type sys_call_table, @object EXPORT(sys_call_table) diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index f158c58..e229155 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S @@ -213,7 +213,7 @@ einval: li v0, -ENOSYS jr ra END(sys32_syscall) -#define __SYSCALL(nr, entry, nargs) PTR entry +#define __SYSCALL(nr, entry) PTR entry .align 3 .type sys32_call_table,@object EXPORT(sys32_call_table) diff --git a/arch/mips/kernel/syscalls/syscalltbl.sh b/arch/mips/kernel/syscalls/syscalltbl.sh index acd338d..1e25707 100644 --- a/arch/mips/kernel/syscalls/syscalltbl.sh +++ b/arch/mips/kernel/syscalls/syscalltbl.sh @@ -13,10 +13,10 @@ emit() { t_entry="$3" while [ $t_nxt -lt $t_nr ]; do - printf "__SYSCALL(%s, sys_ni_syscall, )\n" "${t_nxt}" + printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}" t_nxt=$((t_nxt+1)) done - printf "__SYSCALL(%s, %s, )\n" "${t_nxt}" "${t_entry}" + printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}" } grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( 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"