From patchwork Wed Nov 21 04:14:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 151643 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1443546ljp; Tue, 20 Nov 2018 20:15:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/XZzC3DDBpsgA3wUMUVEaQ4bOpztdQFJeGjh6g2nopGeEH8+NteibuMXIT7F7/GhQ6KZD+p X-Received: by 2002:a63:1e56:: with SMTP id p22mr891407pgm.126.1542773711181; Tue, 20 Nov 2018 20:15:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542773711; cv=none; d=google.com; s=arc-20160816; b=Zz80UcDPgVg4VnXzSegxFmOMqyZbeF0fnnpau9Vvc6T0fPJzM2HrrsNsERoYis45gg MMfbftP8541FkeezhDuNcPhWYHv4mknIUt31vrHFhmsJgERIrkLHyKbrgonopAgtjkz9 FpeVgTRwH/PFqe2/VAJY8FoQyO3u9ztJuoZTJQkp0ZUeNG9bKRATxRtPBZQYB0xtcAad pTmaGDilj2O9nF+sxYhGNpdmbHA8adenC/QSKetvZUp9x2oAotf6i90UCNVkee+ekAus PlP5vvFgaivwi8oCiS0D4Ry9eJE8KJxkY1YmyCInT9NsbNYO0DVcbHqMNCLPKSatBets dE4g== 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=YZE1AyeTPRRnquAdnDl25l1LOkW//go+oKzyIjbXwF4=; b=ATJD49C4iIRiTJK8At1YAxt9+He89giFqRANwJySpivZgSQMFxZ1yV42mZNyhj39XY JITHBvI+odFGVG7g1FY+iNEAK2IDV1pr08vZTXL5UJGt5J+uHIN+8klm2+nLtlT/MFBU KMn8pNZJxsk9zrMm520QjEIfEwzVyg/pjlpghcYc1xQC6u0LYTR+CplHZLELJch3NBR+ 3c098rBsQJmzB9Ru/QSVefdV2NWx0dV8UVJzqlWA9maGKXMir9rHxL5Ruym8XQOCQnwV tZEvq5Z+M4lMYjgaiMDaCGdyjxLGKUMLU2PNFkFPKjL+1GDx6gsKu8yT/vVh3GVAuM6e 8/Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hm+ioeOE; 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 k11si40255755pgh.132.2018.11.20.20.15.10; Tue, 20 Nov 2018 20:15:11 -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=hm+ioeOE; 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 S1727450AbeKUOrt (ORCPT + 32 others); Wed, 21 Nov 2018 09:47:49 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:35688 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727325AbeKUOrt (ORCPT ); Wed, 21 Nov 2018 09:47:49 -0500 Received: by mail-pl1-f194.google.com with SMTP id v1-v6so3510532plo.2 for ; Tue, 20 Nov 2018 20:15:07 -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=YZE1AyeTPRRnquAdnDl25l1LOkW//go+oKzyIjbXwF4=; b=hm+ioeOEZqzXAkSAoJMLslosWiNM54cQ6z/99LjRB6gDyt3LOjzktYLZO5RXxSKL/v r9KZIEtuZUWks7oCnw7K+G7z+eC/uPgrKjWw4BAQeQxLvc1l88sNWMS03SektvPUNF5I bSFBmA+j56zv/dEJYw0u4BFLi9Sxo03mZZoDY= 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=YZE1AyeTPRRnquAdnDl25l1LOkW//go+oKzyIjbXwF4=; b=C9UPeTYQkI05/VU0Vo1WVMjCNnq2aq6U/QCSlhSP/JZnt3VaIJfx3gNyiNzUxLRMxI VKAeuabWmftwKY2xy+q/t8+VclLv5eaQTstJHIcNu8RgRpUsUY7S3Mke0DnfUvcpnkzF WCR2i65B9onTROtEzfepOxb4r/Du3Xl6Uc3SW5GvpagiyUI3uKcqUvQPHVwlU6H4oKA2 dB+COzeB32P7BAbkxehtspH6Ke7QkpjEMECE1q/PISA6YjTiESgEvoEJecTBkxhKLdH3 tjMQs23xu4YWW/K6hRmoWjKm9ppkXehSiTRC9ikt3QKucq/NJ2fGhyicdmRsfsVZ34xs 8s2A== X-Gm-Message-State: AGRZ1gJOwAOBsFgPj8nvLrPJBvXz4eD7TqQ06L3/k/WKRQVF/YNTSfUL ulAAHZB8qQ46Fzs7j2vIo9nTjQ== X-Received: by 2002:a62:a511:: with SMTP id v17-v6mr5143960pfm.18.1542773707402; Tue, 20 Nov 2018 20:15:07 -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 v124-v6sm10818712pfb.182.2018.11.20.20.15.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Nov 2018 20:15:06 -0800 (PST) From: Firoz Khan To: linux-parisc@vger.kernel.org, "James E . J . Bottomley" , Helge Deller , Geert Uytterhoeven , 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 v8 2/6] parisc: add __NR_syscalls along with __NR_Linux_syscalls Date: Wed, 21 Nov 2018 09:44:26 +0530 Message-Id: <1542773670-25460-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542773670-25460-1-git-send-email-firoz.khan@linaro.org> References: <1542773670-25460-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_Linux_syscalls macro holds the number of system call exist in parisc architecture. We have to change the value of __NR_Linux_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- _Linux_syscalls value. 1. Update __NR_Linux_syscalls in asm/unistd.h manually by counting the no.of system calls. No need to update __NR- _Linux_syscalls 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_Linux_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_Linux_syscalls asm/unistd.h. The macro __NR_sys- calls 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 Acked-by: Helge Deller --- arch/parisc/include/asm/unistd.h | 2 ++ arch/parisc/include/uapi/asm/unistd.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h index fd1013f..c2c2afb 100644 --- a/arch/parisc/include/asm/unistd.h +++ b/arch/parisc/include/asm/unistd.h @@ -4,6 +4,8 @@ #include +#define __NR_Linux_syscalls __NR_syscalls + #ifndef __ASSEMBLY__ #define SYS_ify(syscall_name) __NR_##syscall_name diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h index bb52e12..53cc748 100644 --- a/arch/parisc/include/uapi/asm/unistd.h +++ b/arch/parisc/include/uapi/asm/unistd.h @@ -366,8 +366,10 @@ #define __NR_statx (__NR_Linux + 349) #define __NR_io_pgetevents (__NR_Linux + 350) -#define __NR_Linux_syscalls (__NR_io_pgetevents + 1) +#ifdef __KERNEL__ +#define __NR_syscalls 351 +#endif -#define LINUX_GATEWAY_ADDR 0x100 +#define LINUX_GATEWAY_ADDR 0x100 #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */