Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3342115pxb; Mon, 1 Mar 2021 07:42:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/v7zCCyhcmc1Rn4kpZqy2wuABraYCe1aiscww31O8pB/KxqrgHvft7wpuFEJMRxfsVxIg X-Received: by 2002:a05:6402:10cd:: with SMTP id p13mr16420833edu.22.1614613332119; Mon, 01 Mar 2021 07:42:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614613332; cv=none; d=google.com; s=arc-20160816; b=OJImUYkUEJVaCA88F6TDAWzPIR7DlliAkw9CQyDo+SBwswd/BsRijeaOFnuE9JNp5I VlDW5qf328tlgLGO8AXW/7eAycl8/v0fu8OvHZqqAhFgJn7SPc4azKz+NMO/CcY1U/e/ BtR9XosTC08CgGKLmkZS2s2ljtfBeekYMAzihwXxRp8lrUWr1tE/nXRhoxwjRHGSZy14 IEFiA3y5DXYlA6zkOYthCO7ATHCbP76CxVv+xbsTLFbAPQM+1w8e+Qh+REaXB/QkkqGt MGGlsvAgmSbv++dPwB+02u7S5dGjF7DxWabuVc/nIofRTXAwhCadCGt9IF30Wqf+XiZq DgFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=8Gr/JremCpYS+TfYb7WtRAsLkqaxwfKZlwPLW4o1c2s=; b=LKZ5WFABC1fxIXcEqn26E6awb1ugtobyhA0yVzJ/M2OK+pUAspgGKZJHcKW+cEyExg tQaaeUmBPQaxDIMRoVe3PA3ERWAWBCWM+SGlN0eXBizJCm38RMRZlad6QtFI0xhsLztv ZarTNJmGbrnhdMVflPbLHrNDWCK4CGJsl7s4Yg9TwQEBBB194M+us3Ts3+pEXfo8sBa6 Pk5OmDibeQEgdjvM81oL8mk37NxKK5ef31+nt7vINxXvLUDFvy/eHJAMFDsu5rwYyVuj 2vD2bn1UsbgAVISZV5ZxWR2qIicK1SFZxlh48YjtbraUuxIpxNgLkgWEso51wsKXawpZ /dPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=239X3GjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr15si11946857ejc.287.2021.03.01.07.41.48; Mon, 01 Mar 2021 07:42:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=239X3GjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237328AbhCAPjS (ORCPT + 99 others); Mon, 1 Mar 2021 10:39:18 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:28765 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237243AbhCAPil (ORCPT ); Mon, 1 Mar 2021 10:38:41 -0500 Received: from oscar.flets-west.jp (softbank126026090165.bbtec.net [126.26.90.165]) (authenticated) by conuserg-11.nifty.com with ESMTP id 121Fawh8014128; Tue, 2 Mar 2021 00:37:00 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 121Fawh8014128 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1614613021; bh=8Gr/JremCpYS+TfYb7WtRAsLkqaxwfKZlwPLW4o1c2s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=239X3GjFgDmlNOHmUIF21VWORZspVOz904B89WhKpJTQ5N7MlhzvNWG0nXndamgI1 I5vE9b4yVpabSz3/ARJ9I7+zPeAcDfEXFLUxc7oGJOdyQJrPTEY7naX4VEs6UzDVDm 48D7iUDw5+7KSZQ0Iu3RXbXEXQVXrLF3YJX6s7Sjgt3ekn3E0/SrNs28cqOTXaojCk Q1sgltfQ6jOjRPRsC1rj5EWbM0lHRtroptaU9mfHaKP5QDIJS16v50e8jesHU8n8GG 1oilXibjVQjZqATl8V65vcbLZLSDuZTkuVBlz1Q9Plkn+ie1sDKdSR00eqch+yXZpI MCRXsKTS4rQ5A== X-Nifty-SrcIP: [126.26.90.165] From: Masahiro Yamada To: Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Andrew Morton , Geert Uytterhoeven , Michal Simek , Stefan Asserhall Subject: [PATCH 3/3] xtensa: syscalls: switch to generic syscallhdr.sh Date: Tue, 2 Mar 2021 00:36:56 +0900 Message-Id: <20210301153656.363839-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210301153656.363839-1-masahiroy@kernel.org> References: <20210301153656.363839-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many architectures duplicate similar shell scripts. This commit converts xtensa to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada --- arch/xtensa/kernel/syscalls/Makefile | 7 ++--- arch/xtensa/kernel/syscalls/syscallhdr.sh | 36 ----------------------- 2 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 arch/xtensa/kernel/syscalls/syscallhdr.sh diff --git a/arch/xtensa/kernel/syscalls/Makefile b/arch/xtensa/kernel/syscalls/Makefile index ad2492cb5568..6713c65a25e1 100644 --- a/arch/xtensa/kernel/syscalls/Makefile +++ b/arch/xtensa/kernel/syscalls/Makefile @@ -6,14 +6,11 @@ _dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \ $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') syscall := $(src)/syscall.tbl -syshdr := $(srctree)/$(src)/syscallhdr.sh +syshdr := $(srctree)/scripts/syscallhdr.sh systbl := $(srctree)/scripts/syscalltbl.sh quiet_cmd_syshdr = SYSHDR $@ - cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ - '$(syshdr_abis_$(basetarget))' \ - '$(syshdr_pfx_$(basetarget))' \ - '$(syshdr_offset_$(basetarget))' + cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr $< $@ quiet_cmd_systbl = SYSTBL $@ cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@ diff --git a/arch/xtensa/kernel/syscalls/syscallhdr.sh b/arch/xtensa/kernel/syscalls/syscallhdr.sh deleted file mode 100644 index eebfb8a8ace6..000000000000 --- a/arch/xtensa/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_XTENSA_`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 */\n" "${fileguard}" -) > "$out" -- 2.27.0