Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4972194imu; Mon, 12 Nov 2018 22:03:48 -0800 (PST) X-Google-Smtp-Source: AJdET5eSqN2gcvbxhgK9pwE2RYJoXTQtGvvyJpO4XeGbX4G9DZL/A/Jci+l1LIYlhWyg0UvMSQnr X-Received: by 2002:a17:902:f097:: with SMTP id go23mr3672925plb.328.1542089028840; Mon, 12 Nov 2018 22:03:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542089028; cv=none; d=google.com; s=arc-20160816; b=IP+RK8ZJE250y9RqCJxFhR5wHogNXKHzD0bWhMwZZAMc/21L76p8Z0SaYXJTgnL7Ib szWu8HZP9VWHfEjrtPDbt34p9M2hvzpvGFTeswHDgUJyAgZHhYmR5cZuEHTTq33hV5F6 Ex+YouZHUHRjgZ00rSBiScUz5ikkB3qj537g8ntDZiupHWU99mMyQAkAPCFBa34+6zhg 31B0H2hOOrokWuNFgH5hQAuFU2NgrOb7PUIsctUBrmH/R21ULpDL2K4z5fIwPhFZXE/N zCeQxMIsSTCDQERnBRwvwQwMLV6EAQtZ0Mj1ub2BJoXaPJt6ByXs4+ltC2kSNSvLmPM2 +bXg== 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=L1MmGLhowMkEp3+3jZ4blj4L16FJ2J4LnmdalTZsoAw=; b=JAgK9ME5b26a65DPJ3i+QDrurbl3URc22t3nlg4osJTTf1lncQ68w4nxNY+M2uyt+6 KNF7qcTDacdKj/Y54Wa0nAYHvkjild47tap5c+E8ItN9UG7SZnBWpnDMb7kz0hHWzYyI oPJOyFwLyxmswheaEacbSw4zIq8/4ZO0ruNLN7N8GZQkRw7MvebInHObdlj0VgPuNfrx TpFq++Ppv6Av0UrlP3E5XVEY6qUfcZQhH0d04Q/j9woX5iXDp4SCH8KXqGX/guMmFVaI khvQfBgapps0GzCnyVjcaoGnjCDtTJjRNDBDjkTAAbQoZIEAayyPElqJE2DRqpKwcb3c DYYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fT8ABgGg; 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 c189-v6si21786437pfa.106.2018.11.12.22.03.33; Mon, 12 Nov 2018 22:03:48 -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=fT8ABgGg; 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 S1732430AbeKMP5k (ORCPT + 99 others); Tue, 13 Nov 2018 10:57:40 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32897 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731956AbeKMP5j (ORCPT ); Tue, 13 Nov 2018 10:57:39 -0500 Received: by mail-pg1-f194.google.com with SMTP id z11so2543802pgu.0 for ; Mon, 12 Nov 2018 22:01:09 -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=L1MmGLhowMkEp3+3jZ4blj4L16FJ2J4LnmdalTZsoAw=; b=fT8ABgGgnE7dc7JKEqhztZc57y5uVfURFWAgXdtKvn3kHm/QTqSOgaPiY+jX5RHSou 83V6izCtnmWGfl35c8G2GNSwS7cBSIxG61ELQXM8cyBzILyx7RBNvGsB7iHDMjviFVRo KGmPzP3dTfIl2tNV/NPv0VyFljbae95zQJWCU= 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=L1MmGLhowMkEp3+3jZ4blj4L16FJ2J4LnmdalTZsoAw=; b=pgfn8mWTN5yQDCMT59cJ5HpIx9RbzDsM7h+f+4vEHK+Pw7uzzX9p1hSFLwwAtOkLiS rVOjKlvMBJ68jxH7InMj+rhVGQ9ESIsLCIVrPrTgsKQ0lrbdbEr1WBDAd2CXCtgYzCDr xQ4S2+lX0T/FG3LRRDUVS1TJjfc6zNDV8QSLl8Jt/wz6sHfWwzv6ine4mqoK8CnBjjV5 Hu63KuMoyTp56Z9nZgg8uzGwNzT8JnH6qc7LG65/ylmhu9/xgzyYpt0tqr/t1m0TJhfA LBJVcX8rGiNhS1QfvJSbZVQ30hbivH+rDaxfO9R3PwCdSt2tlR9rpgD/kCCPFYFeOAn8 lysA== X-Gm-Message-State: AGRZ1gKflBUnOsBilXWmYYlUobivWMzNuKLH9DyFkPMmdsewR+ax1qYQ /DD6ZIAtmBxWqUv5paw2uIhvCA== X-Received: by 2002:a63:193:: with SMTP id 141mr3580631pgb.136.1542088869009; Mon, 12 Nov 2018 22:01:09 -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 r6-v6sm19150204pfk.157.2018.11.12.22.01.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 22:01:08 -0800 (PST) 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 v5 1/3] m68k: add __NR_syscalls along with NR_syscalls Date: Tue, 13 Nov 2018 11:30:27 +0530 Message-Id: <1542088829-19790-2-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542088829-19790-1-git-send-email-firoz.khan@linaro.org> References: <1542088829-19790-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_syscalls value. 1. Update NR_syscalls in asm/unistd.h manually by counting the no.of system calls. No need to up- date NR_syscalls until we either add a new sys- tem call or delete existing system call. 2. We can keep this feature it above mentioned sc- ript, that will count the number of syscalls and keep it in a generated file. In this case we don't need to explicitly 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 implement- ation. 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 e680031..49d5de1 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_NEW_STAT #define __ARCH_WANT_OLD_READDIR 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