From patchwork Thu Sep 27 14:24:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 147720 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2077000lji; Thu, 27 Sep 2018 07:25:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV6242A5OmAT5VnWZ/ygbEoZp2n8UEunmPBb2XZkmShAT7bK6pOD5fAt7WEr3IUtCnFM4J1Ds X-Received: by 2002:a63:dd49:: with SMTP id g9-v6mr10385745pgj.356.1538058316539; Thu, 27 Sep 2018 07:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538058316; cv=none; d=google.com; s=arc-20160816; b=lDDkf6PIrG0ZAE5qxOf1nbe0kgsLL1tt4Hv/Rg/ZolfnhRMM/jqXvXGFNdK989VwBY j/0w1lwyRqgRQzMzCZl3LIHKdbbwaiXqFFfhJqiQnb2UG45JrDa6jzTlpwSuLSOOwCrj +b00Q/bIxgswxcUfigoIvccoSgHHzNCswybjcowFsEyP9uy9fhvMNdxMlNo5GI+bLl8r w+579feyX7nSWy14hYdts/mLTOwvSazLYH4cfpCKOZVYPO/62he7Hl32tJUOa295Jw9J zDoq6yprJ8QiQx2h05ZdstwED+8cbeI1q05YeR41WnR4fv+Xtf6YU9HsCsaU08Fz+v7s fftg== 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=p9t4d2U76M7pVedCN85mCQCPYHIVwNmeA4otNDy9pl4=; b=O2LWPW1wPyh1ZCNSkeRWlhw4iA5KFEXGux09MTRvpH/ponct5mCKdjTcKdQ4QIXSxs 1kkmpimv0z/BFDXMSLfptmLinbg/3PAX/510r/N3Y629KSqyX01ZzlBZNQsf5IiCrDyR sAUPcpZPPY1dKe02YNVk0YLc6zd9zO/7TVYUnqtT54hYzBQnomLqopbuqwI1VcKaxXaT oowVTOLwgWa39yWnshrYyuurweIpcwo/MnvLCmPrS03hKactDdfbtpCDw7LGqFsoFKyx awTdzNDS0p45yJKC8UZxAiKj8eiVtwpxtOgoPSW2HNGGXfQ4klMkf06J5LvUeCM59D+d a1Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rc8t9lme; 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 x23-v6si2028810plr.57.2018.09.27.07.25.15; Thu, 27 Sep 2018 07:25:16 -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=Rc8t9lme; 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 S1728178AbeI0Unp (ORCPT + 32 others); Thu, 27 Sep 2018 16:43:45 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40536 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbeI0Uno (ORCPT ); Thu, 27 Sep 2018 16:43:44 -0400 Received: by mail-pg1-f193.google.com with SMTP id n31-v6so2087587pgm.7 for ; Thu, 27 Sep 2018 07:25:13 -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=p9t4d2U76M7pVedCN85mCQCPYHIVwNmeA4otNDy9pl4=; b=Rc8t9lmekcb9TYf9AhJ2vtFn+IsrkMaqDsPXR+06TM2j9yTko9LvoIAhPG3b6rSaIn KyHzSkcq6IO4LpEvBfc9YKYnXkzJ/bG6vl9pZ14w+HD3HEipgSPUaaoLrSN0RwI9ukrf +nb5Uj0wFiPe6bo9FGJ23cPWpVpq49Ha/ASh8= 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=p9t4d2U76M7pVedCN85mCQCPYHIVwNmeA4otNDy9pl4=; b=AAUCD3vPnGELI2o0IjERTowPgPqOb/JBavwB8B/SQ9gnE7SkpYvTre3zsd23SNdcbW pw5yNZpWdv4Sbi5b3+LTNRp9E87lvDv9Oe+YYk38E/8V6Y3AvvRnK93bqzfb7zbGRyyd YqJnvfSxFBscMQqemao3v+C4L7xbrCAi90ohjyQFUA0Za18ATDrSF62za2ZEqLFy2g5l eTcPgt7rhtbZdVrQbOnlDEE4Bbx0IL/G+GIasOY0IIlKgoWWcJELCB2+Ptq/0gYQgLfs gIxX0cm0AbhamopbAa2cl9bHAMYSn/1/E5Wo6PaiDRllzQO6ioQjlOej6WNjSUdlA52A j8CA== X-Gm-Message-State: ABuFfohfECXKyJBjjZCVT16jIt1vNXMAM3YyorrS6tqn+DLyiULQK5jg tfhZXCg7BsRJbJP0scOiHYofhw== X-Received: by 2002:a63:6746:: with SMTP id b67-v6mr10616283pgc.310.1538058313394; Thu, 27 Sep 2018 07:25:13 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.domain.name ([106.51.105.186]) by smtp.gmail.com with ESMTPSA id f81-v6sm9717421pfh.46.2018.09.27.07.25.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Sep 2018 07:25:12 -0700 (PDT) From: Firoz Khan To: linux-parisc@vger.kernel.org, "James E . J . Bottomley" , Helge Deller , 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 v2 2/5] parisc: add __NR_Linux_syscalls macro with __NR_syscalls Date: Thu, 27 Sep 2018 19:54:24 +0530 Message-Id: <1538058267-3765-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538058267-3765-1-git-send-email-firoz.khan@linaro.org> References: <1538058267-3765-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. This macro is currently the part of uapi/asm/unistd.h file. 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 number of system call inform- ation. So we have two option to update __NR_Linux_syscalls value. 1. Update __NR_Linux_syscalls in uapi/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 an 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 gener- ated file. In this case we don't need to explicitly update __NR_Linux_syscalls in asm/unistd.h file. The 2nd option will be the recommended one. For that, I moved the __NR_Linux_syscalls macro from uapi/asm/unistd.h to asm/ unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_sys- calls 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/parisc/include/uapi/asm/unistd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 1.9.1 diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h index bb52e12..255c62a 100644 --- a/arch/parisc/include/uapi/asm/unistd.h +++ b/arch/parisc/include/uapi/asm/unistd.h @@ -366,7 +366,11 @@ #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 __NR_Linux_syscalls __NR_syscalls #define LINUX_GATEWAY_ADDR 0x100