linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Firoz Khan <firoz.khan@linaro.org>
To: linux-sh@vger.kernel.org,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Kate Stewart <kstewart@linuxfoundation.org>
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	[thread overview]
Message-ID: <1533793005-4525-2-git-send-email-firoz.khan@linaro.org> (raw)
In-Reply-To: <1533793005-4525-1-git-send-email-firoz.khan@linaro.org>

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 <firoz.khan@linaro.org>
---
 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
-- 
1.9.1


  reply	other threads:[~2018-08-09  5:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09  5:36 [PATCH 0/3] System call table generation support Firoz Khan
2018-08-09  5:36 ` Firoz Khan [this message]
2018-08-09 12:58   ` [PATCH 1/3] sh: Rename NR_syscalls macro to __NR_syscalls kbuild test robot
2018-08-10 19:38     ` Steven Rostedt
2018-09-18  9:06       ` Firoz Khan
2018-08-09  5:36 ` [PATCH 2/3] sh: Added system call table generation support Firoz Khan
2018-08-09  5:36 ` [PATCH 3/3] sh: uapi header and system call table file generation Firoz Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533793005-4525-2-git-send-email-firoz.khan@linaro.org \
    --to=firoz.khan@linaro.org \
    --cc=arnd@arndb.de \
    --cc=dalias@libc.org \
    --cc=deepa.kernel@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=mingo@redhat.com \
    --cc=pombredanne@nexb.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=y2038@lists.linaro.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).