From patchwork Wed Jan 2 15:12:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154657 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp278129ljp; Wed, 2 Jan 2019 07:12:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Fx09I7zOdJVXkgLqzdu0fQ7ZJBFUvvjlbvXj/0PZd7pJ+xsc3hXfgq5cdT25YUkLUagFS X-Received: by 2002:a63:66c6:: with SMTP id a189mr13898683pgc.167.1546441956091; Wed, 02 Jan 2019 07:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546441956; cv=none; d=google.com; s=arc-20160816; b=XRtDfvNsMWHfalALLg2Zqb9bImAt1QwJdajfOoIgySdBNIGECTCAYNz0d6JA5zle2W 5SVnGckiHu57YYo0NLiDYEC5iTxhhI8iePeRW6g8TrBk9ikdTF42XxojmvB7ZSsashQN dSaUmBuxojMqbj85mWKA4kbU0PbHJ7PhA3XOsrkvw5Vz3KuoTx0Q7gAzHekZzzkTKlqc 3Rsswe9RxTcnMkOaf2qd15Vv4vpZWUVegKq+psk0y6Zy5lLvcX14lCgNZtTpya4S9AaV TzGjskDei6R86NjRUSWNEBWZa5r+N3LVYQQPzBpQ3rnsgD2B8fV60QyhXl8pWM61MXHC Uu2A== 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=vQ8I21RoGZh51XjYrN7+ErT+m6l5lADjiriHH6YnHTE=; b=psjovzY6EKj2bgINyLH9OCvJuz1DFDSsgi0sU/HuCtuEwRjbE2/wbVh2cI+t03pvZb 5FfmoGh/iy2hx77eiO7dxNWm9IoMLcYzzQ1xMH3OV0JEfpY9dMK46xBvNHS8zbkei2Lf 1rDt6tQCiPLfPYmVxGEutwKK5iAjBimns54MBdRj00D/BT0JM1DeIdw1ad8LW47Nb9nR BJL/T7/ZGcrt6DTs0wv9Uyj9WwOBAm/GKcPGzcx6Nr3XfqssoZxXFMUYtIYi/+U5Q1kx iWlHQKL0z+fWY9fU0W+lVgtdcRSscygoX0k9f9/C9h997Ol86Wbz9elAAbcVRCdDSMVD Tm/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k1QYKTOq; 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 o11si4078729pll.160.2019.01.02.07.12.35; Wed, 02 Jan 2019 07:12:36 -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=k1QYKTOq; 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 S1730005AbfABPMf (ORCPT + 31 others); Wed, 2 Jan 2019 10:12:35 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43679 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729934AbfABPMe (ORCPT ); Wed, 2 Jan 2019 10:12:34 -0500 Received: by mail-pf1-f193.google.com with SMTP id w73so15286142pfk.10 for ; Wed, 02 Jan 2019 07:12:34 -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=vQ8I21RoGZh51XjYrN7+ErT+m6l5lADjiriHH6YnHTE=; b=k1QYKTOqYhjca+wchw6SKO6UREz9RYUYJLriIhrieMoz52z6U3hV8q9mZ470sLYafr EfaWiQAwBwZ13YeLzWQR2zrrddMAoaIHEiddFjkd7A6S72b4tVdf1LbOejxyiXJrqHYA EJxCM2VWE3BUIPwUl6Qg1DO4upU8uOHz4q/Co= 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=vQ8I21RoGZh51XjYrN7+ErT+m6l5lADjiriHH6YnHTE=; b=XqFJa6s71EuDMdEQd28NTe1pZRMAWYYkSjb/GHY4msRBDQu5waW3FbhN4w/LfOMueT 9kT5HI79DdpKQRdOLymTShAQ4rGWVtFcrzv1Rf1HZa1fNxKbjKeovVs8UhQ+QX2g5ndH F/Vg/J476NVpsOc9CHGDWSH5KXDiA+waXL5/fxNt4cynZ3uuijl2XEr1EBvjD1JsAF17 S4cFLp8QMIfFy+VNDRYOGQ2sf/1saZlPtd6tqcCnsleV+pmQGK2vb5SnSE7DBWGgYSjZ 6F/d4IFv9y3r9vOLOCBm3aDlpJUm8x50PLwMFsoOKa0nD7tbf+8uOjKYYUvUEEDHnlk2 vkng== X-Gm-Message-State: AJcUukeSzj9sFjsHbm/LYvVvpHFIv+R8VOb9TpYLzTfIitmh4ezZ9n41 548NPnlaKTYRCHeouMGGuoWx/Q== X-Received: by 2002:a63:2849:: with SMTP id o70mr13613339pgo.155.1546441953822; Wed, 02 Jan 2019 07:12:33 -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 125sm94973786pfd.124.2019.01.02.07.12.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 07:12:33 -0800 (PST) From: Firoz Khan To: Michal Simek , 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] microblaze: remove nargs from __SYSCALL Date: Wed, 2 Jan 2019 20:42:03 +0530 Message-Id: <1546441924-20262-2-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546441924-20262-1-git-send-email-firoz.khan@linaro.org> References: <1546441924-20262-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/microblaze/kernel/syscall_table.S | 2 +- arch/microblaze/kernel/syscalls/syscalltbl.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index ce00664..91ade44 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#define __SYSCALL(nr, entry, nargs) .long entry +#define __SYSCALL(nr, entry) .long entry ENTRY(sys_call_table) #include #undef __SYSCALL diff --git a/arch/microblaze/kernel/syscalls/syscalltbl.sh b/arch/microblaze/kernel/syscalls/syscalltbl.sh index 85d78d9..904b8e6 100644 --- a/arch/microblaze/kernel/syscalls/syscalltbl.sh +++ b/arch/microblaze/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 15:12:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154658 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp278248ljp; Wed, 2 Jan 2019 07:12:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN6tO5TKHcIrVO5ZeMc15JTGvPuLVSRjgmL/XpWTNcEDuRrI2VWZDah0sJ5bNhuM4wxRP62q X-Received: by 2002:a63:a064:: with SMTP id u36mr13926001pgn.145.1546441961788; Wed, 02 Jan 2019 07:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546441961; cv=none; d=google.com; s=arc-20160816; b=hFoeR5gbo9sICJ7RbO+GoXHqNkzuIhnQ0frhGk8E+aXgBMGUARJ70rdjyTLIvRD/zh j8ksGQDDzDMXBwG9pwt8qp4C/tdXsp+YsA3ULA03YVXPlc2DSuo9ED8a5PmVKTONMGxb 8G6oOT83AWMgbeqxJ4qLQ21UahKBKoPEfOP9/BHBrCx1g+P+OX7C2wqzmOENIhjqEQnO CbwXYjyZDBRsbApyXhrBUbJImlFjwNVhvtC+Qu5BOBsRu9gyGbCeDh+uHg69i2cYn9du WbCrVuEUq/icRUfi3jkPjrLr7l/Ao+i2iMMiKp6zsSpLFHJhb8S+T7SMA0e32lB0F205 OK6w== 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=LIqZtcUysKAm8krWOjdirshVKXnvZ56s0oUU0STAW48=; b=x59PIT7sBDxWow+a8lBVI0Wg00RKSHR+snSrmMs+U3LIZ7cDtG2S89cmcPcBA3ElAl UEzIu2Ux5seSH7a6BtHkKMQslFylojuVzShZQyrjjcTDMblpBDPusbYKwxGXzMELAAuK z0ppIYwD6hReeY9MtjF0wYI1mJFkGmDsba91RQzmDnuIDgFW/glxVLf4tWOpCUrtJ4Vn x+7sOa89TiN+bCPRT4qZy/09QLfCOcu2snw6EFwJb8Nh3ACuRn3TZFOe0s9x6rcqQiHa Jt//4SGk0QOVGS7wzoY/ZdBI6eQoDq7+mK1svlR15zARt0ALt4igHfAyvozFgkF+QpdU bWAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HwqeFECH; 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 l9si1671412pgj.543.2019.01.02.07.12.41; Wed, 02 Jan 2019 07:12:41 -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=HwqeFECH; 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 S1730027AbfABPMj (ORCPT + 31 others); Wed, 2 Jan 2019 10:12:39 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:37305 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729203AbfABPMi (ORCPT ); Wed, 2 Jan 2019 10:12:38 -0500 Received: by mail-pl1-f194.google.com with SMTP id b5so14631095plr.4 for ; Wed, 02 Jan 2019 07:12:37 -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=LIqZtcUysKAm8krWOjdirshVKXnvZ56s0oUU0STAW48=; b=HwqeFECH8EshBgmhz0JFJAIQO3uRY4Tu/YEJeEg1jUsSOj63mKxYeJeZOL9N95tYel f1ZZP6oSS2LMZPKbXpAvn4mdCvHe7z4X+6Ra5zf/w4UhCoC2nscUb/JgTdMUW3hy1eXw f/xJGZraHon6gWxINixYeKkfSojgoTot58oro= 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=LIqZtcUysKAm8krWOjdirshVKXnvZ56s0oUU0STAW48=; b=UGu/W2Z9ySbcsIBpi2N0PCJv0RIV41buu9E9Vk29u8mrzXaVwtvN7TF8PFkaQ2Sp0e IB8n69Ygn8QYAjjcBwEnpPisvW+N7U8dNbBKjK3DCAWmRloC7yTq6I4Gt67o0CNA29az 7qkDzlae24Lbr0HrDJJRHcMocOiw4gmY/XEIa+uZ3t2pRq91DhZ5VDBkUDn4fiz8XUPt 4JSr6gciMGdE74FR1iGEdLriTBZzqclOjrAv72Hs2iZtS8W/x5Y2a3GnK9VxRC0MTybq gLDRLUpyoxSSmU4fBLjrtx4PnpwU00Ym4q/bVUPx/6ISDzVlyXNek8UPSRoPMeh0Wu1o NG4Q== X-Gm-Message-State: AJcUukegcEDNI4AsqhlRjQivmvCFqNA9+WNHk2u1sQvbfFYzQAXuwyRs W2i3gVh0QuzPLOA43FCyA8PyVg== X-Received: by 2002:a17:902:29ab:: with SMTP id h40mr43446449plb.238.1546441957371; Wed, 02 Jan 2019 07:12:37 -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 125sm94973786pfd.124.2019.01.02.07.12.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 07:12:36 -0800 (PST) From: Firoz Khan To: Michal Simek , 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] microblaze: generate uapi header and system call table files Date: Wed, 2 Jan 2019 20:42:04 +0530 Message-Id: <1546441924-20262-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546441924-20262-1-git-send-email-firoz.khan@linaro.org> References: <1546441924-20262-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_32.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32.h and syscall_table.h files by the syscall table generation script invoked by microblaze/Makefile 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/syscall_table.S file. Signed-off-by: Firoz Khan --- arch/microblaze/kernel/syscalls/Makefile | 11 ++++++-- arch/microblaze/kernel/syscalls/syscallhdr.sh | 36 --------------------------- arch/microblaze/kernel/syscalls/syscalltbl.sh | 32 ------------------------ 3 files changed, 9 insertions(+), 70 deletions(-) delete mode 100644 arch/microblaze/kernel/syscalls/syscallhdr.sh delete mode 100644 arch/microblaze/kernel/syscalls/syscalltbl.sh -- 1.9.1 diff --git a/arch/microblaze/kernel/syscalls/Makefile b/arch/microblaze/kernel/syscalls/Makefile index 659faef..75c7421 100644 --- a/arch/microblaze/kernel/syscalls/Makefile +++ b/arch/microblaze/kernel/syscalls/Makefile @@ -6,8 +6,9 @@ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') syscall := $(srctree)/$(src)/syscall.tbl -syshdr := $(srctree)/$(src)/syscallhdr.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)' '$<' '$@' \ @@ -15,6 +16,12 @@ quiet_cmd_syshdr = SYSHDR $@ '$(syshdr_pfx_$(basetarget))' \ '$(syshdr_offset_$(basetarget))' +quiet_cmd_sysnr = SYSNR $@ + cmd_sysnr = $(CONFIG_SHELL) '$(sysnr)' '$<' '$@' \ + '$(sysnr_abis_$(basetarget))' \ + '$(sysnr_pfx_$(basetarget))' \ + '$(sysnr_offset_$(basetarget))' + quiet_cmd_systbl = SYSTBL $@ cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ '$(systbl_abis_$(basetarget))' \ diff --git a/arch/microblaze/kernel/syscalls/syscallhdr.sh b/arch/microblaze/kernel/syscalls/syscallhdr.sh deleted file mode 100644 index 2e9062a..0000000 --- a/arch/microblaze/kernel/syscalls/syscallhdr.sh +++ /dev/null @@ -1,36 +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_MICROBLAZE_`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 ; 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}" -) > "$out" diff --git a/arch/microblaze/kernel/syscalls/syscalltbl.sh b/arch/microblaze/kernel/syscalls/syscalltbl.sh deleted file mode 100644 index 904b8e6..0000000 --- a/arch/microblaze/kernel/syscalls/syscalltbl.sh +++ /dev/null @@ -1,32 +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 ; do - emit $((nxt+offset)) $((nr+offset)) $entry - nxt=$((nr+1)) - done -) > "$out"