From patchwork Fri Oct 12 09:43:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 148725 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp520024lji; Fri, 12 Oct 2018 02:44:55 -0700 (PDT) X-Google-Smtp-Source: ACcGV60n0nKbtO/9j+A9b4/9chaFlqPaGVAQ8SOVSWs/54/WkQXuKbT7OXbyU6fjTt88faIQLOr8 X-Received: by 2002:a62:e80c:: with SMTP id c12-v6mr5395799pfi.124.1539337495322; Fri, 12 Oct 2018 02:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539337495; cv=none; d=google.com; s=arc-20160816; b=H/8ZGFy1hjz4jd5MllUah3iJh1+s/jGPuby/0Ktexsrw7C7+5VHa9X937tpmVbQEuc yF2sX0ms7JTFzc+CDr/d3Ai8M3nI/Xixkqb1Wjsnx2cCS6ElTN9XzrgOhSdFhumokTU8 FdfSkVin3aaD7jv7v8QlQvxJPCHqWQ1iDYqsgWfzng9lOEou8NpTQlqO4J8OHKC4dd1Y zIqdUR8UVVWAPoLPZIB+jHfluomGVP9+TR9m/tqRk2MoqByrhRn24APhMmWRuwzJzfH+ siC9SvqEw3KIKFX/YXMVETUGJnYTiM4xSwhWf9fUsoEkSGTLH4GTjhvdSsZpBZd1HbG8 D3pA== 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=oE8NWzPgAGNR6H6415gixIiaFkAJMW4bk0f1Xqx0jR9qgRs2C8QgDGdXV+Oc2XagdA 1Gn9L8snBg+nsZkq2tKU4GBpOzQlXP9+ffJOeEMmEriZIWwWsg0J0U6io6dl3GZWcPz+ wLla05pflczo8+ljU9FLXKNYcilDUy28XRPw6wcH6Nb71tXnP9X3vSuQrQvGvb9i93+d 0HjLPcAYGXGMr3pRtGkzh91LpA1ibucFvkbUeLm7SZR1sF5IinyR+FxQiqffn/NUy+tr B9r2lenD7Qm/GzseUjmZrBr7DN4OBj2n75S8/bUDFhI1jo0y+QQMdQBssAjom3WPPJ51 1nRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aq1ombfV; 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 v11-v6si781965pgj.276.2018.10.12.02.44.55; Fri, 12 Oct 2018 02:44:55 -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=aq1ombfV; 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 S1728393AbeJLRQ2 (ORCPT + 32 others); Fri, 12 Oct 2018 13:16:28 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:42142 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728360AbeJLRQ2 (ORCPT ); Fri, 12 Oct 2018 13:16:28 -0400 Received: by mail-pl1-f195.google.com with SMTP id c8-v6so5666836plo.9 for ; Fri, 12 Oct 2018 02:44:53 -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=aq1ombfV4olvF+Cz+jnwTCKGT+GNGrX0CQ9i8YZUnBP2sJETHM4SQwG156Dq5UPk8V 6szJ/410NKS5EHatc7cRE7rZdL6e4ipIWM5sw6LiU+0Tei/IZ8iZnlLHFpWkrzRAbMe2 B8q8jnYjBgU2g2rrmX73XLYsOT3q3IGoH4mkc= 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=TY4QeMYjw9g8UwV3vo4fxRA5Aa8sqiO7dyfep67At8IxybByR9VX4yGaVQggZ4VEJv q2W+zJ8cs/p2oP0DlUwT0fyPyDblu8ZtKIsECZo2VQcc8P0JQ/sBGv1U+R8v00CTSup+ Pdv2EP2X4DdxNkhlZ2jPICO5Vbl6MuOtRU/7rt3CeVhuhyC20/Zy8itmzVvrAaIwLbrb F2yt/HXO3IMuLIxUMFOw6gwv2zvm9GmM3p116C6zw7aSIMM7ccQ+y0cU+SdCOXVBJuSf 6MzezkrBYGtmLY8u6OOigJG36hfjkXe7TomXRUXludG5tps7PdBMaKkQysvDCEifhci9 IF6A== X-Gm-Message-State: ABuFfojbrmA3sgG4vkwrrMyVemiIdHNAEiDZ+yxAithYBf/XAaYZuMle xXWA+TdHQ8bZ277g3KsrfK+FDA== X-Received: by 2002:a17:902:3fa5:: with SMTP id a34-v6mr5258818pld.244.1539337492885; Fri, 12 Oct 2018 02:44:52 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.domain.name ([106.51.108.175]) by smtp.gmail.com with ESMTPSA id j19-v6sm1254191pfi.137.2018.10.12.02.44.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Oct 2018 02:44:52 -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 v4 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls Date: Fri, 12 Oct 2018 15:13:58 +0530 Message-Id: <1539337442-3676-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539337442-3676-1-git-send-email-firoz.khan@linaro.org> References: <1539337442-3676-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