From patchwork Thu Sep 27 14:24:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 10618093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94FBD14BD for ; Thu, 27 Sep 2018 14:25:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 858F72B893 for ; Thu, 27 Sep 2018 14:25:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 796262B8A1; Thu, 27 Sep 2018 14:25:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 235902B893 for ; Thu, 27 Sep 2018 14:25:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727599AbeI0Unp (ORCPT ); Thu, 27 Sep 2018 16:43:45 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42499 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727597AbeI0Uno (ORCPT ); Thu, 27 Sep 2018 16:43:44 -0400 Received: by mail-pf1-f196.google.com with SMTP id l9-v6so2029043pff.9 for ; Thu, 27 Sep 2018 07:25:13 -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=p9t4d2U76M7pVedCN85mCQCPYHIVwNmeA4otNDy9pl4=; b=Rc8t9lmekcb9TYf9AhJ2vtFn+IsrkMaqDsPXR+06TM2j9yTko9LvoIAhPG3b6rSaIn KyHzSkcq6IO4LpEvBfc9YKYnXkzJ/bG6vl9pZ14w+HD3HEipgSPUaaoLrSN0RwI9ukrf +nb5Uj0wFiPe6bo9FGJ23cPWpVpq49Ha/ASh8= 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=p9t4d2U76M7pVedCN85mCQCPYHIVwNmeA4otNDy9pl4=; b=WLTrYxGxFoOO0MaYatF4NRvZalSwXRZdeDzz8Vi56WGz5FwZtQtQWYA697VctRZbrN 7bNhCpfmmyxz8FPlYurmMJtLYGm3uZzTCKNKZNmDpKVgkAkEZMGpMTgrcXRW7Cm4x5QM qFhrItR88K4YBG4M4CXxZ28cr1/HdlBmkaXAJJFXPh8BteEdT+chnolJ6oq/xNfNZR6+ d4IbmVSJvlAqEAQxZBpma29cZPWVF5eH7/8sUwZk7IIzL5C4KnOk9dL7mNM/5mNLjav6 R1bbpRZdf9YIeFCk0HFhva6ezuL2kXwnQr8PftP8e6wlwk9UL8s7iZNAaQC54tp7lbxL NfQw== X-Gm-Message-State: ABuFfohfcWoK7FvK0K89VTpTLzpCWRI+ZuuYBxevslnt+sAadu+c4pCJ WAPgoTYoTYad9yMVKhmKLu6loIvLXl0= X-Google-Smtp-Source: ACcGV63o0Irg1MEEYdDF2pv3zSCv0ITgnqy+ZrvMq4cPWscqKEVtzVjYPBJTMkTJCaj8MYYvjGyYaA== X-Received: by 2002:a63:6746:: with SMTP id b67-v6mr10616283pgc.310.1538058313394; Thu, 27 Sep 2018 07:25:13 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.domain.name ([106.51.105.186]) by smtp.gmail.com with ESMTPSA id f81-v6sm9717421pfh.46.2018.09.27.07.25.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Sep 2018 07:25:12 -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 v2 2/5] parisc: add __NR_Linux_syscalls macro with __NR_syscalls Date: Thu, 27 Sep 2018 19:54:24 +0530 Message-Id: <1538058267-3765-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538058267-3765-1-git-send-email-firoz.khan@linaro.org> References: <1538058267-3765-1-git-send-email-firoz.khan@linaro.org> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP __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/uapi/asm/unistd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h index bb52e12..255c62a 100644 --- a/arch/parisc/include/uapi/asm/unistd.h +++ b/arch/parisc/include/uapi/asm/unistd.h @@ -366,7 +366,11 @@ #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 __NR_Linux_syscalls __NR_syscalls #define LINUX_GATEWAY_ADDR 0x100