path: root/arch/sh/include
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 10:23:12 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 10:23:12 -0800
commit507413a5f88a2240b2c19cb4318166614e2349d9 (patch)
tree1e1324e6e335ca3c4ff7f21fec9a68ccd2670654 /arch/sh/include
parentMerge tag 'please-pull-y2038prep' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux (diff)
parentsh: generate uapi header and syscall table header files (diff)
Merge tag 'asm-generic-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull arch/sh syscall table scripting from Arnd Bergmann: "I worked with Firoz Khan to change all architectures to have their system call tables (syscall.S and asm/unistd.h) generated by a script from a more readable input file the same way that we already had on x86, s390 and arm. I offered to take those conversions through the asm-generic tree that did not get picked up by the architecture maintainers, and fortunately all but one have now been accepted into arch maintainer trees, so this branch only contains the conversion for arch/sh/, with permission from Rich. The conversion does not include the old 64-bit sh5 architecture, which has never shipped and not even compiled in a long time. The table in include/uapi/asm/unistd.h is also not included here, as Firoz is still working on that one, it will have to wait for the next following merge window, hopefully together with the addition of the 64-bit time_t system calls for the y2038 work that led to the system call table rework" * tag 'asm-generic-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: sh: generate uapi header and syscall table header files sh: add system call table generation support sh: add __NR_syscalls along with NR_syscalls
Diffstat (limited to 'arch/sh/include')
5 files changed, 10 insertions, 2 deletions
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index 6a5609a55965..b15caf34813a 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -1,3 +1,4 @@
+generated-y += syscall_table.h
generic-y += compat.h
generic-y += current.h
generic-y += delay.h
diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h
index a99234b61051..a97f93ca3bd7 100644
--- a/arch/sh/include/asm/unistd.h
+++ b/arch/sh/include/asm/unistd.h
@@ -5,6 +5,8 @@
# include <asm/unistd_64.h>
# endif
+#define NR_syscalls __NR_syscalls
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild
index ba4d39cb321d..a55e317c1ef2 100644
--- a/arch/sh/include/uapi/asm/Kbuild
+++ b/arch/sh/include/uapi/asm/Kbuild
@@ -1,6 +1,7 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+generated-y += unistd_32.h
generic-y += bitsperlong.h
generic-y += bpf_perf_event.h
generic-y += errno.h
diff --git a/arch/sh/include/uapi/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h
index 58f04cf3d1d9..31c85aa251ab 100644
--- a/arch/sh/include/uapi/asm/unistd_32.h
+++ b/arch/sh/include/uapi/asm/unistd_32.h
@@ -396,6 +396,8 @@
#define __NR_preadv2 381
#define __NR_pwritev2 382
-#define NR_syscalls 383
+#ifdef __KERNEL__
+#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 6f809a53aa24..75da54851f02 100644
--- a/arch/sh/include/uapi/asm/unistd_64.h
+++ b/arch/sh/include/uapi/asm/unistd_64.h
@@ -416,6 +416,8 @@
#define __NR_preadv2 392
#define __NR_pwritev2 393
-#define NR_syscalls 394
+#ifdef __KERNEL__
+#define __NR_syscalls 394
#endif /* __ASM_SH_UNISTD_64_H */