From patchwork Wed Jan 2 15:22:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154663 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp288018ljp; Wed, 2 Jan 2019 07:23:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN66oDrL/klEBMfLvvZsV5eW/Xer2ZepjGPB7MiIATRvsj3d/y+0KqJb7vnZwFduaZ7ZMZnd X-Received: by 2002:a63:1321:: with SMTP id i33mr14064242pgl.380.1546442606462; Wed, 02 Jan 2019 07:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546442606; cv=none; d=google.com; s=arc-20160816; b=rkysNs8yzgLq8q9JGjFfnAVq0GR33/dd+c33TYlxzN239hpjbGwZg82AnQ8S1c77Qk g0DPUuov0rW5NiPqy/6d0+b1PKpvuoijDUJNkxsRo2rAF2flWwkCCr6RgrtsD0Y2Xc0d NlOR2vo6XdNac+aNFFFZ7f/zELmZ07eP3I1vz85mTuIxguYamJ6aPufBBc36u4mhZI4x iLgrgb6dALzNdMedtASgWlsKStbMnVX+1e5HE3Qxa3bAWP73hnqHgnVEcGgEdSg0U8eA PzINYdbOdzVRMuXc1RZEbqZHU/KYqPCLY1Oiw3UilsXp/wLjKBwE13kQIyLCHvx1pdGW ccSA== 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=mMRokCY/raY2LNrxQGirT+z5+67SxfwcWVjXUGq++20=; b=XRx8/XkF0hIgekD9I0rSy6/6I4Ekjpe//rNQyBWibPW3SrrxBU+ldAWJI98HOELDce +vHpQ/cjjFsBGrmeSXM6qRiwA90svcsu2fcSfkMkochSEWgoFgAeWtE8mr14o8ybMPj9 r7B+hZH5PBYezFSdScoUGmiofC7SfLFbE/shIhbKSIwIhQAsIHLgWihGKYtoVrkwCONW SuQmkiNQ83cNQimMJASzieqWjPDvDH0zGjbsZfbOGstmXczaFqPckDt6Yi05AYK92Oib ufAzwdSjoP0nLlPc+8cByNo1V8+LU72ppf6bvCtZiPlpaLy+DtU7LyCAoyEyu/3U99cD zg8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fk5JPnoa; 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 u27si4568341pfa.103.2019.01.02.07.23.26; Wed, 02 Jan 2019 07:23:26 -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=Fk5JPnoa; 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 S1730024AbfABPXY (ORCPT + 31 others); Wed, 2 Jan 2019 10:23:24 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40182 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728111AbfABPXX (ORCPT ); Wed, 2 Jan 2019 10:23:23 -0500 Received: by mail-pg1-f193.google.com with SMTP id z10so14715598pgp.7 for ; Wed, 02 Jan 2019 07:23:22 -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=mMRokCY/raY2LNrxQGirT+z5+67SxfwcWVjXUGq++20=; b=Fk5JPnoa43ZAMOoROs3/MgOGEYdke+QfovbM6qLNS0ep4LXOLq75VCOpfQj+38JUei dbunkDECImjeKAS+4YNXOerk1qZvDgagMnjyaqvXYhAsPYLO5ZVTAqqhjJFOJ97rsxfq dnMfcfH5ERKK0NNokA5i8/KscYXKPsBhOshjE= 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=mMRokCY/raY2LNrxQGirT+z5+67SxfwcWVjXUGq++20=; b=ORw0xf+0qDcgZnrU6EfTrFmn95LZEY4o/TNVDyIGPmd91A5GbgDwHsMAk8qeV0P+oK dSeKBDtVtF5fQLDzfKrFFEeQekdx+/Kq2fNyyUhvlzG0rEJtw+zEOCj3nA49PcVRWPHK ie4PwpiZsPbOk+RR+vU/LyIgFs3Zqz+Gli0rgOoVj4nhAHV3HgAnhrEpLFjQbcD3J06M e3Tr9trpbf89Ds0AcccPNB7By1iaGX/nSw2SsySYufh8KuvgQD31Tvkc9qnwA+kEHth8 rdK9rwnwqrUgln4ToERnzmyIR6dbYw1atQGETLCTWFBEeWyWQd4+oSdImS8DC0Qq+hCq XtzA== X-Gm-Message-State: AJcUukdag5HvZkHstSwODfrpRDMKIP9KdDLoB4DFZvr/F8AQH2dWrKNf kXcqSRso9uO824Cfbfzb3z/dOQ== X-Received: by 2002:a63:a401:: with SMTP id c1mr13898268pgf.403.1546442602346; Wed, 02 Jan 2019 07:23:22 -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 m20sm67719647pgv.93.2019.01.02.07.23.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 07:23:21 -0800 (PST) From: Firoz Khan To: Tony Luck , Fenghua Yu , linux-ia64@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] ia64: remove nargs from __SYSCALL Date: Wed, 2 Jan 2019 20:52:46 +0530 Message-Id: <1546442567-20637-2-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546442567-20637-1-git-send-email-firoz.khan@linaro.org> References: <1546442567-20637-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/ia64/kernel/entry.S | 2 +- arch/ia64/kernel/syscalls/syscalltbl.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index a9992be..204b56d 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S @@ -1426,7 +1426,7 @@ END(ftrace_stub) #endif /* CONFIG_FUNCTION_TRACER */ -#define __SYSCALL(nr, entry, nargs) data8 entry +#define __SYSCALL(nr, entry) data8 entry .rodata .align 8 .globl sys_call_table diff --git a/arch/ia64/kernel/syscalls/syscalltbl.sh b/arch/ia64/kernel/syscalls/syscalltbl.sh index 85d78d9..904b8e6 100644 --- a/arch/ia64/kernel/syscalls/syscalltbl.sh +++ b/arch/ia64/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:22:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154664 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp288095ljp; Wed, 2 Jan 2019 07:23:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN4nSbGDDmP6oJEtaojjOqv+/y8ZO5iqFfmN6srzm8PpcgyToWhgw9bWGhTwky/79v9P/3QU X-Received: by 2002:a17:902:2969:: with SMTP id g96mr43615182plb.295.1546442612829; Wed, 02 Jan 2019 07:23:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546442612; cv=none; d=google.com; s=arc-20160816; b=NM9lvylLKuiHJQ8Sv/CMkOlGRV9PjsmShZmX5zfKgZ2pX9g9tk1NnsVPuL9TaQj44w /k8vgO/mkdNCWfaQcu5tGgcSxt6hNALJPt9ZEuJTWYJZz5FJzpY2Ib+Z4rKm5679SHL8 rybC0mZXvtsaF2EF7NEHq1kM+FAbmUYaI8MvpfmZ5uElLQgPoPqcPf1X1+F7QK0xgG50 QWtEoPNGZ6IYkwj0/M0R1KuU0hYWrOGw11a/O4LUocoq7o6ZAZm89cBpHkLXIU0ZmL27 fGbQ3Kt0dAZZrkj8nQsU/t3xjyXVHH/0xjJZJYXnqdtj4ReuAaiGvQszwfdaJnYdwDtE /qJA== 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=RFjQaaMOaV7so1q6PSW0dhpBMNj0R1n04Zjk4Uk3EJA=; b=AfhcppupGk2+p5jT77PT8uQGnnBk7BicNRdF2sh6x0UKj70+uGH0O282eiQEBPzRT8 EH0V5IZjHcVqxBShDEphH6Bm/rRwHXABUnqtXKjIiBcI/yl+M43hkZCrkCJHZIqDzIWD PhNiIIS1QGux135NMBIzFiqsJ6qBlFVEJ9TnMPpIGaSEuWwtmzYE1sANuSGD8T9vNPF8 lQu0JNYjEaWSgfVUt/bZz/JOVWTmdXQJ6bzTreQDBl0IE2JE8vDBVqaN7Lev2o34AqmX JyCkHNESzY+GInAWipdV19RBy1HzQa5aRcAMpe5KDudYEEIieen891NI/JQY0xOxencX XcEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aQ9JBnY8; 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 u27si4568341pfa.103.2019.01.02.07.23.32; Wed, 02 Jan 2019 07:23:32 -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=aQ9JBnY8; 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 S1730101AbfABPXb (ORCPT + 31 others); Wed, 2 Jan 2019 10:23:31 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38668 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729988AbfABPX1 (ORCPT ); Wed, 2 Jan 2019 10:23:27 -0500 Received: by mail-pf1-f196.google.com with SMTP id q1so15306897pfi.5 for ; Wed, 02 Jan 2019 07:23:27 -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=RFjQaaMOaV7so1q6PSW0dhpBMNj0R1n04Zjk4Uk3EJA=; b=aQ9JBnY8cFyfAcqzwHyNAElbN+tYLozRwcLqfvClaYdCGVnk7EMFHWfbYgKTkmYwrW HY6xK8Lf+9vbTlLB/sL9p9bjcar2yhKouRCI3qhsjd2SqgolTOTzKco6M9LNZ3wGZ9nj /cSU+GD/v2E54j8F4mnBN0PJ6i6lHR/pZYD6E= 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=RFjQaaMOaV7so1q6PSW0dhpBMNj0R1n04Zjk4Uk3EJA=; b=PEuHzM0dE2AyRspPeEBb5aqqygfzDGIYsbEEvk+rq6Q2o7GyMRS8grRe8WaCtjzy3A erqsuEoUsPfhxeRDq/wzIoG5N+tj76z0FFHLbP9EyGLn06WwZEMQE8bzxEqPdbp3DT8I Dk4z1Ndvy9hoD9BuzFhjdeyc6RNnycJJometwoIOVTtsEHJi+yZGdOeXyvoifBcE+p8p 71l4uMy7anu8/04lSerQ9GpCDuueR3D9RqUDsxd61M6K7WMdXmtRqu+0CCxPZHzhwoES yXv3HlZ8sBV0OKWjamT1bvGKBdKJ6O6d9gTghSr3JwlJIAHILjI0C/ioE65x/EYVgyfs dFbg== X-Gm-Message-State: AA+aEWah+gpJn/lcuBPUm8pgFc1EATrwg3rTJW7YuUg4nmMkt6VvjHIh ABIDIddw2oJ6sBjlb0wO2dn8wg== X-Received: by 2002:a62:d701:: with SMTP id b1mr43924712pfh.34.1546442606697; Wed, 02 Jan 2019 07:23:26 -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 m20sm67719647pgv.93.2019.01.02.07.23.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 07:23:26 -0800 (PST) From: Firoz Khan To: Tony Luck , Fenghua Yu , linux-ia64@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] ia64: generate uapi header and system call table files Date: Wed, 2 Jan 2019 20:52:47 +0530 Message-Id: <1546442567-20637-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546442567-20637-1-git-send-email-firoz.khan@linaro.org> References: <1546442567-20637-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_64.h and syscall_table.h files. This patch will have changes which will invokes the script. This patch will generate unistd_64.h and syscall_table.h files by the syscall table generation script invoked by ia64/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/entry.S file. Signed-off-by: Firoz Khan --- arch/ia64/kernel/syscalls/Makefile | 11 ++++++++-- arch/ia64/kernel/syscalls/syscallhdr.sh | 36 --------------------------------- arch/ia64/kernel/syscalls/syscalltbl.sh | 32 ----------------------------- 3 files changed, 9 insertions(+), 70 deletions(-) delete mode 100644 arch/ia64/kernel/syscalls/syscallhdr.sh delete mode 100644 arch/ia64/kernel/syscalls/syscalltbl.sh -- 1.9.1 diff --git a/arch/ia64/kernel/syscalls/Makefile b/arch/ia64/kernel/syscalls/Makefile index 813a58c..094f186 100644 --- a/arch/ia64/kernel/syscalls/Makefile +++ b/arch/ia64/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/ia64/kernel/syscalls/syscallhdr.sh b/arch/ia64/kernel/syscalls/syscallhdr.sh deleted file mode 100644 index 0c2d2c7..0000000 --- a/arch/ia64/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_IA64_`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/ia64/kernel/syscalls/syscalltbl.sh b/arch/ia64/kernel/syscalls/syscalltbl.sh deleted file mode 100644 index 904b8e6..0000000 --- a/arch/ia64/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"