Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp341954ima; Thu, 25 Oct 2018 22:07:46 -0700 (PDT) X-Google-Smtp-Source: AJdET5caUlmTT91mCkpTpU7gr4RC1lfSnrkfmwacRGKAvcglwtXvqrlz3usxRjM5CjRbi4GwEOig X-Received: by 2002:a63:4c4e:: with SMTP id m14-v6mr2072246pgl.173.1540530466567; Thu, 25 Oct 2018 22:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540530466; cv=none; d=google.com; s=arc-20160816; b=iKFNwVmro/ROm+lv0uCj7XrDdJsMeM0rTqp/zOel5klDAL+Kfklxp808pzPWZej8r+ AICZyqWBuZWIvJTP2pbGc0Xnc7im43+jJZuu+YqZ3DKThrjCqhMYc+Oi0PvC59XjZMkw Z8nopKRGVtPDgu4352wAJXF2rAqdtbn50ck9pHkC2Ej+1RMRvT75TQknNipfGDLOPaGD gm47fDSDc+HVLdnb1TQJ3IBncCvhgVEdyqRuzSjgqYXmUAXxaii8Xg8+HGGXhCXD8DKW y0BiLS3MUTTTS6eogR8u8gzd3I1yyuSSqkR/48+VkkNPvvrf1TBIvJIZ5v2jxOifFpTg gNvg== 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=z+Px7sUPuRKapRa637BSknRaNKVUB6N1jn4kvI9gb9w=; b=qrbNIG/ILLD0nZXr6HE2EAiP+IDZ0byU30+Et1Z0BLe8vstQxVSJRv0kdTTZbYKB4v zsqEIONW+jSGH9Dlzun3LS1mGqj0j+3gKI4CarhONB4rlMhwNUM9/PbnpPUe4olVpo4D 33IoxZMGNj7AhB9L+AVf8TTFgTeZJajhlQ9iBWuuFMaQ6a1QETnpH2MMhSTl1GBlDuTY v5xyo9hDyD9dKiwA8V+55PJfLu63ChLTyOOMrWJzbipyrHaQ6i8siU1iwa/4pfuOp7Ev +6/BNbCKK1RcybhIFDJ9q40bfwvDUK9OUpXEJ/wENQhLMxDpSmVUZddYptU00sJ2/Wor 1+3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ArkMinRx; 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 c2-v6si6841922pgf.3.2018.10.25.22.07.31; Thu, 25 Oct 2018 22:07:46 -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=ArkMinRx; 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 S1726402AbeJZNm1 (ORCPT + 99 others); Fri, 26 Oct 2018 09:42:27 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37145 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbeJZNm0 (ORCPT ); Fri, 26 Oct 2018 09:42:26 -0400 Received: by mail-pf1-f196.google.com with SMTP id j23-v6so5320167pfi.4 for ; Thu, 25 Oct 2018 22:06:58 -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=z+Px7sUPuRKapRa637BSknRaNKVUB6N1jn4kvI9gb9w=; b=ArkMinRxDe7YmFppkSMRSYWfGT+1uCuCigBc9vtGNB1rkeVbmzd9Fy11TnqJUiHXsN y2ql9z61wIJze5l7cP4NfuM5gOriMEvWp+WXVuaxp1r12aBXEtyNo78ffsJv3VV9pquV M00B8yIMbm9UwRld00guQygDw5o/mf9xpmjkc= 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=z+Px7sUPuRKapRa637BSknRaNKVUB6N1jn4kvI9gb9w=; b=YKE8Y4S9pH7L+G/1baYZmOJjyPBq1czSkkFEEnB7HfJICfa92GqkYs1c/Sh4YEJb5i guJoJBWfCatj1UZ8AZRzqr+p+S/Yp87v44EAP3qv1QdjMcuWJi6njw0OWIVrXzMGaYbs UPs47ROQFTVTfBXy76EGdyVrzvDW3B0uXvOJCXSzxLLN+jP375WlnlvYHs77mKgAnlDT yXOBkM8SyiuqqhCb6KMT0DCFjeR04b6mtal1n6eVDz7DpRdH5RMRPNZkzMrpvqgYND/D xY0jLD2g4RxZ6S8C7u2RTDrKrdIw5CSvLGcjavaNaKVwXivSvBttV7fVMAXTn1KfZF4Z 8CXg== X-Gm-Message-State: AGRZ1gIcju1QGPIAvUmNJMjH3eJsZsSmGLtKpe70ieWK9m+mQuDtRo6h c9ShT1QPBxLSccrQeq5tH1A+ig== X-Received: by 2002:a62:8910:: with SMTP id v16-v6mr2200909pfd.106.1540530418057; Thu, 25 Oct 2018 22:06:58 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.domain.name ([49.207.61.165]) by smtp.gmail.com with ESMTPSA id m18-v6sm12800626pfk.149.2018.10.25.22.06.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Oct 2018 22:06:57 -0700 (PDT) From: Firoz Khan To: Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Greg Kroah-Hartman , Philippe Ombredanne , Thomas Gleixner , 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 v4 2/4] m68k: add __NR_syscalls along with NR_syscalls Date: Fri, 26 Oct 2018 10:36:15 +0530 Message-Id: <1540530377-3509-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540530377-3509-1-git-send-email-firoz.khan@linaro.org> References: <1540530377-3509-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 m68k 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/m68k/include/asm/unistd.h | 3 +-- arch/m68k/include/uapi/asm/unistd.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 30d0d3f..5072e94 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h @@ -4,8 +4,7 @@ #include - -#define NR_syscalls 380 +#define NR_syscalls __NR_syscalls #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h index de3054f..ba4176aa 100644 --- a/arch/m68k/include/uapi/asm/unistd.h +++ b/arch/m68k/include/uapi/asm/unistd.h @@ -387,4 +387,8 @@ #define __NR_pwritev2 378 #define __NR_statx 379 +#ifdef __KERNEL__ +#define __NR_syscalls 380 +#endif + #endif /* _UAPI_ASM_M68K_UNISTD_H_ */ -- 1.9.1