From patchwork Tue Oct 16 07:03:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 148916 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4722297lji; Tue, 16 Oct 2018 00:04:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV62v/9pBeiVMyazdef/uC1Jo8Q6c1fTogf0YitHDJ+Tj1EOEBUYOUIwlxj3AWTdAim0URD0u X-Received: by 2002:a62:241a:: with SMTP id r26-v6mr16393184pfj.74.1539673461853; Tue, 16 Oct 2018 00:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539673461; cv=none; d=google.com; s=arc-20160816; b=VKiBd9cs7BafSJt5L6wSVpeY2j3A59eavXYmdWzosFWy/7n+EWL6hrDQvWWkSLdr0M ZCdoIquLLH13D3VVRTB/R+clD04o2N29WIkF4MQ1AYO2vZO1iva4YMlr2FjggwPHDDAz 7XjApW+Xa4AMRdwJqPoVGsehBjNVuqb/ovwwrOO5UsW4dXPq8TTDB1huz6wOSFzECUQa Wr7HyzOiJOVopklucyRa/1YiTG2sbLyReIqraDmUEn1ufiXIDJNAciJmToYWBx7Iw9P0 Ee9Atg2R/YusCYeS6floRv2n/JOKLpfgEkOXpcYEBVb2lZU1tyVfokgFOSBkNaeWQvsc H1vg== 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=vrv8fKIqMQf6Gj6JWbrgXegCN9FQOUPjQOonQgeDvikXngXGw11F9znemM2JifOsGw 4Fmw9JwzQ6qJTxpS/i13LU6+7hz4d7Hqt3My6jSx4gonG4fwYFZohEAwTGI8TfUctPh3 CzNdcu7YVR/7ObzjOReEhU7EcYm4El3kwKVcIHz25Esw4IoK3/Jsq6mMkLe+d91YohoV hsXnXCMpH6RRC500xz12LaRwkUjScofeH/ef9uz1MuCo+kc62hAQVPL8yK4Ua4+j4HRU rC4gpSNw2w/jljacTHql9P+PFaVXOXeKoNRs6MqR5GvBMEliQDz15yJsblMAr5nQRqJB vrvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LxWmFvQh; 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 q15-v6si12125990pgg.477.2018.10.16.00.04.21; Tue, 16 Oct 2018 00:04:21 -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=LxWmFvQh; 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 S1727836AbeJPOxS (ORCPT + 32 others); Tue, 16 Oct 2018 10:53:18 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36329 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727603AbeJPOxR (ORCPT ); Tue, 16 Oct 2018 10:53:17 -0400 Received: by mail-pg1-f193.google.com with SMTP id f18-v6so10396297pgv.3 for ; Tue, 16 Oct 2018 00:04:17 -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=LxWmFvQhBF2jJwTFicVPM3wXKKOegEt5rsmKhLXvwFJ7+5t1caw9PfIVHihvrr3+FN wizs5h1OZDr1ed+5tX7J3gfYcL8eV0or+cHxj3gtfx4maGvZzUcgfgs5+sz9EKBgZTSR reHTZXVh5MlqFRrhdQtbWgIgu9pXPNzL1ceWc= 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=pOvXHVYh64SZpO2QBhb9lu8WortAelyL7CbJS5DyovuSO9Q91/uY8NCD5h1rG2PcVw zqFqgACZrlpYH/WWIVSqw4BQTl+YsdWidMrQQwpS+fv3wyErwyzx68XPmkKsDB8hMgOv psXVUs6T1icPSN5pX2azwkfkOEUdE+M3BLLTt4uxun3ympAIRBD5Bu8h5YRHSl3pBfsa ZToITMIRui797JXgB1nFowwaao9GbV2zfNF+FnsoVXyByzx4T5xQ7RCDPN4SPJvW0IDX UDVDQBQc2OQnqqOJGLI4QKITwmawmSodgiaYL0hnssePoCIudQQFF1RALQrsV/A/VuTA JeLg== X-Gm-Message-State: ABuFfojo7eugdqB2gJYOfJMNXcok/xSv4s5Xd6GJK3hpe6EpE6Mmcssx 0C9NNwFHVmURK+Ifl4MwcgqUvg== X-Received: by 2002:a62:ce83:: with SMTP id y125-v6mr20957910pfg.201.1539673457368; Tue, 16 Oct 2018 00:04:17 -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 u21-v6sm21775107pfa.176.2018.10.16.00.04.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Oct 2018 00:04:16 -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 v5 2/5] parisc: add __NR_syscalls along with __NR_Linux_syscalls Date: Tue, 16 Oct 2018 12:33:35 +0530 Message-Id: <1539673418-7279-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539673418-7279-1-git-send-email-firoz.khan@linaro.org> References: <1539673418-7279-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