From patchwork Thu Aug 9 05:27:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 143689 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1650233ljj; Wed, 8 Aug 2018 22:28:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzyrAGPvAMKjwp0EK9moALhsza4eBtqCnBaQmD2SnaX4oj1GofsjI/N7F0l0PztW6KLOqBW X-Received: by 2002:a62:c819:: with SMTP id z25-v6mr775392pff.44.1533792504067; Wed, 08 Aug 2018 22:28:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533792504; cv=none; d=google.com; s=arc-20160816; b=qo6qaytmA7Wr9xBFnZ4C91Ai+KmJMEt4vqjPHH7KNeG8pKumWMvLeZVmbnQ2DVqQ7b vTj7YYYZRC7x9RoxgI/pD91g9NCjv2tcu1NrsuJSHrQnGXrxVq9bQJcPJrqQQEm5SK4K EFSxPnoiNf9qHpqkjhoLhhFnpDnCpk+1xUpK94vqY/MCZVrPMxDqpEUH/HmRJNDIJtJd +nnpfcQaSkV/jwTq/XSxWWpiyejtGY9nRI+h4Bj5I1lNneqzJ3bKG8gud7Henm4zVBjh rEjeKocM/O1vl65braiavCFmTWGe5aSAzcMWuUr4f6Nj7bR725JjA8ZRkUDc7Pni436/ uh2Q== 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:arc-authentication-results; bh=FHqCLue9XzCOR6pbpdt115BPmv/OxCI742eSxueSHpI=; b=irhXcnlmvXvl7kh8y8dbvYwvg6iml9aAINWbKEPTOzIi68jRBJuaSGtnXhUsCi7HTY tF0/rhFBiNyUgx9PIHqVcZOgX4PVbxcDpJ3yet0RDY2Pq1ZvuynHCA19iqoQ/jLoGfSX RM1a/jOB0JVCCNW5fjbkn0kZosVuByBugTKQt8neTqWMFo11k64WW9cKrL1pUdOGi8aS umRrZ3v06WFsVq0e5dSgBr+6O+0dM7AlsQerDiSwj+UQ57VUC/VGBSrFFcnHGBv4uX/F dNtuIAAV8Jm/zC2SSWh4mxtuHw6MYlXmIMbSevfCMP+WLQ8tctrDIMWpvHNq4CpjbAjb cNig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZKDvpCFi; 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 h4-v6si6582558pgm.441.2018.08.08.22.28.23; Wed, 08 Aug 2018 22:28:24 -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=ZKDvpCFi; 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 S1728508AbeHIHvX (ORCPT + 31 others); Thu, 9 Aug 2018 03:51:23 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41790 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728034AbeHIHvW (ORCPT ); Thu, 9 Aug 2018 03:51:22 -0400 Received: by mail-pl0-f68.google.com with SMTP id w19-v6so2043469ply.8 for ; Wed, 08 Aug 2018 22:28:21 -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=FHqCLue9XzCOR6pbpdt115BPmv/OxCI742eSxueSHpI=; b=ZKDvpCFio4MfzXYERlJIqyPMcghY70JyZAekRKnjAXEGituJ5vt5LZRsqd6qcf0WyC fEmbEDCn3QdhbT76VBbCCYjLVxWZ6DVcyR/3qPz+p5VH0JmVkEnBOMrhk5e1IsTvSgMB fa6kzXUV6ay07JCTkjcBlehVXN/NffOU9gL/0= 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=FHqCLue9XzCOR6pbpdt115BPmv/OxCI742eSxueSHpI=; b=VbqnlAZfDBQdLpOG+BvqStv6COvero9Os8gipg1ascZxq3QJAV4K/WLvelM9h68v7Q jCKZaduYg/k6k7dC0DiMIuTJcyZSz0x1dcX1pPaMDMUYajgGXqjNxZJmopF6YzK75JOD y+Gcr0n8uz9DSoeGxuHR+tRaiDoGmbAybFthQ9QSU2IV+pfSTWCbvXeIB4ERMygGuu/e johmDCdgeOgwZ6Z4H5GSrMOabEBYOlkKb5MYWWiiaTollclEFWomsyUwVHlf6cSlPQjA X9a7k1I3Peyv06v9OROC1QLZQPjsBROOHqS7ieCbTQ41NNEKw+XUkEbtCkGYN3h/LiGz FH/A== X-Gm-Message-State: AOUpUlGN86ihpOty6SqBqGMy94eXdtDMgbbBAorpRqZfZ8QZuueFzA+P xCVtE/DuK1hPs1c3ceAaMthvzg== X-Received: by 2002:a17:902:28a4:: with SMTP id f33-v6mr643240plb.297.1533792500809; Wed, 08 Aug 2018 22:28:20 -0700 (PDT) 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 q65-v6sm12318676pfj.127.2018.08.08.22.28.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Aug 2018 22:28:20 -0700 (PDT) From: Firoz Khan To: Michal Simek , 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 1/3] microblaze: Replace NR_syscalls macro from asm/unistd.h Date: Thu, 9 Aug 2018 10:57:44 +0530 Message-Id: <1533792466-4227-2-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533792466-4227-1-git-send-email-firoz.khan@linaro.org> References: <1533792466-4227-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 this architecture. This macro is currently the part of asm/unistd.h file. We have 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 number of system call 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 update __NR_syscalls untill we either add a new system call or delete an existing system call. 2. We can keep this feature it above mentioned script, that'll 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 moved the NR_syscalls macro from asm/unistd.h to uapi/asm/unistd.h. The macro name also changed form NR_syscalls to __NR_syscalls 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. Signed-off-by: Firoz Khan --- arch/microblaze/include/asm/unistd.h | 2 -- arch/microblaze/include/uapi/asm/unistd.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index a62d094..e19550f 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h @@ -38,6 +38,4 @@ #endif /* __ASSEMBLY__ */ -#define __NR_syscalls 401 - #endif /* _ASM_MICROBLAZE_UNISTD_H */ diff --git a/arch/microblaze/include/uapi/asm/unistd.h b/arch/microblaze/include/uapi/asm/unistd.h index 7a9f16a..bde6b38 100644 --- a/arch/microblaze/include/uapi/asm/unistd.h +++ b/arch/microblaze/include/uapi/asm/unistd.h @@ -418,4 +418,6 @@ #define __NR_io_pgetevents 399 #define __NR_rseq 400 +#define __NR_syscalls 401 + #endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */