From patchwork Mon Oct 8 05:16:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 148344 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3227739lji; Sun, 7 Oct 2018 22:17:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV62gXmVhODr1Zq3sS6aNkYXVQi0NCS2XXAQDgPtwMO/F4+AN1Mf1tCJeFCYGgrItPkoKu5/S X-Received: by 2002:a62:98d5:: with SMTP id d82-v6mr23396567pfk.97.1538975856452; Sun, 07 Oct 2018 22:17:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538975856; cv=none; d=google.com; s=arc-20160816; b=BAuiQPHrX7z5cgVnYTNkhp8U5LrfYAB1tORfuf0+mWR/tEeA8NaQMH6TBZt11NFW1E 7+OxFikGPx0LwTVbsW+lF1cyjnZtrsGB4dd8owcD/VEAkaTMDkSSIRGaDLJG6iisxRNF X4RvUNGlvtREd9TDSMFreHHT7krYv653XsM9xuRPSEm1RCiMOzphNmrhbzMMNZFG4s7/ xdmWiUiJjpFO1gi8x5OOzsHzCkCF8BIwcQIlacL97FTm3ToOzhuOWDqB3nlg6JccAKz+ ifwJc5gCFx52L1xKz/Bod29aO0ryLbf9eBz2ObQ/enERF5SplRltSggm1ez5Jp+zpS1L Owiw== 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=FAowNU2Le7w5YJvjpIycOrYvvQJDBUjpEbsXPhhb+kM=; b=yieGznxmb5oej8jDmlUXHV4XbNiOddsaGzsERziePZWIR0eYA4FmTy4SxhzcHiB6NV mf++nHP1xTt7FPvVmOPGBZYXZpag1aO4q5m+pz6VKYqnVT/EjW/HkeRa0Uib9cxPIN2H wHOL7ltXI7K4TCPCiLUCiYiZYrzJUVRNUJITFTQ8Sr5M1L+opEUhY6BiPMzuKPrFyRqJ jRFU+Ny6exZ3u1S7BUYvYSvuJ0vuPMYpYJCliY4Xp/kqBiS1JyNRj2T2C2Ruf6msxE4C RaZoN2mvQqdee54UGm5TvxTaQz4Jd/B6Zvhp8P3qMx5a3ukDZes+o4dcmxoCfQLQ3dVP vVZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hGlNJsOw; 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 e8-v6si17577638plb.249.2018.10.07.22.17.36; Sun, 07 Oct 2018 22:17:36 -0700 (PDT) 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=hGlNJsOw; 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 S1726734AbeJHM1U (ORCPT + 32 others); Mon, 8 Oct 2018 08:27:20 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:35246 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbeJHM1T (ORCPT ); Mon, 8 Oct 2018 08:27:19 -0400 Received: by mail-pf1-f196.google.com with SMTP id l17-v6so3413355pff.2 for ; Sun, 07 Oct 2018 22:17:28 -0700 (PDT) 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=FAowNU2Le7w5YJvjpIycOrYvvQJDBUjpEbsXPhhb+kM=; b=hGlNJsOwHYESLLQiLtBWEm5vORLZrkyzqmoz/cGiVOeLg1DNwx46CFd6KApULQEuYT nu7G/gDJ4LdbvInsR+iZ5EfIhyFFpCske3ClTjbLVVNfKK3Jr+NN9Gx0NEEs+rIPQlOE ZuR91PPPzS+yalnvfjEHolhqTQ+9Cu4Q0MZ5Y= 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=FAowNU2Le7w5YJvjpIycOrYvvQJDBUjpEbsXPhhb+kM=; b=VV2VcbU8EQ87yNLjmAZOnlG2msLjMr8Ff5mYTUnD0n36TjshNaR54CV+oxFQiY2NkP Qva65JC9yktXR7dfADSWHe5A4mCkuFrCDCjYPaS0OpWLcPRRAnfvJELEEAJaOaM2/3cV /5/n5Na96oWMJCZKnBjFSYz1PHgmLH7vPMhcb/Ajzwk5n/hDDMaI9Ub6oQ3e2Z9lBBuy APZAkLCMbpKRz1pKuOPy2pXAk2FHlnxWCG26gaWDhCzri7BzIsnNNF4XThyHL5x0FOrZ JOjZjNILz/4ZDjuuqwCnvGIlJfsHVcHvU6sW7MOeNDpEZbtriPVOMwZ3k+kDaXa2qknm RYUQ== X-Gm-Message-State: ABuFfojqmmPT3GjF+zpNGRwftkMO7jeyp6A48ja2/Kfrp9kntJBBfujv RMMIp87Ia53/UFPe0r1SentbrQ== X-Received: by 2002:a62:dd01:: with SMTP id w1-v6mr23280159pff.129.1538975848545; Sun, 07 Oct 2018 22:17:28 -0700 (PDT) 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 j19-v6sm1875919pfi.137.2018.10.07.22.17.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 07 Oct 2018 22:17:28 -0700 (PDT) From: Firoz Khan To: linux-parisc@vger.kernel.org, "James E . J . Bottomley" , Helge Deller , Thomas Gleixner , Greg Kroah-Hartman , Philippe Ombredanne , 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 v3 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls Date: Mon, 8 Oct 2018 10:46:37 +0530 Message-Id: <1538975801-13735-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538975801-13735-1-git-send-email-firoz.khan@linaro.org> References: <1538975801-13735-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 __NR_Linux_syscalls macro holds the number of system call exist in PARISC architecture. This macro is currently the part of uapi/asm/unistd.h file. We have to change the value of __NR_Linux_syscalls, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the number of system call inform- ation. So we have two option to update __NR_Linux_syscalls value. 1. Update __NR_Linux_syscalls in uapi/asm/unistd.h manually by counting the no.of system calls. No need to update __NR_Linux_syscalls until we either add a new system call or delete an existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a gener- ated file. In this case we don't need to explicitly update __NR_Linux_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I moved the __NR_Linux_syscalls macro from uapi/asm/unistd.h to asm/ unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_sys- calls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan --- arch/parisc/include/asm/unistd.h | 2 ++ arch/parisc/include/uapi/asm/unistd.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) -- 1.9.1 diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h index 93fd9f6..d30fdbcb 100644 --- a/arch/parisc/include/asm/unistd.h +++ b/arch/parisc/include/asm/unistd.h @@ -4,6 +4,8 @@ #include +#define __NR_Linux_syscalls __NR_syscalls + #ifndef __ASSEMBLY__ #define SYS_ify(syscall_name) __NR_##syscall_name diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h index bb52e12..f10d065 100644 --- a/arch/parisc/include/uapi/asm/unistd.h +++ b/arch/parisc/include/uapi/asm/unistd.h @@ -366,7 +366,9 @@ #define __NR_statx (__NR_Linux + 349) #define __NR_io_pgetevents (__NR_Linux + 350) -#define __NR_Linux_syscalls (__NR_io_pgetevents + 1) +#ifdef __KERNEL__ +#define __NR_syscalls 351 +#endif #define LINUX_GATEWAY_ADDR 0x100