Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp683127imm; Fri, 28 Sep 2018 05:15:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV62qpbvbTsS/yQzmpZu20KeXtPa1Ej9NfM1FXBpJBIpH+fjvdgZ+k8Ma5VS/NXuO0TXVC6zc X-Received: by 2002:a63:501:: with SMTP id 1-v6mr14593504pgf.205.1538136906584; Fri, 28 Sep 2018 05:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538136906; cv=none; d=google.com; s=arc-20160816; b=MYgqE5e0BZIgmwrjydDwIzF6E/BZrBa/aWqNdQqp4ZMCT7maXB7VnzNz+WOQQ5H21I 9PWppBnohU7E0JV6c00FkVAbP8A/gz3wLzt7auPrKAXSoZ0g+koNFbag4e5JIH5uvMtc zVAXlNufS5gU1yrgA/m91Zea/QE8UFalhk2AKobjOq6SOpxEfVwL/apDxmF/CLVXrkB3 9czUliXozpACTaWz6EdSHc2b2Mogx2YXKsXbcoGKkIHTMJy/AybNFprg8RI4mTYg+M+a qVHWfN4AFmY+ovsBYWCjh3Dg8LPwAQgojAXYR/5cCyMb1J6ZJ2CP2pjv5I4dQY/oiCqK MIzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=WluYTs90xjs5O1/hXjNGnL38ko0c5Rf6MR8HSV7laLw=; b=TpIQFdrlxDrCvc82Cf4ldCm2w3kSZ8t9ISAon2LYs5OZ4/0XXCHzx1G0il5SwZkzkn ItK9WYnIA+a4/yRJywpVP6ITOLBluQ6xNlNighfGCw/TrnEXXiVBxFJDd5UTTqrJJ/t4 M48LVEZkFGnxDL7F9v3LlkuZvTXYgdulbYTMLaiWo0W7PzD1Tt+hKRmgHDa9vpasgRbc IPCRZ1+ikC6Z7XkGB+zw4Xac/fS0vpjc3MoiiFpSGyK/+wJPMWUKTfwGyfugwXwDHwDX Al93KrIjIZtUyNwoddyog9gNqK7g8CR6mLIb1iM5stm+k267FWRNFxihVPgPxxZJuf9o kU0w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u91-v6si4683092plb.73.2018.09.28.05.14.50; Fri, 28 Sep 2018 05:15:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbeI1SiN (ORCPT + 99 others); Fri, 28 Sep 2018 14:38:13 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:37069 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbeI1SiN (ORCPT ); Fri, 28 Sep 2018 14:38:13 -0400 Received: by mail-qt1-f194.google.com with SMTP id n6-v6so6326937qtl.4; Fri, 28 Sep 2018 05:14:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WluYTs90xjs5O1/hXjNGnL38ko0c5Rf6MR8HSV7laLw=; b=I+Brv6C1CZPa62f4+S4osKWyZDqA7ku13giyICQbPzKM7gS6yaGJOlbDq+nPAJY62U G9pDdIRAMBYetwN9tlQ5OzW34TxOeU3/PqCl2Xu+5P0bK/9QkifVDwnSWAJl7bD/nweE AFoAlWE5vDwMDB+vVC5WmyQu5Kivjy7RiYhMEP/i1d1uQls7GutXe7h8K644RZ68D9w9 8kT0gG6rFxwWTrofBz17CvWH5kBE5mm3LnGzq6Q8eF6VuGkyEdm0YoNkiwzLx4sR2rBl X5jp+jusrcOcJsQKPi1M4o9i2jZ3f7cFraIev6UYnK1RHntZk2owcO6UrK8G4xJdadw8 vnWA== X-Gm-Message-State: ABuFfoieswKdKhAY5WNYUWVMUJoC3WIVKvsBxnDUf5KRf7HPlMfg7hlf o2ZujvOSsmTqTJ0v8vCqjoXvO1hCnA6gaeLhtJ0= X-Received: by 2002:aed:316b:: with SMTP id 98-v6mr12523155qtg.9.1538136882604; Fri, 28 Sep 2018 05:14:42 -0700 (PDT) MIME-Version: 1.0 References: <1538058267-3765-1-git-send-email-firoz.khan@linaro.org> <1538058267-3765-3-git-send-email-firoz.khan@linaro.org> In-Reply-To: <1538058267-3765-3-git-send-email-firoz.khan@linaro.org> From: Arnd Bergmann Date: Fri, 28 Sep 2018 14:14:26 +0200 Message-ID: Subject: Re: [PATCH v2 2/5] parisc: add __NR_Linux_syscalls macro with __NR_syscalls To: Firoz Khan Cc: Parisc List , "James E.J. Bottomley" , Helge Deller , Thomas Gleixner , gregkh , Philippe Ombredanne , Kate Stewart , y2038 Mailman List , Linux Kernel Mailing List , linux-arch , Deepa Dinamani , Marcin Juszkiewicz Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 4:25 PM Firoz Khan wrote: > > 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 > Hmm, now you have a __NR_Linux_syscalls macro that is defined in user space to a another macro that is not visible there. How about moving __NR_Linux_syscalls into arch/parisc/include/asm/unistd.h or replacing its users with __NR_syscalls instead? Arnd