Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5012514imu; Mon, 12 Nov 2018 22:59:11 -0800 (PST) X-Google-Smtp-Source: AJdET5fh74zqGpovLfOiuDiPpr9/+KZCia2b4AonHWLBqpWyHjeDSN89IDwTbcJr9i/bQV2po6Nm X-Received: by 2002:a62:160c:: with SMTP id 12-v6mr3985646pfw.45.1542092350960; Mon, 12 Nov 2018 22:59:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542092350; cv=none; d=google.com; s=arc-20160816; b=CvI88B/VRUgk7fi8bCzkXyMB1mXxxSj00ZE0xVYnfjOUjiUHHWhimy4ph1ixuntsYJ vqmqI7JCm4zos+1jAfBFFBD6eYLnXs4e6jCforL78TWnpPdmwqIqW1BB1dEknZO8WPX+ 8hlAAru7B5ok68/AYlt5CTf+KKI2IChOStW7YbKZVnbyYRJeIlLED4Fy7IMo1r4s0Z+x aYPFJ4GaJPKlqqaACxoGxl4wVPghc2/a4Tz+LcsrDMg0esxV+ifQhlarVqUD/qgKxP7h 9GKIOGEpeeNHj2+eS43BqRFPZFpF2BrHkATqI1OynGr0JcnwlhBWfnTsLaDe3IVKX5La bjPw== 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=yNIl1XiLhRzKxCPbqGLZO4Ur4FhlYlJ4hj8ePU/zaS0=; b=H1a3ybO6CnwXWGWtQiPKAkFFCD0sB8P5Ev050IJpdIg73UAeBIA4xahL1K52BTvHbY wz7QNyweuRLX0SH6Klr7gUgIBVTFaI+kzgPTSS17moU5gBdCNy6cZirWqr/sCazEJ9KM frwEXGfs5P9SYXVmQrYoivYoHgKaKaE/3y28wB2e7b8tu0qC5aSc1gpuRP8ojIownEwv U2dzz81XEpuOJsFN6Uob61dodWH8cQKxRiqALhrYzeDzkB4AZuXvDvrSbJkB0lkmzKNl aLG7W5e5vpuvVlaNc/4YViELCmS8tTzHFTM4jnjtHI1ofqMKNjuxPAEIAwg20k3WuVz3 KpoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ijZEeocL; 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 d32-v6si20829723pld.238.2018.11.12.22.58.56; Mon, 12 Nov 2018 22:59:10 -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=ijZEeocL; 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 S1731138AbeKMQzG (ORCPT + 99 others); Tue, 13 Nov 2018 11:55:06 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42604 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731059AbeKMQzG (ORCPT ); Tue, 13 Nov 2018 11:55:06 -0500 Received: by mail-pf1-f193.google.com with SMTP id 64so1088194pfr.9 for ; Mon, 12 Nov 2018 22:58:23 -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=yNIl1XiLhRzKxCPbqGLZO4Ur4FhlYlJ4hj8ePU/zaS0=; b=ijZEeocLfZ0Tl1dWX3cc6NfwUPQ23N9SskfDTqjsInrXFi4EGZUAmumhHzw1ZQzyVW xTmMBGslo5/5OD2pBvM4QKu5sJOkGfiy236XKIk7F4hbDcCrIvDLT4jOzhih1wlUHus2 DLGoevKQ3VnIDRgOTc/xxxkmF1EgQ/LWSONyg= 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=yNIl1XiLhRzKxCPbqGLZO4Ur4FhlYlJ4hj8ePU/zaS0=; b=eCREZCbBfl5kitwKIYNrfbUa5u5t4fhOAF6z10b114Hcz+A55K1b22rfMmlptXISKn n1K/32l20wmZFwmCfEuLj/PZaKq1TsIR7AaOXCCshiAhkR8Iuu0r5OG9XmPbKy7SmSFd oP0kvWLolBf7IzL0a7ea7IemC+cz26N5NBF8GPjIV60hwkfuHj1Vhp75NXOE/alja5MW m+a5qaayuVxf2j0TuhKOEdjbGUdV62L2dR6QO0OMAIlr3USgLd7n0D1btZxkZSt6H97S sffpAk2ipnK8XHnR+5aJUFP2foEHvRV1+UPTHoPRSxVvIcnvfDK8AZcxGWpipjiHr0xA US0A== X-Gm-Message-State: AGRZ1gIvjGvRvNAPzzp7xCpVdo6kdTQU8oPOept34UnX2dUA3sJSyPqs jQtMckculkdQHmDWNhZu7iJpcg== X-Received: by 2002:a63:8c2:: with SMTP id 185mr3703168pgi.26.1542092303061; Mon, 12 Nov 2018 22:58:23 -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 s186-v6sm42437935pfs.164.2018.11.12.22.58.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 22:58:22 -0800 (PST) From: Firoz Khan To: linux-ia64@vger.kernel.org, Tony Luck , Fenghua Yu , 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] ia64: add __NR_syscalls along with NR_syscalls Date: Tue, 13 Nov 2018 12:27:42 +0530 Message-Id: <1542092265-20956-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542092265-20956-1-git-send-email-firoz.khan@linaro.org> References: <1542092265-20956-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 ia64 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- scalls 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/ia64/include/asm/unistd.h | 4 +--- arch/ia64/include/uapi/asm/unistd.h | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h index 49e34db..0b08ebd 100644 --- a/arch/ia64/include/asm/unistd.h +++ b/arch/ia64/include/asm/unistd.h @@ -10,9 +10,7 @@ #include - - -#define NR_syscalls 326 /* length of syscall table */ +#define NR_syscalls __NR_syscalls /* length of syscall table */ /* * The following defines stop scripts/checksyscalls.sh from complaining about diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h index 94b835c..388ab4e 100644 --- a/arch/ia64/include/uapi/asm/unistd.h +++ b/arch/ia64/include/uapi/asm/unistd.h @@ -341,4 +341,8 @@ #define __NR_preadv2 1348 #define __NR_pwritev2 1349 +#ifdef __KERNEL__ +#define __NR_syscalls 326 +#endif + #endif /* _UAPI_ASM_IA64_UNISTD_H */ -- 1.9.1