From patchwork Wed Jan 2 15:18:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154660 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp284419ljp; Wed, 2 Jan 2019 07:19:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN6srp+jZMETU/ugZUEODPILmz7WQkyLvQ/3dK6TYh/HDOsdI1+YePD/NL6PDh6ZS3dRQhiv X-Received: by 2002:a17:902:142:: with SMTP id 60mr44939033plb.330.1546442346824; Wed, 02 Jan 2019 07:19:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546442346; cv=none; d=google.com; s=arc-20160816; b=FaqvDIfesO6ZoxubslAKXlSwXezH9xONNnN+cgVYg8WLeY4i2dfbeyoyeG8g2Bajis CjC5fN62Hhyyapi0UaTnfcpWk36YQt2gfrtbtqsMNk2+zIB8Jp5piIm4eADB3VQYxQ59 sBKiCaSb0dWIVZ2OkOysTzPU66jwyLWBJwS0XGdAryqja6fiWvyHgJPscAXZWH4sHHoP 4fgkaRMU7RlaC83EFx9F7tq0hxTZVma5oqKRb3FhvvdH+7QCTrnh/AoVEyNHcuFTITP1 nFUSIxYHyWOymrLDALofDIlOeh0yaga9pBb4aAzTclXmJzyNCjhlr8vgrwoAm/eD8EKU IXdA== 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=GABRy0pMwiMY1Dksx8weGXDMbDEwqCieHO+NUUKO31A=; b=epr5hinj5U4NYK5AXHeMU7VyjdXvkhkv3slHkzqnFlusj7jq9K5D9K07aYtEBd282m ZFTeEdA2H0UdSAcSqzb60Vfogf5o+rqm0i6mXYvYgLQRj538iRYcpAM6RdCn/KR32VhE R4cavV9ix1BB9JBX1jkcr410up/QDh2saVsQRf4K/EK1+0Sw0cU+2DsA5eXY3ZFclQv+ 6MzC7pWE7dIG+VG6+9isqebOIsrIwR+i8UGiZpb8/HDP0jMzUCMiEk80/D5CC8awtqna k5K+ld8ovQy47AIWOjn3ZWGJFPG/6PcZi55mhc4SQg0Z2piGFrc8o8YrD0JtmW7/lJEY PU4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L7H8So9a; 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 v19si52331815pfa.80.2019.01.02.07.19.06; Wed, 02 Jan 2019 07:19:06 -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=L7H8So9a; 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 S1730044AbfABPTG (ORCPT + 31 others); Wed, 2 Jan 2019 10:19:06 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42413 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730024AbfABPTE (ORCPT ); Wed, 2 Jan 2019 10:19:04 -0500 Received: by mail-pg1-f196.google.com with SMTP id d72so14699717pga.9 for ; Wed, 02 Jan 2019 07:19:04 -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=GABRy0pMwiMY1Dksx8weGXDMbDEwqCieHO+NUUKO31A=; b=L7H8So9azlrdkn9gBTVGbKmHBo7qZPvJTH8ZE6WiL5+RSvoBgaGttx7Ub7U39e1QQa uXgjwszQVIDzNV8RMNn/dp6Nc5supeTAKqMA3V4r7LvICPFAfM+iQh1gPK1R3WGO4hT9 l/+O6tkCl3tOsdvDBmi4A0QiBengEb8sQjZeY= 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=GABRy0pMwiMY1Dksx8weGXDMbDEwqCieHO+NUUKO31A=; b=SWUibfTekfBa/i0OgSgznM/uDoGtRC0q0xHAx3IqbvnwZs0LKl9EVIhvKxo6kmYvDr VZNSPxGvJ5aRLJ/PI7wsMNd8my6vnpTAXtmW/5ZYjKvm9T+sA1DKMRdB4ChBk9Y5dp1m L0ykmcDO7BWtgq3kqTl+Wnit2lPF8c0Y+7dpx82TzK5DcWP4Su7lBlsy7hLB3RliKgLB a1V+hC4ScK6ckwMcXevklpPwmW5Th+Y2D+wcNQ+zGD/morjwNAY9rDUmnTb1fY1utTSD kMNAx7/Hal1Ct0PJUE+FgWOw6iALeg1YGJ+PYIbDO/QfsULo7CM4TZH0/YCzhD5OpEIM pzpw== X-Gm-Message-State: AJcUukcYPTdgiam7DdA1AX7fh+3NWAB6lsu3b90XPBs9TPGHkTbqJC9Y WWylp9Rk2D8kP3i4r4QBnzWlgA== X-Received: by 2002:a63:78cd:: with SMTP id t196mr13894985pgc.62.1546442344027; Wed, 02 Jan 2019 07:19:04 -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 i2sm14726788pfi.66.2019.01.02.07.19.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 07:19:03 -0800 (PST) From: Firoz Khan To: Geert Uytterhoeven , linux-m68k@lists.linux-m68k.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] m68k: remove nargs from __SYSCALL Date: Wed, 2 Jan 2019 20:48:38 +0530 Message-Id: <1546442319-20461-2-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546442319-20461-1-git-send-email-firoz.khan@linaro.org> References: <1546442319-20461-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/m68k/kernel/syscalls/syscalltbl.sh | 4 ++-- arch/m68k/kernel/syscalltable.S | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/arch/m68k/kernel/syscalls/syscalltbl.sh b/arch/m68k/kernel/syscalls/syscalltbl.sh index 85d78d9..904b8e6 100644 --- a/arch/m68k/kernel/syscalls/syscalltbl.sh +++ b/arch/m68k/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 | ( diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index d329cc7..0082664 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S @@ -18,7 +18,7 @@ #define sys_mmap2 sys_mmap_pgoff #endif -#define __SYSCALL(nr, entry, nargs) .long entry +#define __SYSCALL(nr, entry) .long entry .section .rodata ALIGN ENTRY(sys_call_table) From patchwork Wed Jan 2 15:18:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 154661 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp284539ljp; Wed, 2 Jan 2019 07:19:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Qh4l/sBkBm/goKxmY6+fEt5NaMFhgPuwZ4iVcsVfO+gMapvMEWSkveYp5ETCoOnQeDuVO X-Received: by 2002:a63:9256:: with SMTP id s22mr40714441pgn.224.1546442355240; Wed, 02 Jan 2019 07:19:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546442355; cv=none; d=google.com; s=arc-20160816; b=LRd3rII7dMQtdGQI6FXSrpc7wrbHHfilJlszyDf5787Qpr1iEueLehtdbZAf1vaNoR fJAdukkmYc5/2iTElhEmdRqexdBNWpXhzZJwhICMjbayAPGpytR4AIuja+upPE2wDHvc OH/jfXnVQvjUGETLBFrae3Vq2OSnz0oy4drccLu04PbZ7ABPvbKh52GruVEfkQQtsAJv YDiHhjBAuudHFzPfErbQ66424aFQBLvaXf4FmHq+vateoHx346ae/VY66l/qAOQc/2vA szeJUUcCmRnWWfoAs1ODDolBHQUba0Ff08Xdydr+JRyTVxVXRZvcUNoTwwfp2RXWIS5p /65g== 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=m+Rxgw5puW3hlJG2yPUxM4niuH9v4tJSYzzGhDx2Yv0=; b=hHZrgwHuGZOojhSmR3nDxcGCfxZwqBCQrHdruzkm25Fi+5K0cNM1Arh5bFjZJEiv/8 y9NIQzJHNvIk02mYtecSCwdFvBhR10Qw9yse0ExgFRvvHK4LKtMXCrCCwb71IvslYlRe uoORHsy+p0VB6I4pJ0psn0ZO2RCvvQllqtNiPB5G8vBaDtwQ+7j9AzxwcwHz34+p1vZp JPDWwvXSiiO+vKOWajAqkMTZOM5x4gInRnR1q/ivbN8YRh3WXhhKqbvzetlr6zuB6mwc fH07TWS8Zmybm80tVtmlvhzooE5XLCEz9WEIkKQ07MbOPuZIzWQP86B9NeM5EbuY0NDJ kLvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WguJSMup; 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 i189si14170191pfg.265.2019.01.02.07.19.14; Wed, 02 Jan 2019 07:19:15 -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=WguJSMup; 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 S1730070AbfABPTM (ORCPT + 31 others); Wed, 2 Jan 2019 10:19:12 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:45865 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730024AbfABPTJ (ORCPT ); Wed, 2 Jan 2019 10:19:09 -0500 Received: by mail-pl1-f196.google.com with SMTP id a14so14612692plm.12 for ; Wed, 02 Jan 2019 07:19:08 -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=m+Rxgw5puW3hlJG2yPUxM4niuH9v4tJSYzzGhDx2Yv0=; b=WguJSMupMmyofAycSXhaeoKm3e/BuywW2i3ySQnhUqVrlb4m+vi3PPhAZFLEhcNcDV 1bvZFAD95+0K6cUmFlqGtVQZZtRiYuROOmsKIJn58z8AcXFR/AVVgRs2rzB1q7NyHADV TbpcktLWNGvK+QNIcUSYQADYlyXZftYa1mGzA= 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=m+Rxgw5puW3hlJG2yPUxM4niuH9v4tJSYzzGhDx2Yv0=; b=sp9wcjhUly20ykwmiA/Xejr5UawFanooyR24svQcYENnlxiOMRXV2NDw87cLKFmHiH Da7Tl4MXwvNJQM7LGqK8B1Y8yhSAJIX7KZheZSj+45HeLSG6NPRmg1cex9tY0jpgsiVa pWIJ990XHgldMWtVIok3R6YN9IJ6fvGqj64wPY8npCDdo3aqVcYbhyMcTb46aBfbtsy0 WgjwRxZ6aO4Srf1IZETaT0T/WdnApF6bRDfA4rJFLQVesrwSlU1rVJ0o31L/aCBC/e5y G4gRHHUEXfE+tgiR1bHHfqGmYh1q0izYDkhHDtjkeaojxaScbp54K1DR3qz91IiY/FA8 gzWg== X-Gm-Message-State: AJcUukcEXeipOyJN9V0F2u1jNChbuiZdS4ne8ilur5HQPSlXjPw2W1V1 lT+mcXA4zRV/KizbHydcjQ4M/g== X-Received: by 2002:a17:902:a98c:: with SMTP id bh12mr44032238plb.31.1546442348085; Wed, 02 Jan 2019 07:19:08 -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 i2sm14726788pfi.66.2019.01.02.07.19.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 07:19:07 -0800 (PST) From: Firoz Khan To: Geert Uytterhoeven , linux-m68k@lists.linux-m68k.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] m68k: generate uapi header and syscall table header files Date: Wed, 2 Jan 2019 20:48:39 +0530 Message-Id: <1546442319-20461-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546442319-20461-1-git-send-email-firoz.khan@linaro.org> References: <1546442319-20461-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 m68k/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/syscalltable.S file. Signed-off-by: Firoz Khan --- arch/m68k/kernel/syscalls/Makefile | 11 ++++++++-- arch/m68k/kernel/syscalls/syscallhdr.sh | 36 --------------------------------- arch/m68k/kernel/syscalls/syscalltbl.sh | 32 ----------------------------- 3 files changed, 9 insertions(+), 70 deletions(-) delete mode 100644 arch/m68k/kernel/syscalls/syscallhdr.sh delete mode 100644 arch/m68k/kernel/syscalls/syscalltbl.sh -- 1.9.1 diff --git a/arch/m68k/kernel/syscalls/Makefile b/arch/m68k/kernel/syscalls/Makefile index 659faef..75c7421 100644 --- a/arch/m68k/kernel/syscalls/Makefile +++ b/arch/m68k/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/m68k/kernel/syscalls/syscallhdr.sh b/arch/m68k/kernel/syscalls/syscallhdr.sh deleted file mode 100644 index 6f357d6..0000000 --- a/arch/m68k/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_M68K_`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" diff --git a/arch/m68k/kernel/syscalls/syscalltbl.sh b/arch/m68k/kernel/syscalls/syscalltbl.sh deleted file mode 100644 index 904b8e6..0000000 --- a/arch/m68k/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"