From patchwork Wed Jan 2 16:02:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154677 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp322139ljp; Wed, 2 Jan 2019 08:03:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN7iTnwx0lrL+J1ijZGInVeray+4H/iJyBOYjlE2pqyXdPoimCp30JAp4D4gJfzXAffOsQFy X-Received: by 2002:a63:7d06:: with SMTP id y6mr13884914pgc.171.1546444988482; Wed, 02 Jan 2019 08:03:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546444988; cv=none; d=google.com; s=arc-20160816; b=Zv8wJJhGduRYGu0xm7JohHdE00DodXcEBuk8q6Vkm+miQsc+8tFVoLQlD5g9/cjyWK koU8XmRH6Jjtmhyea5xHGa4BaffdFYDaXo3LnPL4m9WuKF00dpRqCbY7zJICX26p+2yE g46agnhABIGWLvipcz5r19mB2AgftYnKTnNKPpyKXOPs3PuQIPj2jN3BRG9cBOrS+B5C cpafdQIAoNSYBccdH9Pxt9LMpY2eP4fEN9GxtfSz/fpteaOddavESo5+/yZIXd8qcLAD V+R84ggWbrvmnU27gw/SMTaGaufHy5+F+HF57xIgljl0UH25J1VKn9BCEonH5iw4gtmi Y2+w== 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=Q8Sr5ThZMKRXocJdw2zivcshx9cGsDEOtoQKtsu1DjU=; b=YMSkyO6sCSKD/ie6hNt8/7p7F5a5BsPlKQB8KtXfsJyTuzifawRA4KZzMxdpCl2plN Ayw9aXAo/pVl4fMdMvRaEv2b6nPpFza1MelIQKQ05hv4+hM9XbDNY5MI9dn85JBpH7Df meXZkUZJDx/2NerrrmVII6HWGmfXhm68ip8VjIAmkSVJk32nYkZnoc1vl1XIM30pTtDF XLHCbGM4WbnuG8FaRJCXlddPF2JaJh7jRngy0sXB0fgNl81ijxP1XPLCgPQL+59EpvXC OwpwUP8PssZEBgB6mINnGXhTRywOe3L8Mg6+y/u6TKBfyTA5FhkRDKe4huNOtuhEq9W6 19yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UeOpEcpT; 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 t4si9238745pgb.97.2019.01.02.08.03.08; Wed, 02 Jan 2019 08:03:08 -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=UeOpEcpT; 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 S1730336AbfABQDH (ORCPT + 31 others); Wed, 2 Jan 2019 11:03:07 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45111 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729748AbfABQDG (ORCPT ); Wed, 2 Jan 2019 11:03:06 -0500 Received: by mail-pf1-f194.google.com with SMTP id g62so15346204pfd.12 for ; Wed, 02 Jan 2019 08:03:06 -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=Q8Sr5ThZMKRXocJdw2zivcshx9cGsDEOtoQKtsu1DjU=; b=UeOpEcpTukVAkxrdNciikTb/mnIsLxRZzAW1QMXW+vHq6h5bDIZty8KzZ+7lsTSdqX WBHgZEdt47qCMQ8ye122LT+7ULYfnuvJJYLfK2Yf5RqqLDWUkm3o1y1gEIyeOz4+BNTM ZLw7z749QfXZ59ptesovKJgNPJyAqLOHPkwB4= 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=Q8Sr5ThZMKRXocJdw2zivcshx9cGsDEOtoQKtsu1DjU=; b=FSNjAW3MDKzrzy3GkhEJXyCuJvXjD8Ek4lxbdPmVKnu+MAc/TIn4E/a1Rxsc3BfaUj fMQ140DuZWHeFlxCSx4WKqorrX6fc/oiHGtCArnEcF4lSvffgjurc6N4UGYT1/cQS229 QynKgYvPB9bXOr1B6eQcOfpXqbFsVDNktQGEV6coJUrGgcv39ystHec5Ekr492vy4Hv8 Rhmz4u6T31H1hVn3dMjOoLfYIEtnI5zM158XV+/Fw73WRnkuLtmaKeInbER5lCVH4xT/ fw4zbZlPs4TJO7N4JF1bi5i11YUNKJVXdml8OeVtj6oFWxbF8hKtdcIFoXuW+22ooU9G B6qQ== X-Gm-Message-State: AJcUuke6kDhSymapOt0ahsgWX61DGKQOoBy2u0a6w5/hkDVoM6LtmI4h VaNPbG7MT45DLttKp/8PYFhV9A== X-Received: by 2002:a63:c051:: with SMTP id z17mr13623516pgi.20.1546444985915; Wed, 02 Jan 2019 08:03:05 -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 s2sm104344924pfa.167.2019.01.02.08.03.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 08:03:05 -0800 (PST) From: Firoz Khan To: "James E . J . Bottomley" , Helge Deller , John David Anglin , Matthew Wilcox , linux-parisc@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, Firoz Khan Subject: [PATCH 2/2] parisc: generate uapi header and system call table files Date: Wed, 2 Jan 2019 21:32:33 +0530 Message-Id: <1546444953-21630-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546444953-21630-1-git-send-email-firoz.khan@linaro.org> References: <1546444953-21630-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 From: Firoz Khan Unified system call table generation script must be run to generate unistd_32/64.h and syscall_table_32/64/c32.h files. This patch will have changes which will invokes the script. This patch will generate unistd_32/64.h and syscall_table- _32/64/c32.h files by the syscall table generation script invoked by parisc/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.S file. Signed-off-by: Firoz Khan --- arch/parisc/kernel/syscalls/Makefile | 11 ++++++++-- arch/parisc/kernel/syscalls/syscallhdr.sh | 36 ------------------------------- arch/parisc/kernel/syscalls/syscalltbl.sh | 36 ------------------------------- 3 files changed, 9 insertions(+), 74 deletions(-) delete mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh delete mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh -- 1.9.1 diff --git a/arch/parisc/kernel/syscalls/Makefile b/arch/parisc/kernel/syscalls/Makefile index c22a21c..e24272d 100644 --- a/arch/parisc/kernel/syscalls/Makefile +++ b/arch/parisc/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/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh deleted file mode 100644 index 50242b7..0000000 --- a/arch/parisc/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_PARISC_`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}" -) > "$out" diff --git a/arch/parisc/kernel/syscalls/syscalltbl.sh b/arch/parisc/kernel/syscalls/syscalltbl.sh deleted file mode 100644 index f7393a7..0000000 --- a/arch/parisc/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" = "c32" ] && [ ! -z "$compat" ]; then - emit $((nxt+offset)) $((nr+offset)) $compat - else - emit $((nxt+offset)) $((nr+offset)) $entry - fi - nxt=$((nr+1)) - done -) > "$out"