From patchwork Thu Aug 9 05:36:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 10560931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2482114C0 for ; Thu, 9 Aug 2018 05:37:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 139771FF13 for ; Thu, 9 Aug 2018 05:37:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 079E82A630; Thu, 9 Aug 2018 05:37:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 993AE1FF13 for ; Thu, 9 Aug 2018 05:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728209AbeHIIA0 (ORCPT ); Thu, 9 Aug 2018 04:00:26 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42700 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728834AbeHIIA0 (ORCPT ); Thu, 9 Aug 2018 04:00:26 -0400 Received: by mail-pf1-f196.google.com with SMTP id l9-v6so2271144pff.9 for ; Wed, 08 Aug 2018 22:37:22 -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=IUVZraVYSlqqIRwCZ0bLejzyYZFNdfTPMp8RLGQyfZo=; b=WwIIvoKXC0SFnvJe3FUyuZQaOX/Zd15nPAEG6QJXTsqL+Dq3VTUAZKDwEFr4FF+dcd iCcbA/SsqiIx5WJ+jTVM85EqmXsZ1tE8X3N41E0TNPLAA4UbhOY88qV6z9fMUHasOTj6 c3XsBdeGhIMdkIDnD0yJXbaECmvx+Tt+W4f4Q= 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=IUVZraVYSlqqIRwCZ0bLejzyYZFNdfTPMp8RLGQyfZo=; b=nkdrBh7u2/3FaEnWA1h+n7UEAU7FFEC5kYgeGrWFcMyenqhh3lzjAmO4fsiJdGgTks lvRhW9PJ2Xja3oEcj+tQzKg3a7JX6jij844EBHfXXAFNVbJhpZbFWyLMy25EebWUk73n EtyeiG+8RX9JHCK3wF44WKVJ/ItL9UUHLnT0JS7LqCrNm5gWm1+BZ87/fGN3Qg8Hd50D F0/U9K9YVaOGd09UIY9hetnbF53sGGlc6S+L3r6MJThJVf4o9YhXJQLc+t/gOArg/vWJ CO+1melNgg+xfbU46gPLHIQHhQqI28mDL5w0uSma+3Xn9kZOquyN69YXZU2PPHavM0eM HLbw== X-Gm-Message-State: AOUpUlH2LIek6AV1k9qOO38aObL0hnhHfsAS0upzCDHDNzSBAUnEluQp 0cmrzc/f+MZWBrspB3c5eUWnWqud+g0= X-Google-Smtp-Source: AA+uWPzaUy7/v1YbBwN7N4RlMSxb8dT7KCWKAYTo2V2EL0ugiYY0caNw/GDbIeOa+jWc4Pgtm3XxUA== X-Received: by 2002:a63:121a:: with SMTP id h26-v6mr718889pgl.316.1533793042255; Wed, 08 Aug 2018 22:37:22 -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 r11-v6sm5826229pgn.62.2018.08.08.22.37.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Aug 2018 22:37:21 -0700 (PDT) From: Firoz Khan To: linux-sh@vger.kernel.org, Yoshinori Sato , Rich Felker , Steven Rostedt , Ingo Molnar , 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] sh: Rename NR_syscalls macro to __NR_syscalls Date: Thu, 9 Aug 2018 11:06:43 +0530 Message-Id: <1533793005-4525-2-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533793005-4525-1-git-send-email-firoz.khan@linaro.org> References: <1533793005-4525-1-git-send-email-firoz.khan@linaro.org> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP NR_syscalls macro holds the number of system call exist in SH arch- itecture. 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 call information, which will be used to update NR_syscalls. 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/sh/include/asm/ftrace.h | 2 +- arch/sh/include/uapi/asm/unistd_32.h | 2 +- arch/sh/include/uapi/asm/unistd_64.h | 2 +- arch/sh/kernel/cpu/sh5/entry.S | 2 +- arch/sh/kernel/entry-common.S | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/sh/include/asm/ftrace.h b/arch/sh/include/asm/ftrace.h index b1c1dc0..968a9bb 100644 --- a/arch/sh/include/asm/ftrace.h +++ b/arch/sh/include/asm/ftrace.h @@ -5,7 +5,7 @@ #ifdef CONFIG_FUNCTION_TRACER #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ -#define FTRACE_SYSCALL_MAX NR_syscalls +#define FTRACE_SYSCALL_MAX __NR_syscalls #ifndef __ASSEMBLY__ extern void mcount(void); diff --git a/arch/sh/include/uapi/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h index 58f04cf..2c4f087 100644 --- a/arch/sh/include/uapi/asm/unistd_32.h +++ b/arch/sh/include/uapi/asm/unistd_32.h @@ -396,6 +396,6 @@ #define __NR_preadv2 381 #define __NR_pwritev2 382 -#define NR_syscalls 383 +#define __NR_syscalls 383 #endif /* __ASM_SH_UNISTD_32_H */ diff --git a/arch/sh/include/uapi/asm/unistd_64.h b/arch/sh/include/uapi/asm/unistd_64.h index 6f809a5..9e6e8cb 100644 --- a/arch/sh/include/uapi/asm/unistd_64.h +++ b/arch/sh/include/uapi/asm/unistd_64.h @@ -416,6 +416,6 @@ #define __NR_preadv2 392 #define __NR_pwritev2 393 -#define NR_syscalls 394 +#define __NR_syscalls 394 #endif /* __ASM_SH_UNISTD_64_H */ diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S index 0c8d037..d2ff022 100644 --- a/arch/sh/kernel/cpu/sh5/entry.S +++ b/arch/sh/kernel/cpu/sh5/entry.S @@ -1192,7 +1192,7 @@ system_call: STI() pta syscall_allowed, tr0 - movi NR_syscalls - 1, r4 /* Last valid */ + movi __NR_syscalls - 1, r4 /* Last valid */ bgeu/l r4, r5, tr0 syscall_bad: diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index 28cc612..80ea3c4 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S @@ -396,7 +396,7 @@ syscall_exit: #if !defined(CONFIG_CPU_SH2) 1: .long TRA #endif -2: .long NR_syscalls +2: .long __NR_syscalls 3: .long sys_call_table 7: .long do_syscall_trace_enter 8: .long do_syscall_trace_leave