Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5135081imu; Tue, 13 Nov 2018 01:33:39 -0800 (PST) X-Google-Smtp-Source: AJdET5flPDp6ydBd51LrDTS0+BOQeEqwy837DcwHrZTDd8RgLMqFONhLfw4j3m8GP0/WJHkUse2F X-Received: by 2002:a63:4f20:: with SMTP id d32mr4061375pgb.47.1542101619643; Tue, 13 Nov 2018 01:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542101619; cv=none; d=google.com; s=arc-20160816; b=K2DYN0iyaUuFcb9dNp5+iK7idC8TXoFhN2gz2FgR3QCrgL4ddrsy4gGcSf+e9KFDk+ 2h5n5Jxblpnq4euor+FsvOajf21YUMYPGO5/59fqRf1EdDVJpw18sH090eLXHylbF3F8 eeopP/BBsbwCbJp+6BqBRazF1TEVHJdFzBGm8p2pEwgsPUggduBjvpeUZ9lunP2TmRCj cGYQAa4bGPM18R0okSG52r5ghmJLNJHlEzbj+X9rRO0z5zB9GMpoEXKF34mVBL5+hMwb GyP31uSiedDFy6U2lmmcOW0u9HLqvcGo88fKZk2+r7W16mPC6hHdDKPopNutfiVMt1PW +tXA== 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=j2JyFnxfc9aHSuky4bLHJBe9XPEREtznYojqN3ObI+Q=; b=IJzG7Xhv9wH+vVq1goOkWselXOViH0CyFcPEwQKSd03c2S6ZQ5gXxpgG0X3UpfNiD2 TNigfS+YmSJy/3S5wJuaUTpIz6LF6FQ0ChJBRiLW+5OMKYJw8r8+JpsOaMHtQlpiriXC 9VIfOjgZxfBiMRYYKBT3CXDaA7cF8MXcxsrI06tWzXn/JBoQ6JUN4H97BLzGzAvaOaz7 22atqMlYiz4nhCMEX/IRP/b3tlEjwfUQwZHL+5R9NRc7oMu5lY3l5EMNrAejQNBqs/kE 4nLG/waDQYlU6fvn/tUxsSRb835x+YfGC+k+ID4DxXAb5UP7QCZzpIvMuhb41i3z8zgn 7q5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NGviik8+; 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 j6si2707904pfc.57.2018.11.13.01.33.24; Tue, 13 Nov 2018 01:33:39 -0800 (PST) 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=NGviik8+; 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 S1731759AbeKMT3x (ORCPT + 99 others); Tue, 13 Nov 2018 14:29:53 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37670 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731705AbeKMT3x (ORCPT ); Tue, 13 Nov 2018 14:29:53 -0500 Received: by mail-pl1-f195.google.com with SMTP id p6-v6so5725841pll.4 for ; Tue, 13 Nov 2018 01:32:39 -0800 (PST) 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=j2JyFnxfc9aHSuky4bLHJBe9XPEREtznYojqN3ObI+Q=; b=NGviik8+bzXbcCNkcgdfPYJXYylosVi5F8CJHbUjNMqF899uZwUrT0MMBHAc23tkSE EPmDAw6zhzf9owgX76G20SpTr1RCdb3qVUAU/cnGMLYKUJht6ULX6krudWvd93Jbyazc bXbNVazOmjF2IaMRoZVd2WaSQ8deJuWM4lXPc= 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=j2JyFnxfc9aHSuky4bLHJBe9XPEREtznYojqN3ObI+Q=; b=ih9DInYGUy+RB/pdPnJUMe8Mys3vudwlq38uXK2E9maglnzr+9LUbCsG83il7xbIwP kHJDYOfrn6dl4AW437qS4wXlg708JmTPQfqVg0Vpp1hM4zDtZpl9CvKuvenq0TfFUbAg kupaK7IWlYBgTEt2PYy5/fS1En+8oGMdDy9BKBxEZPi3qesh9J9X4YlPDnvfm3R30+i4 J8vlshoyId/KmJex4oBnH4kmIpL/zbdxCBdsO7TBpXwd/fveyS+ARBIQ8wqShABfpDV8 CWlTdPNVXUXSJKTb6IJ9GdlIsgiTgwmiWaOO69tiJK8QVYUKdo3f7MILJ1qQA5JRYO4O zPsw== X-Gm-Message-State: AGRZ1gJv0ERwUYk+uxuCxT9D89FIvVg4aHvLuPqteD3MhZsCCAIQyvIP rlQ34iKLHKnU1sbJ4WBE3noJJQ== X-Received: by 2002:a17:902:2c03:: with SMTP id m3mr727866plb.6.1542101559259; Tue, 13 Nov 2018 01:32:39 -0800 (PST) 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 u6sm19902462pgr.79.2018.11.13.01.32.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Nov 2018 01:32:38 -0800 (PST) From: Firoz Khan To: linux-alpha@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , 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 3/5] alpha: add __NR_syscalls along with NR_SYSCALLS Date: Tue, 13 Nov 2018 15:01:51 +0530 Message-Id: <1542101513-22010-4-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542101513-22010-1-git-send-email-firoz.khan@linaro.org> References: <1542101513-22010-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_SYSCALLS macro holds the number of system call exist in alpha architecture. We have to change the value of NR- _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 total number of system calls information. So we have two option to update NR_SY- CALLS value. 1. Update NR_SYSCALLS in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_SYS- CALLS until we either add a new system call or delete 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 generated file. In this case we don't need to expli- citly update NR_SYSCALLS in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with NR_SYSCALLS asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls 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/alpha/include/asm/unistd.h | 2 +- arch/alpha/include/uapi/asm/unistd.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 4f0ceb3..21b706a 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -4,7 +4,7 @@ #include -#define NR_SYSCALLS 523 +#define NR_SYSCALLS __NR_syscalls #define __ARCH_WANT_NEW_STAT #define __ARCH_WANT_OLD_READDIR diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h index 47c65f1..ab40aa6 100644 --- a/arch/alpha/include/uapi/asm/unistd.h +++ b/arch/alpha/include/uapi/asm/unistd.h @@ -465,4 +465,8 @@ #define __NR_pwritev2 521 #define __NR_statx 522 +#ifdef __KERNEL__ +#define __NR_syscalls 523 +#endif + #endif /* _UAPI_ALPHA_UNISTD_H */ -- 1.9.1