linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] System call table generation support
@ 2018-10-08  5:16 Firoz Khan
  2018-10-08  5:16 ` Firoz Khan
                   ` (6 more replies)
  0 siblings, 7 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: linux-arch, arnd, y2038, linux-kernel, marcin.juszkiewicz,
	firoz.khan, deepa.kernel

The purpose of this patch series is:
1. We can easily add/modify/delete system call by changing entry 
in syscall.tbl file. No need to manually edit many files.

2. It is easy to unify the system call implementation across all 
the architectures. 

The system call tables are in different format in all architecture 
and it will be difficult to manually add or modify the system calls
in the respective files manually. To make it easy by keeping a script 
and which'll generate the header file and syscall table file so this 
change will unify them across all architectures.

syscall.tbl contains the list of available system calls along with 
system call number and corresponding entry point. Add a new system 
call in this architecture will be possible by adding new entry in 
the syscall.tbl file.

Adding a new table entry consisting of:
        - System call number.
        - ABI.
        - System call name.
        - Entry point name.
        - Compat entry name, if required.

ARM, s390 and x86 architecuture does exist the similar support. I 
leverage their implementation to come up with a generic solution.

I have done the same support for work for alpha, microblaze, sparc,
m68k, mips, powerpc, sh, sparc, and xtensa. But I started sending 
the patch for one architecuture for review. Below mentioned git
repository contains more details.
Git repo:- https://github.com/frzkhn/system_call_table_generator/

Added an ignore entry for nfsservctl in script/checksyscalls.sh.
Wired up rseq system call.

Finally, this is the ground work for solving the Y2038 issue. We 
need to add/change two dozen of system calls to solve Y2038 issue. 
So this patch series will help to easily modify from existing 
system call to Y2038 compatible system calls.

Firoz Khan (6):
  parisc: move __IGNORE* entries to non uapi header
  parisc: add __NR_Linux_syscalls along with __NR_syscalls
  parisc: add system call table generation support
  parisc: uapi header and system call table file generation
  parisc: wire up rseq system call
  parisc: syscalls: Ignore nfsservctl for other architectures

 arch/parisc/Makefile                      |   4 +
 arch/parisc/include/asm/Kbuild            |   3 +
 arch/parisc/include/asm/unistd.h          |   8 +
 arch/parisc/include/uapi/asm/Kbuild       |   2 +
 arch/parisc/include/uapi/asm/unistd.h     | 382 +------------------------
 arch/parisc/kernel/syscall.S              |  12 +-
 arch/parisc/kernel/syscall_table.S        | 459 ------------------------------
 arch/parisc/kernel/syscall_table_32.S     |  13 +
 arch/parisc/kernel/syscall_table_64.S     |  20 ++
 arch/parisc/kernel/syscalls/Makefile      |  55 ++++
 arch/parisc/kernel/syscalls/syscall.tbl   | 353 +++++++++++++++++++++++
 arch/parisc/kernel/syscalls/syscallhdr.sh |  35 +++
 arch/parisc/kernel/syscalls/syscalltbl.sh |  41 +++
 scripts/checksyscalls.sh                  |   1 +
 14 files changed, 545 insertions(+), 843 deletions(-)
 delete mode 100644 arch/parisc/kernel/syscall_table.S
 create mode 100644 arch/parisc/kernel/syscall_table_32.S
 create mode 100644 arch/parisc/kernel/syscall_table_64.S
 create mode 100644 arch/parisc/kernel/syscalls/Makefile
 create mode 100644 arch/parisc/kernel/syscalls/syscall.tbl
 create mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh
 create mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh

-- 
1.9.1

_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v3 0/6] System call table generation support
  2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
@ 2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16 ` [PATCH v3 1/6] parisc: move __IGNORE* entries to non uapi header Firoz Khan
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

The purpose of this patch series is:
1. We can easily add/modify/delete system call by changing entry 
in syscall.tbl file. No need to manually edit many files.

2. It is easy to unify the system call implementation across all 
the architectures. 

The system call tables are in different format in all architecture 
and it will be difficult to manually add or modify the system calls
in the respective files manually. To make it easy by keeping a script 
and which'll generate the header file and syscall table file so this 
change will unify them across all architectures.

syscall.tbl contains the list of available system calls along with 
system call number and corresponding entry point. Add a new system 
call in this architecture will be possible by adding new entry in 
the syscall.tbl file.

Adding a new table entry consisting of:
        - System call number.
        - ABI.
        - System call name.
        - Entry point name.
        - Compat entry name, if required.

ARM, s390 and x86 architecuture does exist the similar support. I 
leverage their implementation to come up with a generic solution.

I have done the same support for work for alpha, microblaze, sparc,
m68k, mips, powerpc, sh, sparc, and xtensa. But I started sending 
the patch for one architecuture for review. Below mentioned git
repository contains more details.
Git repo:- https://github.com/frzkhn/system_call_table_generator/

Added an ignore entry for nfsservctl in script/checksyscalls.sh.
Wired up rseq system call.

Finally, this is the ground work for solving the Y2038 issue. We 
need to add/change two dozen of system calls to solve Y2038 issue. 
So this patch series will help to easily modify from existing 
system call to Y2038 compatible system calls.

Firoz Khan (6):
  parisc: move __IGNORE* entries to non uapi header
  parisc: add __NR_Linux_syscalls along with __NR_syscalls
  parisc: add system call table generation support
  parisc: uapi header and system call table file generation
  parisc: wire up rseq system call
  parisc: syscalls: Ignore nfsservctl for other architectures

 arch/parisc/Makefile                      |   4 +
 arch/parisc/include/asm/Kbuild            |   3 +
 arch/parisc/include/asm/unistd.h          |   8 +
 arch/parisc/include/uapi/asm/Kbuild       |   2 +
 arch/parisc/include/uapi/asm/unistd.h     | 382 +------------------------
 arch/parisc/kernel/syscall.S              |  12 +-
 arch/parisc/kernel/syscall_table.S        | 459 ------------------------------
 arch/parisc/kernel/syscall_table_32.S     |  13 +
 arch/parisc/kernel/syscall_table_64.S     |  20 ++
 arch/parisc/kernel/syscalls/Makefile      |  55 ++++
 arch/parisc/kernel/syscalls/syscall.tbl   | 353 +++++++++++++++++++++++
 arch/parisc/kernel/syscalls/syscallhdr.sh |  35 +++
 arch/parisc/kernel/syscalls/syscalltbl.sh |  41 +++
 scripts/checksyscalls.sh                  |   1 +
 14 files changed, 545 insertions(+), 843 deletions(-)
 delete mode 100644 arch/parisc/kernel/syscall_table.S
 create mode 100644 arch/parisc/kernel/syscall_table_32.S
 create mode 100644 arch/parisc/kernel/syscall_table_64.S
 create mode 100644 arch/parisc/kernel/syscalls/Makefile
 create mode 100644 arch/parisc/kernel/syscalls/syscall.tbl
 create mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh
 create mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh

-- 
1.9.1

^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v3 1/6] parisc: move __IGNORE* entries to non uapi header
  2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
  2018-10-08  5:16 ` Firoz Khan
@ 2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
  2018-10-08  5:16 ` [PATCH v3 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls Firoz Khan
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

All the __IGNORE* entries are resides in the uapi header
file move to non uapi header asm/unistd.h. Basically it
is not used by any user space applications.

It is correct to keep __IGNORE* entry in non uapi header
asm/unistd.h while uapi/asm/unistd.h must hold information
only useful for user space applications.

One of the patch in this patch series will generate uapi
headers that should present in the uapi header file. And
some of the information which directly used by the user
space application also need to be present in uapi file.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/include/asm/unistd.h      | 6 ++++++
 arch/parisc/include/uapi/asm/unistd.h | 7 -------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index 3d507d0..93fd9f6 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -8,6 +8,12 @@
 
 #define SYS_ify(syscall_name)   __NR_##syscall_name
 
+#define __IGNORE_select                /* newselect */
+#define __IGNORE_fadvise64             /* fadvise64_64 */
+#define __IGNORE_pkey_mprotect
+#define __IGNORE_pkey_alloc
+#define __IGNORE_pkey_free
+
 #ifndef ASM_LINE_SEP
 # define ASM_LINE_SEP ;
 #endif
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
index dc77c5a..bb52e12 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -368,13 +368,6 @@
 
 #define __NR_Linux_syscalls	(__NR_io_pgetevents + 1)
 
-
-#define __IGNORE_select		/* newselect */
-#define __IGNORE_fadvise64	/* fadvise64_64 */
-#define __IGNORE_pkey_mprotect
-#define __IGNORE_pkey_alloc
-#define __IGNORE_pkey_free
-
 #define LINUX_GATEWAY_ADDR      0x100
 
 #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 1/6] parisc: move __IGNORE* entries to non uapi header
  2018-10-08  5:16 ` [PATCH v3 1/6] parisc: move __IGNORE* entries to non uapi header Firoz Khan
@ 2018-10-08  5:16   ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

All the __IGNORE* entries are resides in the uapi header
file move to non uapi header asm/unistd.h. Basically it
is not used by any user space applications.

It is correct to keep __IGNORE* entry in non uapi header
asm/unistd.h while uapi/asm/unistd.h must hold information
only useful for user space applications.

One of the patch in this patch series will generate uapi
headers that should present in the uapi header file. And
some of the information which directly used by the user
space application also need to be present in uapi file.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/include/asm/unistd.h      | 6 ++++++
 arch/parisc/include/uapi/asm/unistd.h | 7 -------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index 3d507d0..93fd9f6 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -8,6 +8,12 @@
 
 #define SYS_ify(syscall_name)   __NR_##syscall_name
 
+#define __IGNORE_select                /* newselect */
+#define __IGNORE_fadvise64             /* fadvise64_64 */
+#define __IGNORE_pkey_mprotect
+#define __IGNORE_pkey_alloc
+#define __IGNORE_pkey_free
+
 #ifndef ASM_LINE_SEP
 # define ASM_LINE_SEP ;
 #endif
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
index dc77c5a..bb52e12 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -368,13 +368,6 @@
 
 #define __NR_Linux_syscalls	(__NR_io_pgetevents + 1)
 
-
-#define __IGNORE_select		/* newselect */
-#define __IGNORE_fadvise64	/* fadvise64_64 */
-#define __IGNORE_pkey_mprotect
-#define __IGNORE_pkey_alloc
-#define __IGNORE_pkey_free
-
 #define LINUX_GATEWAY_ADDR      0x100
 
 #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls
  2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
  2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16 ` [PATCH v3 1/6] parisc: move __IGNORE* entries to non uapi header Firoz Khan
@ 2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
  2018-10-08  5:16 ` [PATCH v3 3/6] parisc: add system call table generation support Firoz Khan
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

__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 <firoz.khan@linaro.org>
---
 arch/parisc/include/asm/unistd.h      | 2 ++
 arch/parisc/include/uapi/asm/unistd.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index 93fd9f6..d30fdbcb 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -4,6 +4,8 @@
 
 #include <uapi/asm/unistd.h>
 
+#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..f10d065 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -366,7 +366,9 @@
 #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
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls
  2018-10-08  5:16 ` [PATCH v3 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls Firoz Khan
@ 2018-10-08  5:16   ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

__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 <firoz.khan@linaro.org>
---
 arch/parisc/include/asm/unistd.h      | 2 ++
 arch/parisc/include/uapi/asm/unistd.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h
index 93fd9f6..d30fdbcb 100644
--- a/arch/parisc/include/asm/unistd.h
+++ b/arch/parisc/include/asm/unistd.h
@@ -4,6 +4,8 @@
 
 #include <uapi/asm/unistd.h>
 
+#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..f10d065 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -366,7 +366,9 @@
 #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
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
                   ` (2 preceding siblings ...)
  2018-10-08  5:16 ` [PATCH v3 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls Firoz Khan
@ 2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
  2018-10-08  7:33   ` Firoz Khan
  2018-10-08  5:16 ` [PATCH v3 4/6] parisc: uapi header and system call table file generation Firoz Khan
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

The system call tables are in different format in all
architecture and it will be difficult to manually add or
modify the system calls in the respective files. To make
it easy by keeping a script and which'll generate the
header file and syscall table file so this change will
unify them across all architectures.

The system call table generation script is added in
syscalls directory which contain the script to generate
both uapi header file system call table generation file
and syscall.tbl file which'll be the input for the
scripts.

syscall.tbl contains the list of available system calls
along with system call number and corresponding entry point.
Add a new system call in this architecture will be possible
by adding new entry in the syscall.tbl file.

Adding a new table entry consisting of:
        - System call number.
        - ABI.
        - System call name.
        - Entry point name.
	- Compat entry name, if required.

syscallhdr.sh and syscalltbl.sh will generate uapi header-
unistd_32/64.h and syscall_table_32/64/c32.h files respect-
ively. File syscall_table_32/64/c32.h is included by sys-
call.S - the real system call table. Both .sh files will
parse the content syscall.tbl to generate the header and
table files.

ARM, s390 and x86 architecuture does have the similar support.
I leverage their implementation to come up with a generic
solution.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/kernel/syscalls/Makefile      |  55 +++++
 arch/parisc/kernel/syscalls/syscall.tbl   | 352 ++++++++++++++++++++++++++++++
 arch/parisc/kernel/syscalls/syscallhdr.sh |  35 +++
 arch/parisc/kernel/syscalls/syscalltbl.sh |  41 ++++
 4 files changed, 483 insertions(+)
 create mode 100644 arch/parisc/kernel/syscalls/Makefile
 create mode 100644 arch/parisc/kernel/syscalls/syscall.tbl
 create mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh
 create mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh

diff --git a/arch/parisc/kernel/syscalls/Makefile b/arch/parisc/kernel/syscalls/Makefile
new file mode 100644
index 0000000..e4c9c63
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/Makefile
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: GPL-2.0
+kapi := arch/$(SRCARCH)/include/generated/asm
+uapi := arch/$(SRCARCH)/include/generated/uapi/asm
+
+_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
+	  $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
+
+syscall := $(srctree)/$(src)/syscall.tbl
+syshdr := $(srctree)/$(src)/syscallhdr.sh
+systbl := $(srctree)/$(src)/syscalltbl.sh
+
+quiet_cmd_syshdr = SYSHDR  $@
+      cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'  \
+		   '$(syshdr_abi_$(basetarget))'          \
+		   '$(syshdr_pfx_$(basetarget))'          \
+		   '$(syshdr_offset_$(basetarget))'
+
+quiet_cmd_systbl = SYSTBL  $@
+      cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'  \
+                   '$(systbl_abi_$(basetarget))'          \
+		   '$(systbl_offset_$(basetarget))'
+
+syshdr_abi_unistd_32 := common,32
+syshdr_offset_unistd_32 := __NR_Linux
+$(uapi)/unistd_32.h: $(syscall) $(syshdr)
+	$(call if_changed,syshdr)
+
+syshdr_abi_unistd_64 := common,64
+syshdr_offset_unistd_64 := __NR_Linux
+$(uapi)/unistd_64.h: $(syscall) $(syshdr)
+	$(call if_changed,syshdr)
+
+systbl_abi_syscall_table_32 := common,32
+$(kapi)/syscall_table_32.h: $(syscall) $(systbl)
+	$(call if_changed,systbl)
+
+systbl_abi_syscall_table_64 := common,64
+$(kapi)/syscall_table_64.h: $(syscall) $(systbl)
+	$(call if_changed,systbl)
+
+systbl_abi_syscall_table_c32 := common,64
+$(kapi)/syscall_table_c32.h: $(syscall) $(systbl)
+	$(call if_changed,systbl)
+
+uapisyshdr-y			+= unistd_32.h unistd_64.h
+kapisyshdr-y			+= syscall_table_32.h     \
+                                   syscall_table_64.h     \
+                                   syscall_table_c32.h
+
+targets	+= $(uapisyshdr-y) $(kapisyshdr-y)
+
+PHONY += all
+all: $(addprefix $(uapi)/,$(uapisyshdr-y))
+all: $(addprefix $(kapi)/,$(kapisyshdr-y))
+	@:
diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
new file mode 100644
index 0000000..4e85293
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@ -0,0 +1,352 @@
+# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+#
+# system call numbers and entry vectors for parisc
+#
+# The format is:
+# <number> <abi> <name> <entry point> <compat entry point>
+#
+# The <abi> can be common, 64, or 32 for this file.
+#
+0       common  restart_syscall                 sys_restart_syscall
+1       common  exit                            sys_exit
+2       common  fork                            sys_fork_wrapper
+3       common  read                            sys_read
+4       common  write                           sys_write
+5       common  open                            sys_open                        compat_sys_open
+6       common  close                           sys_close
+7       common  waitpid                         sys_waitpid
+8       common  creat                           sys_creat
+9       common  link                            sys_link
+10      common  unlink                          sys_unlink
+11      common  execve                          sys_execve                      compat_sys_execve
+12      common  chdir                           sys_chdir
+13      common  time                            sys_time                        compat_sys_time
+14      common  mknod                           sys_mknod
+15      common  chmod                           sys_chmod
+16      common  lchown                          sys_lchown
+17      common  socket                          sys_socket
+18      common  stat                            sys_newstat                     compat_sys_newstat
+19      common  lseek                           sys_lseek                       compat_sys_lseek
+20      common  getpid                          sys_getpid
+21      common  mount                           sys_mount                       compat_sys_mount
+22      common  bind                            sys_bind
+23      common  setuid                          sys_setuid
+24      common  getuid                          sys_getuid
+25      common  stime                           sys_stime                       compat_sys_stime
+26      common  ptrace                          sys_ptrace                      compat_sys_ptrace
+27      common  alarm                           sys_alarm
+28      common  fstat                           sys_newfstat                    compat_sys_newfstat
+29      common  pause                           sys_pause
+30      common  utime                           sys_utime                       compat_sys_utime
+31      common  connect                         sys_connect
+32      common  listen                          sys_listen
+33      common  access                          sys_access
+34      common  nice                            sys_nice
+35      common  accept                          sys_accept
+36      common  sync                            sys_sync
+37      common  kill                            sys_kill
+38      common  rename                          sys_rename
+39      common  mkdir                           sys_mkdir
+40      common  rmdir                           sys_rmdir
+41      common  dup                             sys_dup
+42      common  pipe                            sys_pipe
+43      common  times                           sys_times                       compat_sys_times
+44      common  getsockname                     sys_getsockname
+45      common  brk                             sys_brk
+46      common  setgid                          sys_setgid
+47      common  getgid                          sys_getgid
+48      common  signal                          sys_signal
+49      common  geteuid                         sys_geteuid
+50      common  getegid                         sys_getegid
+51      common  acct                            sys_acct
+52      common  umount2                         sys_umount
+53      common  getpeername                     sys_getpeername
+54      common  ioctl                           sys_ioctl                       compat_sys_ioctl
+55      common  fcntl                           sys_fcntl                       compat_sys_fcntl
+56      common  socketpair                      sys_socketpair
+57      common  setpgid                         sys_setpgid
+58      common  send                            sys_send
+59      common  uname                           sys_newuname
+60      common  umask                           sys_umask
+61      common  chroot                          sys_chroot
+62      common  ustat                           sys_ustat                       compat_sys_ustat
+63      common  dup2                            sys_dup2
+64      common  getppid                         sys_getppid
+65      common  getpgrp                         sys_getpgrp
+66      common  setsid                          sys_setsid
+67      common  pivot_root                      sys_pivot_root
+68      common  sgetmask                        sys_sgetmask                    sys32_unimplemented
+69      common  ssetmask                        sys_ssetmask                    sys32_unimplemented
+70      common  setreuid                        sys_setreuid
+71      common  setregid                        sys_setregid
+72      common  mincore                         sys_mincore
+73      common  sigpending                      sys_sigpending                  compat_sys_sigpending
+74      common  sethostname                     sys_sethostname
+75      common  setrlimit                       sys_setrlimit                   compat_sys_setrlimit
+76      common  getrlimit                       sys_getrlimit                   compat_sys_getrlimit
+77      common  getrusage                       sys_getrusage                   compat_sys_getrusage
+78      common  gettimeofday                    sys_gettimeofday                compat_sys_gettimeofday
+79      common  settimeofday                    sys_settimeofday                compat_sys_settimeofday
+80      common  getgroups                       sys_getgroups
+81      common  setgroups                       sys_setgroups
+82      common  sendto                          sys_sendto
+83      common  symlink                         sys_symlink
+84      common  lstat                           sys_newlstat                    compat_sys_newlstat
+85      common  readlink                        sys_readlink
+86      common  uselib                          sys_ni_syscall
+87      common  swapon                          sys_swapon
+88      common  reboot                          sys_reboot
+89      common  mmap2                           sys_mmap2
+90      common  mmap                            sys_mmap
+91      common  munmap                          sys_munmap
+92      common  truncate                        sys_truncate                    compat_sys_truncate
+93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
+94      common  fchmod                          sys_fchmod
+95      common  fchown                          sys_fchown
+96      common  getpriority                     sys_getpriority
+97      common  setpriority                     sys_setpriority
+98      common  recv                            sys_recv
+99      common  statfs                          sys_statfs                      compat_sys_statfs
+100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
+101     common  stat64                          sys_stat64
+103     common  syslog                          sys_syslog
+104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
+105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
+106     common  capget                          sys_capget
+107     common  capset                          sys_capset
+108     32      pread64                         parisc_pread64
+108     64      pread64                         sys_pread64                     parisc_pread64
+109     32      pwrite64                        parisc_pwrite64
+109     64      pwrite64                        sys_pwrite64                    parisc_pwrite64
+110     common  getcwd                          sys_getcwd
+111     common  vhangup                         sys_vhangup
+112     common  fstat64                         sys_fstat64
+113     common  vfork                           sys_vfork_wrapper
+114     common  wait4                           sys_wait4                       compat_sys_wait4
+115     common  swapoff                         sys_swapoff
+116     common  sysinfo                         sys_sysinfo                     compat_sys_sysinfo
+117     common  shutdown                        sys_shutdown
+118     common  fsync                           sys_fsync
+119     common  madvise                         sys_madvise
+120     common  clone                           sys_clone_wrapper
+121     common  setdomainname                   sys_setdomainname
+122     common  sendfile                        sys_sendfile                    compat_sys_sendfile
+123     common  recvfrom                        sys_recvfrom
+124     common  adjtimex                        sys_adjtimex                    compat_sys_adjtimex
+125     common  mprotect                        sys_mprotect
+126     common  sigprocmask                     sys_sigprocmask                 compat_sys_sigprocmask
+128     common  init_module                     sys_init_module
+129     common  delete_module                   sys_delete_module
+131     common  quotactl                        sys_quotactl
+132     common  getpgid                         sys_getpgid
+133     common  fchdir                          sys_fchdir
+134     common  bdflush                         sys_bdflush
+135     common  sysfs                           sys_sysfs
+136     32      personality                     parisc_personality
+136     64      personality                     sys_personality                 parisc_personality
+138     common  setfsuid                        sys_setfsuid
+139     common  setfsgid                        sys_setfsgid
+140     common  _llseek                         sys_llseek
+141     common  getdents                        sys_getdents                    compat_sys_getdents
+142     common  _newselect                      sys_select                      compat_sys_select
+143     common  flock                           sys_flock
+144     common  msync                           sys_msync
+145     common  readv                           sys_readv                       compat_sys_readv
+146     common  writev                          sys_writev                      compat_sys_writev
+147     common  getsid                          sys_getsid
+148     common  fdatasync                       sys_fdatasync
+149     common  _sysctl                         sys_sysctl                      compat_sys_sysctl
+150     common  mlock                           sys_mlock
+151     common  munlock                         sys_munlock
+152     common  mlockall                        sys_mlockall
+153     common  munlockall                      sys_munlockall
+154     common  sched_setparam                  sys_sched_setparam
+155     common  sched_getparam                  sys_sched_getparam
+156     common  sched_setscheduler              sys_sched_setscheduler
+157     common  sched_getscheduler              sys_sched_getscheduler
+158     common  sched_yield                     sys_sched_yield
+159     common  sched_get_priority_max          sys_sched_get_priority_max
+160     common  sched_get_priority_min          sys_sched_get_priority_min
+161     common  sched_rr_get_interval           sys_sched_rr_get_interval       compat_sys_sched_rr_get_interval
+162     common  nanosleep                       sys_nanosleep                   compat_sys_nanosleep
+163     common  mremap                          sys_mremap
+164     common  setresuid                       sys_setresuid
+165     common  getresuid                       sys_getresuid
+166     common  sigaltstack                     sys_sigaltstack                 compat_sys_sigaltstack
+168     common  poll                            sys_poll
+170     common  setresgid                       sys_setresgid
+171     common  getresgid                       sys_getresgid
+172     common  prctl                           sys_prctl
+173     common  rt_sigreturn                    sys_rt_sigreturn
+174     common  rt_sigaction                    sys_rt_sigaction                compat_sys_rt_sigaction
+175     common  rt_sigprocmask                  sys_rt_sigprocmask              compat_sys_rt_sigprocmask
+176     common  rt_sigpending                   sys_rt_sigpending               compat_sys_rt_sigpending
+177     common  rt_sigtimedwait                 sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
+178     common  rt_sigqueueinfo                 sys_rt_sigqueueinfo             compat_sys_rt_sigqueueinfo
+179     common  rt_sigsuspend                   sys_rt_sigsuspend               compat_sys_rt_sigsuspend
+180     common  chown                           sys_chown
+181     common  setsockopt                      sys_setsockopt                  compat_sys_setsockopt
+182     common  getsockopt                      sys_getsockopt                  compat_sys_getsockopt
+183     common  sendmsg                         sys_sendmsg                     compat_sys_sendmsg
+184     common  recvmsg                         sys_recvmsg                     compat_sys_recvmsg
+185     common  semop                           sys_semop
+186     common  semget                          sys_semget
+187     common  semctl                          sys_semctl                      compat_sys_semctl
+188     common  msgsnd                          sys_msgsnd                      compat_sys_msgsnd
+189     common  msgrcv                          sys_msgrcv                      compat_sys_msgrcv
+190     common  msgget                          sys_msgget
+191     common  msgctl                          sys_msgctl                      compat_sys_msgctl
+192     common  shmat                           sys_shmat                       compat_sys_shmat
+193     common  shmdt                           sys_shmdt
+194     common  shmget                          sys_shmget
+195     common  shmctl                          sys_shmctl                      compat_sys_shmctl
+198     common  lstat64                         sys_lstat64
+199     32      truncate64                      parisc_truncate64
+199     64      truncate64                      sys_truncate64                  parisc_truncate64
+200     32      ftruncate64                     parisc_ftruncate64
+200     64      ftruncate64                     sys_ftruncate64                 parisc_ftruncate64
+201     common  getdents64                      sys_getdents64
+202     common  fcntl64                         sys_fcntl64                     compat_sys_fcntl64
+206     common  gettid                          sys_gettid
+207     32      readahead                       parisc_readahead
+207     64      readahead                       sys_readahead                   parisc_readahead
+208     common  tkill                           sys_tkill
+209     common  sendfile64                      sys_sendfile64                  compat_sys_sendfile64
+210     common  futex                           sys_futex                       compat_sys_futex
+211     common  sched_setaffinity               sys_sched_setaffinity           compat_sys_sched_setaffinity
+212     common  sched_getaffinity               sys_sched_getaffinity           compat_sys_sched_getaffinity
+215     common  io_setup                        sys_io_setup                    compat_sys_io_setup
+216     common  io_destroy                      sys_io_destroy
+217     common  io_getevents                    sys_io_getevents                compat_sys_io_getevents
+218     common  io_submit                       sys_io_submit                   compat_sys_io_submit
+219     common  io_cancel                       sys_io_cancel
+222     common  exit_group                      sys_exit_group
+223     common  lookup_dcookie                  sys_lookup_dcookie              compat_sys_lookup_dcookie
+224     common  epoll_create                    sys_epoll_create
+225     common  epoll_ctl                       sys_epoll_ctl
+226     common  epoll_wait                      sys_epoll_wait
+227     common  remap_file_pages                sys_remap_file_pages
+228     common  semtimedop                      sys_semtimedop                  compat_sys_semtimedop
+229     common  mq_open                         sys_mq_open                     compat_sys_mq_open
+230     common  mq_unlink                       sys_mq_unlink
+231     common  mq_timedsend                    sys_mq_timedsend                compat_sys_mq_timedsend
+232     common  mq_timedreceive                 sys_mq_timedreceive             compat_sys_mq_timedreceive
+233     common  mq_notify                       sys_mq_notify                   compat_sys_mq_notify
+234     common  mq_getsetattr                   sys_mq_getsetattr               compat_sys_mq_getsetattr
+235     common  waitid                          sys_waitid                      compat_sys_waitid
+236     32      fadvise64_64                    parisc_fadvise64_64
+236     64      fadvise64_64                    sys_fadvise64_64                parisc_fadvise64_64
+237     common  set_tid_address                 sys_set_tid_address
+238     common  setxattr                        sys_setxattr
+239     common  lsetxattr                       sys_lsetxattr
+240     common  fsetxattr                       sys_fsetxattr
+241     common  getxattr                        sys_getxattr
+242     common  lgetxattr                       sys_lgetxattr
+243     common  fgetxattr                       sys_fgetxattr
+244     common  listxattr                       sys_listxattr
+245     common  llistxattr                      sys_llistxattr
+246     common  flistxattr                      sys_flistxattr
+247     common  removexattr                     sys_removexattr
+248     common  lremovexattr                    sys_lremovexattr
+249     common  fremovexattr                    sys_fremovexattr
+250     common  timer_create                    sys_timer_create                compat_sys_timer_create
+251     common  timer_settime                   sys_timer_settime               compat_sys_timer_settime
+252     common  timer_gettime                   sys_timer_gettime               compat_sys_timer_gettime
+253     common  timer_getoverrun                sys_timer_getoverrun
+254     common  timer_delete                    sys_timer_delete
+255     common  clock_settime                   sys_clock_settime               compat_sys_clock_settime
+256     common  clock_gettime                   sys_clock_gettime               compat_sys_clock_gettime
+257     common  clock_getres                    sys_clock_getres                compat_sys_clock_getres
+258     common  clock_nanosleep                 sys_clock_nanosleep             compat_sys_clock_nanosleep
+259     common  tgkill                          sys_tgkill
+260     common  mbind                           sys_mbind                       compat_sys_mbind
+261     common  get_mempolicy                   sys_get_mempolicy               compat_sys_get_mempolicy
+262     common  set_mempolicy                   sys_set_mempolicy               compat_sys_set_mempolicy
+264     common  add_key                         sys_add_key
+265     common  request_key                     sys_request_key
+266     common  keyctl                          sys_keyctl                      compat_sys_keyctl
+267     common  ioprio_set                      sys_ioprio_set
+268     common  ioprio_get                      sys_ioprio_get
+269     common  inotify_init                    sys_inotify_init
+270     common  inotify_add_watch               sys_inotify_add_watch
+271     common  inotify_rm_watch                sys_inotify_rm_watch
+272     common  migrate_pages                   sys_migrate_pages
+273     common  pselect6                        sys_pselect6                    compat_sys_pselect6
+274     common  ppoll                           sys_ppoll                       compat_sys_ppoll
+275     common  openat                          sys_openat                      compat_sys_openat
+276     common  mkdirat                         sys_mkdirat
+277     common  mknodat                         sys_mknodat
+278     common  fchownat                        sys_fchownat
+279     common  futimesat                       sys_futimesat                   compat_sys_futimesat
+280     common  fstatat64                       sys_fstatat64
+281     common  unlinkat                        sys_unlinkat
+282     common  renameat                        sys_renameat
+283     common  linkat                          sys_linkat
+284     common  symlinkat                       sys_symlinkat
+285     common  readlinkat                      sys_readlinkat
+286     common  fchmodat                        sys_fchmodat
+287     common  faccessat                       sys_faccessat
+288     common  unshare                         sys_unshare
+289     common  set_robust_list                 sys_set_robust_list             compat_sys_set_robust_list
+290     common  get_robust_list                 sys_get_robust_list             compat_sys_get_robust_list
+291     common  splice                          sys_splice
+292     32      sync_file_range                 parisc_sync_file_range
+292     64      sync_file_range                 sys_sync_file_range             parisc_sync_file_range
+293     common  tee                             sys_tee
+294     common  vmsplice                        sys_vmsplice                    compat_sys_vmsplice
+295     common  move_pages                      sys_move_pages                  compat_sys_move_pages
+296     common  getcpu                          sys_getcpu
+297     common  epoll_pwait                     sys_epoll_pwait                 compat_sys_epoll_pwait
+298     common  statfs64                        sys_statfs64                    compat_sys_statfs64
+299     common  fstatfs64                       sys_fstatfs64                   compat_sys_fstatfs64
+300     common  kexec_load                      sys_kexec_load                  compat_sys_kexec_load
+301     common  utimensat                       sys_utimensat                   compat_sys_utimensat
+302     common  signalfd                        sys_signalfd                    compat_sys_signalfd
+304     common  eventfd                         sys_eventfd
+305     32      fallocate                       parisc_fallocate
+305     64      fallocate                       sys_fallocate                   parisc_fallocate
+306     common  timerfd_create                  sys_timerfd_create
+307     common  timerfd_settime                 sys_timerfd_settime             compat_sys_timerfd_settime
+308     common  timerfd_gettime                 sys_timerfd_gettime             compat_sys_timerfd_gettime
+309     common  signalfd4                       sys_signalfd4                   compat_sys_signalfd4
+310     common  eventfd2                        sys_eventfd2
+311     common  epoll_create1                   sys_epoll_create1
+312     common  dup3                            sys_dup3
+313     common  pipe2                           sys_pipe2
+314     common  inotify_init1                   sys_inotify_init1
+315     common  preadv                          sys_preadv                      compat_sys_preadv
+316     common  pwritev                         sys_pwritev                     compat_sys_pwritev
+317     common  rt_tgsigqueueinfo               sys_rt_tgsigqueueinfo           compat_sys_rt_tgsigqueueinfo
+318     common  perf_event_open                 sys_perf_event_open
+319     common  recvmmsg                        sys_recvmmsg                    compat_sys_recvmmsg
+320     common  accept4                         sys_accept4
+321     common  prlimit64                       sys_prlimit64
+322     common  fanotify_init                   sys_fanotify_init
+323     common  fanotify_mark                   sys_fanotify_mark               sys32_fanotify_mark
+324     common  clock_adjtime                   sys_clock_adjtime               compat_sys_clock_adjtime
+325     common  name_to_handle_at               sys_name_to_handle_at
+326     common  open_by_handle_at               sys_open_by_handle_at           compat_sys_open_by_handle_at
+327     common  syncfs                          sys_syncfs
+328     common  setns                           sys_setns
+329     common  sendmmsg                        sys_sendmmsg                    compat_sys_sendmmsg
+330     common  process_vm_readv                sys_process_vm_readv            compat_sys_process_vm_readv
+331     common  process_vm_writev               sys_process_vm_writev           compat_sys_process_vm_writev
+332     common  kcmp                            sys_kcmp
+333     common  finit_module                    sys_finit_module
+334     common  sched_setattr                   sys_sched_setattr
+335     common  sched_getattr                   sys_sched_getattr
+336     common  utimes                          sys_utimes                      compat_sys_utimes
+337     common  renameat2                       sys_renameat2
+338     common  seccomp                         sys_seccomp
+339     common  getrandom                       sys_getrandom
+340     common  memfd_create                    sys_memfd_create
+341     common  bpf                             sys_bpf
+342     common  execveat                        sys_execveat                    compat_sys_execveat
+343     common  membarrier                      sys_membarrier
+344     common  userfaultfd                     sys_userfaultfd
+345     common  mlock2                          sys_mlock2
+346     common  copy_file_range                 sys_copy_file_range
+347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
+348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
+349     common  statx                           sys_statx
+350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
\ No newline at end of file
diff --git a/arch/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh
new file mode 100644
index 0000000..607d4ca
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscallhdr.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+in="$1"
+out="$2"
+my_abis=`echo "($3)" | tr ',' '|'`
+prefix="$4"
+offset="$5"
+
+fileguard=_UAPI_ASM_PARISC_`basename "$out" | sed \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
+    -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
+grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
+    echo "#ifndef ${fileguard}"
+    echo "#define ${fileguard}"
+    echo ""
+
+    nxt=0
+    while read nr abi name entry compat ; do
+	if [ -z "$offset" ]; then
+	    echo -e "#define __NR_${prefix}${name}\t$nr"
+	else
+	    echo -e "#define __NR_${prefix}${name}\t($offset + $nr)"
+	fi
+	nxt=$nr
+	let nxt=nxt+1
+    done
+
+    echo ""
+    echo "#ifdef __KERNEL__"
+    echo -e "#define __NR_syscalls\t$nxt"
+    echo "#endif"
+    echo ""
+    echo "#endif /* ${fileguard} */"
+) > "$out"
diff --git a/arch/parisc/kernel/syscalls/syscalltbl.sh b/arch/parisc/kernel/syscalls/syscalltbl.sh
new file mode 100644
index 0000000..82b0416
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscalltbl.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+in="$1"
+out="$2"
+my_abis=`echo "($3)" | tr ',' '|'`
+offset="$4"
+
+emit() {
+    nxt="$1"
+    nr="$2"
+    entry="$3"
+
+    while [ $nxt -lt $nr ]; do
+	echo "__SYSCALL($nxt, sys_ni_syscall, )"
+        let nxt=nxt+1
+    done
+    echo "__SYSCALL($nr, $entry, )"
+}
+
+grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
+    if [ -z "$offset" ]; then
+	nxt=0
+    else
+	nxt=$offset
+    fi
+
+    while read nr abi name entry compat ; do
+	if [ ${out: -5} = "c32.h" ]; then
+	    if [ -z "$compat" ]; then
+		emit $nxt $nr $entry
+	    else
+		emit $nxt $nr $compat
+	    fi
+	elif [ ${out: -4} = "64.h" -o  ${out: -4} = "32.h" ]; then
+	    emit $nxt $nr $entry
+	fi
+	nxt=$nr
+        let nxt=nxt+1
+    done
+) > "$out"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08  5:16 ` [PATCH v3 3/6] parisc: add system call table generation support Firoz Khan
@ 2018-10-08  5:16   ` Firoz Khan
  2018-10-08  7:33   ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

The system call tables are in different format in all
architecture and it will be difficult to manually add or
modify the system calls in the respective files. To make
it easy by keeping a script and which'll generate the
header file and syscall table file so this change will
unify them across all architectures.

The system call table generation script is added in
syscalls directory which contain the script to generate
both uapi header file system call table generation file
and syscall.tbl file which'll be the input for the
scripts.

syscall.tbl contains the list of available system calls
along with system call number and corresponding entry point.
Add a new system call in this architecture will be possible
by adding new entry in the syscall.tbl file.

Adding a new table entry consisting of:
        - System call number.
        - ABI.
        - System call name.
        - Entry point name.
	- Compat entry name, if required.

syscallhdr.sh and syscalltbl.sh will generate uapi header-
unistd_32/64.h and syscall_table_32/64/c32.h files respect-
ively. File syscall_table_32/64/c32.h is included by sys-
call.S - the real system call table. Both .sh files will
parse the content syscall.tbl to generate the header and
table files.

ARM, s390 and x86 architecuture does have the similar support.
I leverage their implementation to come up with a generic
solution.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/kernel/syscalls/Makefile      |  55 +++++
 arch/parisc/kernel/syscalls/syscall.tbl   | 352 ++++++++++++++++++++++++++++++
 arch/parisc/kernel/syscalls/syscallhdr.sh |  35 +++
 arch/parisc/kernel/syscalls/syscalltbl.sh |  41 ++++
 4 files changed, 483 insertions(+)
 create mode 100644 arch/parisc/kernel/syscalls/Makefile
 create mode 100644 arch/parisc/kernel/syscalls/syscall.tbl
 create mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh
 create mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh

diff --git a/arch/parisc/kernel/syscalls/Makefile b/arch/parisc/kernel/syscalls/Makefile
new file mode 100644
index 0000000..e4c9c63
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/Makefile
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: GPL-2.0
+kapi := arch/$(SRCARCH)/include/generated/asm
+uapi := arch/$(SRCARCH)/include/generated/uapi/asm
+
+_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
+	  $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
+
+syscall := $(srctree)/$(src)/syscall.tbl
+syshdr := $(srctree)/$(src)/syscallhdr.sh
+systbl := $(srctree)/$(src)/syscalltbl.sh
+
+quiet_cmd_syshdr = SYSHDR  $@
+      cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'  \
+		   '$(syshdr_abi_$(basetarget))'          \
+		   '$(syshdr_pfx_$(basetarget))'          \
+		   '$(syshdr_offset_$(basetarget))'
+
+quiet_cmd_systbl = SYSTBL  $@
+      cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'  \
+                   '$(systbl_abi_$(basetarget))'          \
+		   '$(systbl_offset_$(basetarget))'
+
+syshdr_abi_unistd_32 := common,32
+syshdr_offset_unistd_32 := __NR_Linux
+$(uapi)/unistd_32.h: $(syscall) $(syshdr)
+	$(call if_changed,syshdr)
+
+syshdr_abi_unistd_64 := common,64
+syshdr_offset_unistd_64 := __NR_Linux
+$(uapi)/unistd_64.h: $(syscall) $(syshdr)
+	$(call if_changed,syshdr)
+
+systbl_abi_syscall_table_32 := common,32
+$(kapi)/syscall_table_32.h: $(syscall) $(systbl)
+	$(call if_changed,systbl)
+
+systbl_abi_syscall_table_64 := common,64
+$(kapi)/syscall_table_64.h: $(syscall) $(systbl)
+	$(call if_changed,systbl)
+
+systbl_abi_syscall_table_c32 := common,64
+$(kapi)/syscall_table_c32.h: $(syscall) $(systbl)
+	$(call if_changed,systbl)
+
+uapisyshdr-y			+= unistd_32.h unistd_64.h
+kapisyshdr-y			+= syscall_table_32.h     \
+                                   syscall_table_64.h     \
+                                   syscall_table_c32.h
+
+targets	+= $(uapisyshdr-y) $(kapisyshdr-y)
+
+PHONY += all
+all: $(addprefix $(uapi)/,$(uapisyshdr-y))
+all: $(addprefix $(kapi)/,$(kapisyshdr-y))
+	@:
diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
new file mode 100644
index 0000000..4e85293
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@ -0,0 +1,352 @@
+# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+#
+# system call numbers and entry vectors for parisc
+#
+# The format is:
+# <number> <abi> <name> <entry point> <compat entry point>
+#
+# The <abi> can be common, 64, or 32 for this file.
+#
+0       common  restart_syscall                 sys_restart_syscall
+1       common  exit                            sys_exit
+2       common  fork                            sys_fork_wrapper
+3       common  read                            sys_read
+4       common  write                           sys_write
+5       common  open                            sys_open                        compat_sys_open
+6       common  close                           sys_close
+7       common  waitpid                         sys_waitpid
+8       common  creat                           sys_creat
+9       common  link                            sys_link
+10      common  unlink                          sys_unlink
+11      common  execve                          sys_execve                      compat_sys_execve
+12      common  chdir                           sys_chdir
+13      common  time                            sys_time                        compat_sys_time
+14      common  mknod                           sys_mknod
+15      common  chmod                           sys_chmod
+16      common  lchown                          sys_lchown
+17      common  socket                          sys_socket
+18      common  stat                            sys_newstat                     compat_sys_newstat
+19      common  lseek                           sys_lseek                       compat_sys_lseek
+20      common  getpid                          sys_getpid
+21      common  mount                           sys_mount                       compat_sys_mount
+22      common  bind                            sys_bind
+23      common  setuid                          sys_setuid
+24      common  getuid                          sys_getuid
+25      common  stime                           sys_stime                       compat_sys_stime
+26      common  ptrace                          sys_ptrace                      compat_sys_ptrace
+27      common  alarm                           sys_alarm
+28      common  fstat                           sys_newfstat                    compat_sys_newfstat
+29      common  pause                           sys_pause
+30      common  utime                           sys_utime                       compat_sys_utime
+31      common  connect                         sys_connect
+32      common  listen                          sys_listen
+33      common  access                          sys_access
+34      common  nice                            sys_nice
+35      common  accept                          sys_accept
+36      common  sync                            sys_sync
+37      common  kill                            sys_kill
+38      common  rename                          sys_rename
+39      common  mkdir                           sys_mkdir
+40      common  rmdir                           sys_rmdir
+41      common  dup                             sys_dup
+42      common  pipe                            sys_pipe
+43      common  times                           sys_times                       compat_sys_times
+44      common  getsockname                     sys_getsockname
+45      common  brk                             sys_brk
+46      common  setgid                          sys_setgid
+47      common  getgid                          sys_getgid
+48      common  signal                          sys_signal
+49      common  geteuid                         sys_geteuid
+50      common  getegid                         sys_getegid
+51      common  acct                            sys_acct
+52      common  umount2                         sys_umount
+53      common  getpeername                     sys_getpeername
+54      common  ioctl                           sys_ioctl                       compat_sys_ioctl
+55      common  fcntl                           sys_fcntl                       compat_sys_fcntl
+56      common  socketpair                      sys_socketpair
+57      common  setpgid                         sys_setpgid
+58      common  send                            sys_send
+59      common  uname                           sys_newuname
+60      common  umask                           sys_umask
+61      common  chroot                          sys_chroot
+62      common  ustat                           sys_ustat                       compat_sys_ustat
+63      common  dup2                            sys_dup2
+64      common  getppid                         sys_getppid
+65      common  getpgrp                         sys_getpgrp
+66      common  setsid                          sys_setsid
+67      common  pivot_root                      sys_pivot_root
+68      common  sgetmask                        sys_sgetmask                    sys32_unimplemented
+69      common  ssetmask                        sys_ssetmask                    sys32_unimplemented
+70      common  setreuid                        sys_setreuid
+71      common  setregid                        sys_setregid
+72      common  mincore                         sys_mincore
+73      common  sigpending                      sys_sigpending                  compat_sys_sigpending
+74      common  sethostname                     sys_sethostname
+75      common  setrlimit                       sys_setrlimit                   compat_sys_setrlimit
+76      common  getrlimit                       sys_getrlimit                   compat_sys_getrlimit
+77      common  getrusage                       sys_getrusage                   compat_sys_getrusage
+78      common  gettimeofday                    sys_gettimeofday                compat_sys_gettimeofday
+79      common  settimeofday                    sys_settimeofday                compat_sys_settimeofday
+80      common  getgroups                       sys_getgroups
+81      common  setgroups                       sys_setgroups
+82      common  sendto                          sys_sendto
+83      common  symlink                         sys_symlink
+84      common  lstat                           sys_newlstat                    compat_sys_newlstat
+85      common  readlink                        sys_readlink
+86      common  uselib                          sys_ni_syscall
+87      common  swapon                          sys_swapon
+88      common  reboot                          sys_reboot
+89      common  mmap2                           sys_mmap2
+90      common  mmap                            sys_mmap
+91      common  munmap                          sys_munmap
+92      common  truncate                        sys_truncate                    compat_sys_truncate
+93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
+94      common  fchmod                          sys_fchmod
+95      common  fchown                          sys_fchown
+96      common  getpriority                     sys_getpriority
+97      common  setpriority                     sys_setpriority
+98      common  recv                            sys_recv
+99      common  statfs                          sys_statfs                      compat_sys_statfs
+100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
+101     common  stat64                          sys_stat64
+103     common  syslog                          sys_syslog
+104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
+105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
+106     common  capget                          sys_capget
+107     common  capset                          sys_capset
+108     32      pread64                         parisc_pread64
+108     64      pread64                         sys_pread64                     parisc_pread64
+109     32      pwrite64                        parisc_pwrite64
+109     64      pwrite64                        sys_pwrite64                    parisc_pwrite64
+110     common  getcwd                          sys_getcwd
+111     common  vhangup                         sys_vhangup
+112     common  fstat64                         sys_fstat64
+113     common  vfork                           sys_vfork_wrapper
+114     common  wait4                           sys_wait4                       compat_sys_wait4
+115     common  swapoff                         sys_swapoff
+116     common  sysinfo                         sys_sysinfo                     compat_sys_sysinfo
+117     common  shutdown                        sys_shutdown
+118     common  fsync                           sys_fsync
+119     common  madvise                         sys_madvise
+120     common  clone                           sys_clone_wrapper
+121     common  setdomainname                   sys_setdomainname
+122     common  sendfile                        sys_sendfile                    compat_sys_sendfile
+123     common  recvfrom                        sys_recvfrom
+124     common  adjtimex                        sys_adjtimex                    compat_sys_adjtimex
+125     common  mprotect                        sys_mprotect
+126     common  sigprocmask                     sys_sigprocmask                 compat_sys_sigprocmask
+128     common  init_module                     sys_init_module
+129     common  delete_module                   sys_delete_module
+131     common  quotactl                        sys_quotactl
+132     common  getpgid                         sys_getpgid
+133     common  fchdir                          sys_fchdir
+134     common  bdflush                         sys_bdflush
+135     common  sysfs                           sys_sysfs
+136     32      personality                     parisc_personality
+136     64      personality                     sys_personality                 parisc_personality
+138     common  setfsuid                        sys_setfsuid
+139     common  setfsgid                        sys_setfsgid
+140     common  _llseek                         sys_llseek
+141     common  getdents                        sys_getdents                    compat_sys_getdents
+142     common  _newselect                      sys_select                      compat_sys_select
+143     common  flock                           sys_flock
+144     common  msync                           sys_msync
+145     common  readv                           sys_readv                       compat_sys_readv
+146     common  writev                          sys_writev                      compat_sys_writev
+147     common  getsid                          sys_getsid
+148     common  fdatasync                       sys_fdatasync
+149     common  _sysctl                         sys_sysctl                      compat_sys_sysctl
+150     common  mlock                           sys_mlock
+151     common  munlock                         sys_munlock
+152     common  mlockall                        sys_mlockall
+153     common  munlockall                      sys_munlockall
+154     common  sched_setparam                  sys_sched_setparam
+155     common  sched_getparam                  sys_sched_getparam
+156     common  sched_setscheduler              sys_sched_setscheduler
+157     common  sched_getscheduler              sys_sched_getscheduler
+158     common  sched_yield                     sys_sched_yield
+159     common  sched_get_priority_max          sys_sched_get_priority_max
+160     common  sched_get_priority_min          sys_sched_get_priority_min
+161     common  sched_rr_get_interval           sys_sched_rr_get_interval       compat_sys_sched_rr_get_interval
+162     common  nanosleep                       sys_nanosleep                   compat_sys_nanosleep
+163     common  mremap                          sys_mremap
+164     common  setresuid                       sys_setresuid
+165     common  getresuid                       sys_getresuid
+166     common  sigaltstack                     sys_sigaltstack                 compat_sys_sigaltstack
+168     common  poll                            sys_poll
+170     common  setresgid                       sys_setresgid
+171     common  getresgid                       sys_getresgid
+172     common  prctl                           sys_prctl
+173     common  rt_sigreturn                    sys_rt_sigreturn
+174     common  rt_sigaction                    sys_rt_sigaction                compat_sys_rt_sigaction
+175     common  rt_sigprocmask                  sys_rt_sigprocmask              compat_sys_rt_sigprocmask
+176     common  rt_sigpending                   sys_rt_sigpending               compat_sys_rt_sigpending
+177     common  rt_sigtimedwait                 sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
+178     common  rt_sigqueueinfo                 sys_rt_sigqueueinfo             compat_sys_rt_sigqueueinfo
+179     common  rt_sigsuspend                   sys_rt_sigsuspend               compat_sys_rt_sigsuspend
+180     common  chown                           sys_chown
+181     common  setsockopt                      sys_setsockopt                  compat_sys_setsockopt
+182     common  getsockopt                      sys_getsockopt                  compat_sys_getsockopt
+183     common  sendmsg                         sys_sendmsg                     compat_sys_sendmsg
+184     common  recvmsg                         sys_recvmsg                     compat_sys_recvmsg
+185     common  semop                           sys_semop
+186     common  semget                          sys_semget
+187     common  semctl                          sys_semctl                      compat_sys_semctl
+188     common  msgsnd                          sys_msgsnd                      compat_sys_msgsnd
+189     common  msgrcv                          sys_msgrcv                      compat_sys_msgrcv
+190     common  msgget                          sys_msgget
+191     common  msgctl                          sys_msgctl                      compat_sys_msgctl
+192     common  shmat                           sys_shmat                       compat_sys_shmat
+193     common  shmdt                           sys_shmdt
+194     common  shmget                          sys_shmget
+195     common  shmctl                          sys_shmctl                      compat_sys_shmctl
+198     common  lstat64                         sys_lstat64
+199     32      truncate64                      parisc_truncate64
+199     64      truncate64                      sys_truncate64                  parisc_truncate64
+200     32      ftruncate64                     parisc_ftruncate64
+200     64      ftruncate64                     sys_ftruncate64                 parisc_ftruncate64
+201     common  getdents64                      sys_getdents64
+202     common  fcntl64                         sys_fcntl64                     compat_sys_fcntl64
+206     common  gettid                          sys_gettid
+207     32      readahead                       parisc_readahead
+207     64      readahead                       sys_readahead                   parisc_readahead
+208     common  tkill                           sys_tkill
+209     common  sendfile64                      sys_sendfile64                  compat_sys_sendfile64
+210     common  futex                           sys_futex                       compat_sys_futex
+211     common  sched_setaffinity               sys_sched_setaffinity           compat_sys_sched_setaffinity
+212     common  sched_getaffinity               sys_sched_getaffinity           compat_sys_sched_getaffinity
+215     common  io_setup                        sys_io_setup                    compat_sys_io_setup
+216     common  io_destroy                      sys_io_destroy
+217     common  io_getevents                    sys_io_getevents                compat_sys_io_getevents
+218     common  io_submit                       sys_io_submit                   compat_sys_io_submit
+219     common  io_cancel                       sys_io_cancel
+222     common  exit_group                      sys_exit_group
+223     common  lookup_dcookie                  sys_lookup_dcookie              compat_sys_lookup_dcookie
+224     common  epoll_create                    sys_epoll_create
+225     common  epoll_ctl                       sys_epoll_ctl
+226     common  epoll_wait                      sys_epoll_wait
+227     common  remap_file_pages                sys_remap_file_pages
+228     common  semtimedop                      sys_semtimedop                  compat_sys_semtimedop
+229     common  mq_open                         sys_mq_open                     compat_sys_mq_open
+230     common  mq_unlink                       sys_mq_unlink
+231     common  mq_timedsend                    sys_mq_timedsend                compat_sys_mq_timedsend
+232     common  mq_timedreceive                 sys_mq_timedreceive             compat_sys_mq_timedreceive
+233     common  mq_notify                       sys_mq_notify                   compat_sys_mq_notify
+234     common  mq_getsetattr                   sys_mq_getsetattr               compat_sys_mq_getsetattr
+235     common  waitid                          sys_waitid                      compat_sys_waitid
+236     32      fadvise64_64                    parisc_fadvise64_64
+236     64      fadvise64_64                    sys_fadvise64_64                parisc_fadvise64_64
+237     common  set_tid_address                 sys_set_tid_address
+238     common  setxattr                        sys_setxattr
+239     common  lsetxattr                       sys_lsetxattr
+240     common  fsetxattr                       sys_fsetxattr
+241     common  getxattr                        sys_getxattr
+242     common  lgetxattr                       sys_lgetxattr
+243     common  fgetxattr                       sys_fgetxattr
+244     common  listxattr                       sys_listxattr
+245     common  llistxattr                      sys_llistxattr
+246     common  flistxattr                      sys_flistxattr
+247     common  removexattr                     sys_removexattr
+248     common  lremovexattr                    sys_lremovexattr
+249     common  fremovexattr                    sys_fremovexattr
+250     common  timer_create                    sys_timer_create                compat_sys_timer_create
+251     common  timer_settime                   sys_timer_settime               compat_sys_timer_settime
+252     common  timer_gettime                   sys_timer_gettime               compat_sys_timer_gettime
+253     common  timer_getoverrun                sys_timer_getoverrun
+254     common  timer_delete                    sys_timer_delete
+255     common  clock_settime                   sys_clock_settime               compat_sys_clock_settime
+256     common  clock_gettime                   sys_clock_gettime               compat_sys_clock_gettime
+257     common  clock_getres                    sys_clock_getres                compat_sys_clock_getres
+258     common  clock_nanosleep                 sys_clock_nanosleep             compat_sys_clock_nanosleep
+259     common  tgkill                          sys_tgkill
+260     common  mbind                           sys_mbind                       compat_sys_mbind
+261     common  get_mempolicy                   sys_get_mempolicy               compat_sys_get_mempolicy
+262     common  set_mempolicy                   sys_set_mempolicy               compat_sys_set_mempolicy
+264     common  add_key                         sys_add_key
+265     common  request_key                     sys_request_key
+266     common  keyctl                          sys_keyctl                      compat_sys_keyctl
+267     common  ioprio_set                      sys_ioprio_set
+268     common  ioprio_get                      sys_ioprio_get
+269     common  inotify_init                    sys_inotify_init
+270     common  inotify_add_watch               sys_inotify_add_watch
+271     common  inotify_rm_watch                sys_inotify_rm_watch
+272     common  migrate_pages                   sys_migrate_pages
+273     common  pselect6                        sys_pselect6                    compat_sys_pselect6
+274     common  ppoll                           sys_ppoll                       compat_sys_ppoll
+275     common  openat                          sys_openat                      compat_sys_openat
+276     common  mkdirat                         sys_mkdirat
+277     common  mknodat                         sys_mknodat
+278     common  fchownat                        sys_fchownat
+279     common  futimesat                       sys_futimesat                   compat_sys_futimesat
+280     common  fstatat64                       sys_fstatat64
+281     common  unlinkat                        sys_unlinkat
+282     common  renameat                        sys_renameat
+283     common  linkat                          sys_linkat
+284     common  symlinkat                       sys_symlinkat
+285     common  readlinkat                      sys_readlinkat
+286     common  fchmodat                        sys_fchmodat
+287     common  faccessat                       sys_faccessat
+288     common  unshare                         sys_unshare
+289     common  set_robust_list                 sys_set_robust_list             compat_sys_set_robust_list
+290     common  get_robust_list                 sys_get_robust_list             compat_sys_get_robust_list
+291     common  splice                          sys_splice
+292     32      sync_file_range                 parisc_sync_file_range
+292     64      sync_file_range                 sys_sync_file_range             parisc_sync_file_range
+293     common  tee                             sys_tee
+294     common  vmsplice                        sys_vmsplice                    compat_sys_vmsplice
+295     common  move_pages                      sys_move_pages                  compat_sys_move_pages
+296     common  getcpu                          sys_getcpu
+297     common  epoll_pwait                     sys_epoll_pwait                 compat_sys_epoll_pwait
+298     common  statfs64                        sys_statfs64                    compat_sys_statfs64
+299     common  fstatfs64                       sys_fstatfs64                   compat_sys_fstatfs64
+300     common  kexec_load                      sys_kexec_load                  compat_sys_kexec_load
+301     common  utimensat                       sys_utimensat                   compat_sys_utimensat
+302     common  signalfd                        sys_signalfd                    compat_sys_signalfd
+304     common  eventfd                         sys_eventfd
+305     32      fallocate                       parisc_fallocate
+305     64      fallocate                       sys_fallocate                   parisc_fallocate
+306     common  timerfd_create                  sys_timerfd_create
+307     common  timerfd_settime                 sys_timerfd_settime             compat_sys_timerfd_settime
+308     common  timerfd_gettime                 sys_timerfd_gettime             compat_sys_timerfd_gettime
+309     common  signalfd4                       sys_signalfd4                   compat_sys_signalfd4
+310     common  eventfd2                        sys_eventfd2
+311     common  epoll_create1                   sys_epoll_create1
+312     common  dup3                            sys_dup3
+313     common  pipe2                           sys_pipe2
+314     common  inotify_init1                   sys_inotify_init1
+315     common  preadv                          sys_preadv                      compat_sys_preadv
+316     common  pwritev                         sys_pwritev                     compat_sys_pwritev
+317     common  rt_tgsigqueueinfo               sys_rt_tgsigqueueinfo           compat_sys_rt_tgsigqueueinfo
+318     common  perf_event_open                 sys_perf_event_open
+319     common  recvmmsg                        sys_recvmmsg                    compat_sys_recvmmsg
+320     common  accept4                         sys_accept4
+321     common  prlimit64                       sys_prlimit64
+322     common  fanotify_init                   sys_fanotify_init
+323     common  fanotify_mark                   sys_fanotify_mark               sys32_fanotify_mark
+324     common  clock_adjtime                   sys_clock_adjtime               compat_sys_clock_adjtime
+325     common  name_to_handle_at               sys_name_to_handle_at
+326     common  open_by_handle_at               sys_open_by_handle_at           compat_sys_open_by_handle_at
+327     common  syncfs                          sys_syncfs
+328     common  setns                           sys_setns
+329     common  sendmmsg                        sys_sendmmsg                    compat_sys_sendmmsg
+330     common  process_vm_readv                sys_process_vm_readv            compat_sys_process_vm_readv
+331     common  process_vm_writev               sys_process_vm_writev           compat_sys_process_vm_writev
+332     common  kcmp                            sys_kcmp
+333     common  finit_module                    sys_finit_module
+334     common  sched_setattr                   sys_sched_setattr
+335     common  sched_getattr                   sys_sched_getattr
+336     common  utimes                          sys_utimes                      compat_sys_utimes
+337     common  renameat2                       sys_renameat2
+338     common  seccomp                         sys_seccomp
+339     common  getrandom                       sys_getrandom
+340     common  memfd_create                    sys_memfd_create
+341     common  bpf                             sys_bpf
+342     common  execveat                        sys_execveat                    compat_sys_execveat
+343     common  membarrier                      sys_membarrier
+344     common  userfaultfd                     sys_userfaultfd
+345     common  mlock2                          sys_mlock2
+346     common  copy_file_range                 sys_copy_file_range
+347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
+348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
+349     common  statx                           sys_statx
+350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
\ No newline at end of file
diff --git a/arch/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh
new file mode 100644
index 0000000..607d4ca
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscallhdr.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+in="$1"
+out="$2"
+my_abis=`echo "($3)" | tr ',' '|'`
+prefix="$4"
+offset="$5"
+
+fileguard=_UAPI_ASM_PARISC_`basename "$out" | sed \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
+    -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
+grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
+    echo "#ifndef ${fileguard}"
+    echo "#define ${fileguard}"
+    echo ""
+
+    nxt=0
+    while read nr abi name entry compat ; do
+	if [ -z "$offset" ]; then
+	    echo -e "#define __NR_${prefix}${name}\t$nr"
+	else
+	    echo -e "#define __NR_${prefix}${name}\t($offset + $nr)"
+	fi
+	nxt=$nr
+	let nxt=nxt+1
+    done
+
+    echo ""
+    echo "#ifdef __KERNEL__"
+    echo -e "#define __NR_syscalls\t$nxt"
+    echo "#endif"
+    echo ""
+    echo "#endif /* ${fileguard} */"
+) > "$out"
diff --git a/arch/parisc/kernel/syscalls/syscalltbl.sh b/arch/parisc/kernel/syscalls/syscalltbl.sh
new file mode 100644
index 0000000..82b0416
--- /dev/null
+++ b/arch/parisc/kernel/syscalls/syscalltbl.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+in="$1"
+out="$2"
+my_abis=`echo "($3)" | tr ',' '|'`
+offset="$4"
+
+emit() {
+    nxt="$1"
+    nr="$2"
+    entry="$3"
+
+    while [ $nxt -lt $nr ]; do
+	echo "__SYSCALL($nxt, sys_ni_syscall, )"
+        let nxt=nxt+1
+    done
+    echo "__SYSCALL($nr, $entry, )"
+}
+
+grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
+    if [ -z "$offset" ]; then
+	nxt=0
+    else
+	nxt=$offset
+    fi
+
+    while read nr abi name entry compat ; do
+	if [ ${out: -5} = "c32.h" ]; then
+	    if [ -z "$compat" ]; then
+		emit $nxt $nr $entry
+	    else
+		emit $nxt $nr $compat
+	    fi
+	elif [ ${out: -4} = "64.h" -o  ${out: -4} = "32.h" ]; then
+	    emit $nxt $nr $entry
+	fi
+	nxt=$nr
+        let nxt=nxt+1
+    done
+) > "$out"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
                   ` (3 preceding siblings ...)
  2018-10-08  5:16 ` [PATCH v3 3/6] parisc: add system call table generation support Firoz Khan
@ 2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
                     ` (2 more replies)
  2018-10-08  5:16 ` [PATCH v3 5/6] parisc: wire up rseq system call Firoz Khan
  2018-10-08  5:16 ` [PATCH v3 6/6] parisc: syscalls: Ignore nfsservctl for other architectures Firoz Khan
  6 siblings, 3 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

System call table generation script must be run to generate
unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
will have changes which will invokes the script.

This patch will generate unistd_32/64.h and syscall_table_
32/64/c32.h files by the syscall table generation script
invoked by arch/parisc/Makefile and the generated files against
the removed files will be identical.

The generated uapi header file will be included in uapi/asm/
unistd_32/64.h and generated system call table support file will
be included by arch/sparc/kernel/syscall_table_32/64.S file.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/Makefile                  |   4 +
 arch/parisc/include/asm/Kbuild        |   3 +
 arch/parisc/include/uapi/asm/Kbuild   |   2 +
 arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
 arch/parisc/kernel/syscall.S          |  12 +-
 arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
 arch/parisc/kernel/syscall_table_32.S |  13 +
 arch/parisc/kernel/syscall_table_64.S |  20 ++
 8 files changed, 50 insertions(+), 836 deletions(-)
 delete mode 100644 arch/parisc/kernel/syscall_table.S
 create mode 100644 arch/parisc/kernel/syscall_table_32.S
 create mode 100644 arch/parisc/kernel/syscall_table_64.S

diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 5ce0302..6b217da 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -159,6 +159,10 @@ endef
 
 # we require gcc 3.3 or above to compile the kernel
 archprepare: checkbin
+
+archheaders:
+	$(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all
+
 checkbin:
 	@if test "$(cc-version)" -lt "0303"; then \
 		echo -n "Sorry, GCC v3.3 or above is required to build " ; \
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 2013d63..6b66fb9 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -23,3 +23,6 @@ generic-y += user.h
 generic-y += vga.h
 generic-y += word-at-a-time.h
 generic-y += xor.h
+generic-y += syscall_table_32.h
+generic-y += syscall_table_64.h
+generic-y += syscall_table_c32.h
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index 286ef5a..04360d9 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -7,3 +7,5 @@ generic-y += kvm_para.h
 generic-y += param.h
 generic-y += poll.h
 generic-y += resource.h
+generic-y += unistd_32.h
+generic-y += unistd_64.h
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
index f10d065..76e3a3b 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -2,374 +2,13 @@
 #ifndef _UAPI_ASM_PARISC_UNISTD_H_
 #define _UAPI_ASM_PARISC_UNISTD_H_
 
-/*
- * Linux system call numbers.
- *
- * Cary Coutant says that we should just use another syscall gateway
- * page to avoid clashing with the HPUX space, and I think he's right:
- * it will would keep a branch out of our syscall entry path, at the
- * very least.  If we decide to change it later, we can ``just'' tweak
- * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
- * 1024 or something.  Oh, and recompile libc. =)
- */
-
-#define __NR_Linux                0
-#define __NR_restart_syscall      (__NR_Linux + 0)
-#define __NR_exit                 (__NR_Linux + 1)
-#define __NR_fork                 (__NR_Linux + 2)
-#define __NR_read                 (__NR_Linux + 3)
-#define __NR_write                (__NR_Linux + 4)
-#define __NR_open                 (__NR_Linux + 5)
-#define __NR_close                (__NR_Linux + 6)
-#define __NR_waitpid              (__NR_Linux + 7)
-#define __NR_creat                (__NR_Linux + 8)
-#define __NR_link                 (__NR_Linux + 9)
-#define __NR_unlink              (__NR_Linux + 10)
-#define __NR_execve              (__NR_Linux + 11)
-#define __NR_chdir               (__NR_Linux + 12)
-#define __NR_time                (__NR_Linux + 13)
-#define __NR_mknod               (__NR_Linux + 14)
-#define __NR_chmod               (__NR_Linux + 15)
-#define __NR_lchown              (__NR_Linux + 16)
-#define __NR_socket              (__NR_Linux + 17)
-#define __NR_stat                (__NR_Linux + 18)
-#define __NR_lseek               (__NR_Linux + 19)
-#define __NR_getpid              (__NR_Linux + 20)
-#define __NR_mount               (__NR_Linux + 21)
-#define __NR_bind                (__NR_Linux + 22)
-#define __NR_setuid              (__NR_Linux + 23)
-#define __NR_getuid              (__NR_Linux + 24)
-#define __NR_stime               (__NR_Linux + 25)
-#define __NR_ptrace              (__NR_Linux + 26)
-#define __NR_alarm               (__NR_Linux + 27)
-#define __NR_fstat               (__NR_Linux + 28)
-#define __NR_pause               (__NR_Linux + 29)
-#define __NR_utime               (__NR_Linux + 30)
-#define __NR_connect             (__NR_Linux + 31)
-#define __NR_listen              (__NR_Linux + 32)
-#define __NR_access              (__NR_Linux + 33)
-#define __NR_nice                (__NR_Linux + 34)
-#define __NR_accept              (__NR_Linux + 35)
-#define __NR_sync                (__NR_Linux + 36)
-#define __NR_kill                (__NR_Linux + 37)
-#define __NR_rename              (__NR_Linux + 38)
-#define __NR_mkdir               (__NR_Linux + 39)
-#define __NR_rmdir               (__NR_Linux + 40)
-#define __NR_dup                 (__NR_Linux + 41)
-#define __NR_pipe                (__NR_Linux + 42)
-#define __NR_times               (__NR_Linux + 43)
-#define __NR_getsockname         (__NR_Linux + 44)
-#define __NR_brk                 (__NR_Linux + 45)
-#define __NR_setgid              (__NR_Linux + 46)
-#define __NR_getgid              (__NR_Linux + 47)
-#define __NR_signal              (__NR_Linux + 48)
-#define __NR_geteuid             (__NR_Linux + 49)
-#define __NR_getegid             (__NR_Linux + 50)
-#define __NR_acct                (__NR_Linux + 51)
-#define __NR_umount2             (__NR_Linux + 52)
-#define __NR_getpeername         (__NR_Linux + 53)
-#define __NR_ioctl               (__NR_Linux + 54)
-#define __NR_fcntl               (__NR_Linux + 55)
-#define __NR_socketpair          (__NR_Linux + 56)
-#define __NR_setpgid             (__NR_Linux + 57)
-#define __NR_send                (__NR_Linux + 58)
-#define __NR_uname               (__NR_Linux + 59)
-#define __NR_umask               (__NR_Linux + 60)
-#define __NR_chroot              (__NR_Linux + 61)
-#define __NR_ustat               (__NR_Linux + 62)
-#define __NR_dup2                (__NR_Linux + 63)
-#define __NR_getppid             (__NR_Linux + 64)
-#define __NR_getpgrp             (__NR_Linux + 65)
-#define __NR_setsid              (__NR_Linux + 66)
-#define __NR_pivot_root          (__NR_Linux + 67)
-#define __NR_sgetmask            (__NR_Linux + 68)
-#define __NR_ssetmask            (__NR_Linux + 69)
-#define __NR_setreuid            (__NR_Linux + 70)
-#define __NR_setregid            (__NR_Linux + 71)
-#define __NR_mincore             (__NR_Linux + 72)
-#define __NR_sigpending          (__NR_Linux + 73)
-#define __NR_sethostname         (__NR_Linux + 74)
-#define __NR_setrlimit           (__NR_Linux + 75)
-#define __NR_getrlimit           (__NR_Linux + 76)
-#define __NR_getrusage           (__NR_Linux + 77)
-#define __NR_gettimeofday        (__NR_Linux + 78)
-#define __NR_settimeofday        (__NR_Linux + 79)
-#define __NR_getgroups           (__NR_Linux + 80)
-#define __NR_setgroups           (__NR_Linux + 81)
-#define __NR_sendto              (__NR_Linux + 82)
-#define __NR_symlink             (__NR_Linux + 83)
-#define __NR_lstat               (__NR_Linux + 84)
-#define __NR_readlink            (__NR_Linux + 85)
-#define __NR_uselib              (__NR_Linux + 86)
-#define __NR_swapon              (__NR_Linux + 87)
-#define __NR_reboot              (__NR_Linux + 88)
-#define __NR_mmap2               (__NR_Linux + 89)
-#define __NR_mmap                (__NR_Linux + 90)
-#define __NR_munmap              (__NR_Linux + 91)
-#define __NR_truncate            (__NR_Linux + 92)
-#define __NR_ftruncate           (__NR_Linux + 93)
-#define __NR_fchmod              (__NR_Linux + 94)
-#define __NR_fchown              (__NR_Linux + 95)
-#define __NR_getpriority         (__NR_Linux + 96)
-#define __NR_setpriority         (__NR_Linux + 97)
-#define __NR_recv                (__NR_Linux + 98)
-#define __NR_statfs              (__NR_Linux + 99)
-#define __NR_fstatfs            (__NR_Linux + 100)
-#define __NR_stat64             (__NR_Linux + 101)
-/* #define __NR_socketcall         (__NR_Linux + 102) */
-#define __NR_syslog             (__NR_Linux + 103)
-#define __NR_setitimer          (__NR_Linux + 104)
-#define __NR_getitimer          (__NR_Linux + 105)
-#define __NR_capget             (__NR_Linux + 106)
-#define __NR_capset             (__NR_Linux + 107)
-#define __NR_pread64            (__NR_Linux + 108)
-#define __NR_pwrite64           (__NR_Linux + 109)
-#define __NR_getcwd             (__NR_Linux + 110)
-#define __NR_vhangup            (__NR_Linux + 111)
-#define __NR_fstat64            (__NR_Linux + 112)
-#define __NR_vfork              (__NR_Linux + 113)
-#define __NR_wait4              (__NR_Linux + 114)
-#define __NR_swapoff            (__NR_Linux + 115)
-#define __NR_sysinfo            (__NR_Linux + 116)
-#define __NR_shutdown           (__NR_Linux + 117)
-#define __NR_fsync              (__NR_Linux + 118)
-#define __NR_madvise            (__NR_Linux + 119)
-#define __NR_clone              (__NR_Linux + 120)
-#define __NR_setdomainname      (__NR_Linux + 121)
-#define __NR_sendfile           (__NR_Linux + 122)
-#define __NR_recvfrom           (__NR_Linux + 123)
-#define __NR_adjtimex           (__NR_Linux + 124)
-#define __NR_mprotect           (__NR_Linux + 125)
-#define __NR_sigprocmask        (__NR_Linux + 126)
-#define __NR_create_module      (__NR_Linux + 127) /* not used */
-#define __NR_init_module        (__NR_Linux + 128)
-#define __NR_delete_module      (__NR_Linux + 129)
-#define __NR_get_kernel_syms    (__NR_Linux + 130) /* not used */
-#define __NR_quotactl           (__NR_Linux + 131)
-#define __NR_getpgid            (__NR_Linux + 132)
-#define __NR_fchdir             (__NR_Linux + 133)
-#define __NR_bdflush            (__NR_Linux + 134)
-#define __NR_sysfs              (__NR_Linux + 135)
-#define __NR_personality        (__NR_Linux + 136)
-#define __NR_afs_syscall        (__NR_Linux + 137) /* not used */
-#define __NR_setfsuid           (__NR_Linux + 138)
-#define __NR_setfsgid           (__NR_Linux + 139)
-#define __NR__llseek            (__NR_Linux + 140)
-#define __NR_getdents           (__NR_Linux + 141)
-#define __NR__newselect         (__NR_Linux + 142)
-#define __NR_flock              (__NR_Linux + 143)
-#define __NR_msync              (__NR_Linux + 144)
-#define __NR_readv              (__NR_Linux + 145)
-#define __NR_writev             (__NR_Linux + 146)
-#define __NR_getsid             (__NR_Linux + 147)
-#define __NR_fdatasync          (__NR_Linux + 148)
-#define __NR__sysctl            (__NR_Linux + 149)
-#define __NR_mlock              (__NR_Linux + 150)
-#define __NR_munlock            (__NR_Linux + 151)
-#define __NR_mlockall           (__NR_Linux + 152)
-#define __NR_munlockall         (__NR_Linux + 153)
-#define __NR_sched_setparam             (__NR_Linux + 154)
-#define __NR_sched_getparam             (__NR_Linux + 155)
-#define __NR_sched_setscheduler         (__NR_Linux + 156)
-#define __NR_sched_getscheduler         (__NR_Linux + 157)
-#define __NR_sched_yield                (__NR_Linux + 158)
-#define __NR_sched_get_priority_max     (__NR_Linux + 159)
-#define __NR_sched_get_priority_min     (__NR_Linux + 160)
-#define __NR_sched_rr_get_interval      (__NR_Linux + 161)
-#define __NR_nanosleep          (__NR_Linux + 162)
-#define __NR_mremap             (__NR_Linux + 163)
-#define __NR_setresuid          (__NR_Linux + 164)
-#define __NR_getresuid          (__NR_Linux + 165)
-#define __NR_sigaltstack        (__NR_Linux + 166)
-#define __NR_query_module       (__NR_Linux + 167) /* not used */
-#define __NR_poll               (__NR_Linux + 168)
-#define __NR_nfsservctl         (__NR_Linux + 169) /* not used */
-#define __NR_setresgid          (__NR_Linux + 170)
-#define __NR_getresgid          (__NR_Linux + 171)
-#define __NR_prctl              (__NR_Linux + 172)
-#define __NR_rt_sigreturn       (__NR_Linux + 173)
-#define __NR_rt_sigaction       (__NR_Linux + 174)
-#define __NR_rt_sigprocmask     (__NR_Linux + 175)
-#define __NR_rt_sigpending      (__NR_Linux + 176)
-#define __NR_rt_sigtimedwait    (__NR_Linux + 177)
-#define __NR_rt_sigqueueinfo    (__NR_Linux + 178)
-#define __NR_rt_sigsuspend      (__NR_Linux + 179)
-#define __NR_chown              (__NR_Linux + 180)
-#define __NR_setsockopt         (__NR_Linux + 181)
-#define __NR_getsockopt         (__NR_Linux + 182)
-#define __NR_sendmsg            (__NR_Linux + 183)
-#define __NR_recvmsg            (__NR_Linux + 184)
-#define __NR_semop              (__NR_Linux + 185)
-#define __NR_semget             (__NR_Linux + 186)
-#define __NR_semctl             (__NR_Linux + 187)
-#define __NR_msgsnd             (__NR_Linux + 188)
-#define __NR_msgrcv             (__NR_Linux + 189)
-#define __NR_msgget             (__NR_Linux + 190)
-#define __NR_msgctl             (__NR_Linux + 191)
-#define __NR_shmat              (__NR_Linux + 192)
-#define __NR_shmdt              (__NR_Linux + 193)
-#define __NR_shmget             (__NR_Linux + 194)
-#define __NR_shmctl             (__NR_Linux + 195)
-#define __NR_getpmsg            (__NR_Linux + 196) /* not used */
-#define __NR_putpmsg            (__NR_Linux + 197) /* not used */
-#define __NR_lstat64            (__NR_Linux + 198)
-#define __NR_truncate64         (__NR_Linux + 199)
-#define __NR_ftruncate64        (__NR_Linux + 200)
-#define __NR_getdents64         (__NR_Linux + 201)
-#define __NR_fcntl64            (__NR_Linux + 202)
-#define __NR_attrctl            (__NR_Linux + 203) /* not used */
-#define __NR_acl_get            (__NR_Linux + 204) /* not used */
-#define __NR_acl_set            (__NR_Linux + 205) /* not used */
-#define __NR_gettid             (__NR_Linux + 206)
-#define __NR_readahead          (__NR_Linux + 207)
-#define __NR_tkill              (__NR_Linux + 208)
-#define __NR_sendfile64         (__NR_Linux + 209)
-#define __NR_futex              (__NR_Linux + 210)
-#define __NR_sched_setaffinity  (__NR_Linux + 211)
-#define __NR_sched_getaffinity  (__NR_Linux + 212)
-#define __NR_set_thread_area    (__NR_Linux + 213) /* not used */
-#define __NR_get_thread_area    (__NR_Linux + 214) /* not used */
-#define __NR_io_setup           (__NR_Linux + 215)
-#define __NR_io_destroy         (__NR_Linux + 216)
-#define __NR_io_getevents       (__NR_Linux + 217)
-#define __NR_io_submit          (__NR_Linux + 218)
-#define __NR_io_cancel          (__NR_Linux + 219)
-#define __NR_alloc_hugepages    (__NR_Linux + 220) /* not used */
-#define __NR_free_hugepages     (__NR_Linux + 221) /* not used */
-#define __NR_exit_group         (__NR_Linux + 222)
-#define __NR_lookup_dcookie     (__NR_Linux + 223)
-#define __NR_epoll_create       (__NR_Linux + 224)
-#define __NR_epoll_ctl          (__NR_Linux + 225)
-#define __NR_epoll_wait         (__NR_Linux + 226)
-#define __NR_remap_file_pages   (__NR_Linux + 227)
-#define __NR_semtimedop         (__NR_Linux + 228)
-#define __NR_mq_open            (__NR_Linux + 229)
-#define __NR_mq_unlink          (__NR_Linux + 230)
-#define __NR_mq_timedsend       (__NR_Linux + 231)
-#define __NR_mq_timedreceive    (__NR_Linux + 232)
-#define __NR_mq_notify          (__NR_Linux + 233)
-#define __NR_mq_getsetattr      (__NR_Linux + 234)
-#define __NR_waitid		(__NR_Linux + 235)
-#define __NR_fadvise64_64	(__NR_Linux + 236)
-#define __NR_set_tid_address	(__NR_Linux + 237)
-#define __NR_setxattr		(__NR_Linux + 238)
-#define __NR_lsetxattr		(__NR_Linux + 239)
-#define __NR_fsetxattr		(__NR_Linux + 240)
-#define __NR_getxattr		(__NR_Linux + 241)
-#define __NR_lgetxattr		(__NR_Linux + 242)
-#define __NR_fgetxattr		(__NR_Linux + 243)
-#define __NR_listxattr		(__NR_Linux + 244)
-#define __NR_llistxattr		(__NR_Linux + 245)
-#define __NR_flistxattr		(__NR_Linux + 246)
-#define __NR_removexattr	(__NR_Linux + 247)
-#define __NR_lremovexattr	(__NR_Linux + 248)
-#define __NR_fremovexattr	(__NR_Linux + 249)
-#define __NR_timer_create	(__NR_Linux + 250)
-#define __NR_timer_settime	(__NR_Linux + 251)
-#define __NR_timer_gettime	(__NR_Linux + 252)
-#define __NR_timer_getoverrun	(__NR_Linux + 253)
-#define __NR_timer_delete	(__NR_Linux + 254)
-#define __NR_clock_settime	(__NR_Linux + 255)
-#define __NR_clock_gettime	(__NR_Linux + 256)
-#define __NR_clock_getres	(__NR_Linux + 257)
-#define __NR_clock_nanosleep	(__NR_Linux + 258)
-#define __NR_tgkill		(__NR_Linux + 259)
-#define __NR_mbind		(__NR_Linux + 260)
-#define __NR_get_mempolicy	(__NR_Linux + 261)
-#define __NR_set_mempolicy	(__NR_Linux + 262)
-#define __NR_vserver		(__NR_Linux + 263) /* not used */
-#define __NR_add_key		(__NR_Linux + 264)
-#define __NR_request_key	(__NR_Linux + 265)
-#define __NR_keyctl		(__NR_Linux + 266)
-#define __NR_ioprio_set		(__NR_Linux + 267)
-#define __NR_ioprio_get		(__NR_Linux + 268)
-#define __NR_inotify_init	(__NR_Linux + 269)
-#define __NR_inotify_add_watch	(__NR_Linux + 270)
-#define __NR_inotify_rm_watch	(__NR_Linux + 271)
-#define __NR_migrate_pages	(__NR_Linux + 272)
-#define __NR_pselect6		(__NR_Linux + 273)
-#define __NR_ppoll		(__NR_Linux + 274)
-#define __NR_openat		(__NR_Linux + 275)
-#define __NR_mkdirat		(__NR_Linux + 276)
-#define __NR_mknodat		(__NR_Linux + 277)
-#define __NR_fchownat		(__NR_Linux + 278)
-#define __NR_futimesat		(__NR_Linux + 279)
-#define __NR_fstatat64		(__NR_Linux + 280)
-#define __NR_unlinkat		(__NR_Linux + 281)
-#define __NR_renameat		(__NR_Linux + 282)
-#define __NR_linkat		(__NR_Linux + 283)
-#define __NR_symlinkat		(__NR_Linux + 284)
-#define __NR_readlinkat		(__NR_Linux + 285)
-#define __NR_fchmodat		(__NR_Linux + 286)
-#define __NR_faccessat		(__NR_Linux + 287)
-#define __NR_unshare		(__NR_Linux + 288)
-#define __NR_set_robust_list	(__NR_Linux + 289)
-#define __NR_get_robust_list	(__NR_Linux + 290)
-#define __NR_splice		(__NR_Linux + 291)
-#define __NR_sync_file_range	(__NR_Linux + 292)
-#define __NR_tee		(__NR_Linux + 293)
-#define __NR_vmsplice		(__NR_Linux + 294)
-#define __NR_move_pages		(__NR_Linux + 295)
-#define __NR_getcpu		(__NR_Linux + 296)
-#define __NR_epoll_pwait	(__NR_Linux + 297)
-#define __NR_statfs64		(__NR_Linux + 298)
-#define __NR_fstatfs64		(__NR_Linux + 299)
-#define __NR_kexec_load		(__NR_Linux + 300)
-#define __NR_utimensat		(__NR_Linux + 301)
-#define __NR_signalfd		(__NR_Linux + 302)
-#define __NR_timerfd		(__NR_Linux + 303) /* not used */
-#define __NR_eventfd		(__NR_Linux + 304)
-#define __NR_fallocate		(__NR_Linux + 305)
-#define __NR_timerfd_create	(__NR_Linux + 306)
-#define __NR_timerfd_settime	(__NR_Linux + 307)
-#define __NR_timerfd_gettime	(__NR_Linux + 308)
-#define __NR_signalfd4		(__NR_Linux + 309)
-#define __NR_eventfd2		(__NR_Linux + 310)
-#define __NR_epoll_create1	(__NR_Linux + 311)
-#define __NR_dup3		(__NR_Linux + 312)
-#define __NR_pipe2		(__NR_Linux + 313)
-#define __NR_inotify_init1	(__NR_Linux + 314)
-#define __NR_preadv		(__NR_Linux + 315)
-#define __NR_pwritev		(__NR_Linux + 316)
-#define __NR_rt_tgsigqueueinfo	(__NR_Linux + 317)
-#define __NR_perf_event_open	(__NR_Linux + 318)
-#define __NR_recvmmsg		(__NR_Linux + 319)
-#define __NR_accept4		(__NR_Linux + 320)
-#define __NR_prlimit64		(__NR_Linux + 321)
-#define __NR_fanotify_init	(__NR_Linux + 322)
-#define __NR_fanotify_mark	(__NR_Linux + 323)
-#define __NR_clock_adjtime	(__NR_Linux + 324)
-#define __NR_name_to_handle_at	(__NR_Linux + 325)
-#define __NR_open_by_handle_at	(__NR_Linux + 326)
-#define __NR_syncfs		(__NR_Linux + 327)
-#define __NR_setns		(__NR_Linux + 328)
-#define __NR_sendmmsg		(__NR_Linux + 329)
-#define __NR_process_vm_readv	(__NR_Linux + 330)
-#define __NR_process_vm_writev	(__NR_Linux + 331)
-#define __NR_kcmp		(__NR_Linux + 332)
-#define __NR_finit_module	(__NR_Linux + 333)
-#define __NR_sched_setattr	(__NR_Linux + 334)
-#define __NR_sched_getattr	(__NR_Linux + 335)
-#define __NR_utimes		(__NR_Linux + 336)
-#define __NR_renameat2		(__NR_Linux + 337)
-#define __NR_seccomp		(__NR_Linux + 338)
-#define __NR_getrandom		(__NR_Linux + 339)
-#define __NR_memfd_create	(__NR_Linux + 340)
-#define __NR_bpf		(__NR_Linux + 341)
-#define __NR_execveat		(__NR_Linux + 342)
-#define __NR_membarrier		(__NR_Linux + 343)
-#define __NR_userfaultfd	(__NR_Linux + 344)
-#define __NR_mlock2		(__NR_Linux + 345)
-#define __NR_copy_file_range	(__NR_Linux + 346)
-#define __NR_preadv2		(__NR_Linux + 347)
-#define __NR_pwritev2		(__NR_Linux + 348)
-#define __NR_statx		(__NR_Linux + 349)
-#define __NR_io_pgetevents	(__NR_Linux + 350)
-
-#ifdef __KERNEL__
-#define __NR_syscalls           351
+#define __NR_Linux           0
+#ifdef CONFIG_64BIT
+#include <asm/unistd_64.h>
+#else
+#include <asm/unistd_32.h>
 #endif
 
-#define LINUX_GATEWAY_ADDR      0x100
+#define LINUX_GATEWAY_ADDR   0x100
 
 #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index f453997..2523b83 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -923,18 +923,10 @@ ENTRY(lws_table)
 END(lws_table)
 	/* End of lws table */
 
-	.align 8
-ENTRY(sys_call_table)
-	.export sys_call_table,data
-#include "syscall_table.S"
-END(sys_call_table)
-
+#include "syscall_table_32.S"
 #ifdef CONFIG_64BIT
-	.align 8
-ENTRY(sys_call_table64)
 #define SYSCALL_TABLE_64BIT
-#include "syscall_table.S"
-END(sys_call_table64)
+#include "syscall_table_64.S"
 #endif
 
 	/*
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
deleted file mode 100644
index fe3f2a4..0000000
--- a/arch/parisc/kernel/syscall_table.S
+++ /dev/null
@@ -1,459 +0,0 @@
-/*    System Call Table
- *
- *    Copyright (C) 1999-2004 Matthew Wilcox <willy at parisc-linux.org>
- *    Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
- *    Copyright (C) 2000 Alan Modra <amodra at parisc-linux.org>
- *    Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
- *    Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
- *    Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
- *    Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
- *    Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org>
- *    Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org>
- *    Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
- *    Copyright (C) 2001-2007 Helge Deller <deller at parisc-linux.org>
- *    Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
- *    Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
- *    Copyright (C) 2005-2006 Kyle McMartin <kyle at parisc-linux.org>
- *
- *    This program is free software; you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation; either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    This program is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with this program; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
-/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
- * narrow palinux.  Use ENTRY_DIFF for those where a 32-bit specific
- * implementation is required on wide palinux.  Use ENTRY_COMP where
- * the compatibility layer has a useful 32-bit implementation.
- */
-#define ENTRY_SAME(_name_) .dword sys_##_name_
-#define ENTRY_DIFF(_name_) .dword sys32_##_name_
-#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented
-#define ENTRY_OURS(_name_) .dword parisc_##_name_
-#define ENTRY_COMP(_name_) .dword compat_sys_##_name_
-#elif defined(CONFIG_64BIT) && defined(SYSCALL_TABLE_64BIT)
-#define ENTRY_SAME(_name_) .dword sys_##_name_
-#define ENTRY_DIFF(_name_) .dword sys_##_name_
-#define ENTRY_UHOH(_name_) .dword sys_##_name_
-#define ENTRY_OURS(_name_) .dword sys_##_name_
-#define ENTRY_COMP(_name_) .dword sys_##_name_
-#else
-#define ENTRY_SAME(_name_) .word sys_##_name_
-#define ENTRY_DIFF(_name_) .word sys_##_name_
-#define ENTRY_UHOH(_name_) .word sys_##_name_
-#define ENTRY_OURS(_name_) .word parisc_##_name_
-#define ENTRY_COMP(_name_) .word sys_##_name_
-#endif
-
-90:	ENTRY_SAME(restart_syscall)	/* 0 */
-91:	ENTRY_SAME(exit)
-	ENTRY_SAME(fork_wrapper)
-	ENTRY_SAME(read)
-	ENTRY_SAME(write)
-	ENTRY_COMP(open)		/* 5 */
-	ENTRY_SAME(close)
-	ENTRY_SAME(waitpid)
-	ENTRY_SAME(creat)
-	ENTRY_SAME(link)
-	ENTRY_SAME(unlink)		/* 10 */
-	ENTRY_COMP(execve)
-	ENTRY_SAME(chdir)
-	/* See comments in kernel/time.c!!! Maybe we don't need this? */
-	ENTRY_COMP(time)
-	ENTRY_SAME(mknod)
-	ENTRY_SAME(chmod)		/* 15 */
-	ENTRY_SAME(lchown)
-	ENTRY_SAME(socket)
-	/* struct stat is MAYBE identical wide and narrow ?? */
-	ENTRY_COMP(newstat)
-	ENTRY_COMP(lseek)
-	ENTRY_SAME(getpid)		/* 20 */
-	/* the 'void * data' parameter may need re-packing in wide */
-	ENTRY_COMP(mount)
-	/* concerned about struct sockaddr in wide/narrow */
-	/* ---> I think sockaddr is OK unless the compiler packs the struct */
-	/*      differently to align the char array */
-	ENTRY_SAME(bind)
-	ENTRY_SAME(setuid)
-	ENTRY_SAME(getuid)
-	ENTRY_COMP(stime)		/* 25 */
-	ENTRY_COMP(ptrace)
-	ENTRY_SAME(alarm)
-	/* see stat comment */
-	ENTRY_COMP(newfstat)
-	ENTRY_SAME(pause)
-	/* struct utimbuf uses time_t which might vary */
-	ENTRY_COMP(utime)		/* 30 */
-	/* struct sockaddr... */
-	ENTRY_SAME(connect)
-	ENTRY_SAME(listen)
-	ENTRY_SAME(access)
-	ENTRY_SAME(nice)
-	/* struct sockaddr... */
-	ENTRY_SAME(accept)		/* 35 */
-	ENTRY_SAME(sync)
-	ENTRY_SAME(kill)
-	ENTRY_SAME(rename)
-	ENTRY_SAME(mkdir)
-	ENTRY_SAME(rmdir)		/* 40 */
-	ENTRY_SAME(dup)
-	ENTRY_SAME(pipe)
-	ENTRY_COMP(times)
-	/* struct sockaddr... */
-	ENTRY_SAME(getsockname)
-	/* it seems possible brk() could return a >4G pointer... */
-	ENTRY_SAME(brk)			/* 45 */
-	ENTRY_SAME(setgid)
-	ENTRY_SAME(getgid)
-	ENTRY_SAME(signal)
-	ENTRY_SAME(geteuid)
-	ENTRY_SAME(getegid)		/* 50 */
-	ENTRY_SAME(acct)
-	ENTRY_SAME(umount)
-	/* struct sockaddr... */
-	ENTRY_SAME(getpeername)
-	ENTRY_COMP(ioctl)
-	ENTRY_COMP(fcntl)		/* 55 */
-	ENTRY_SAME(socketpair)
-	ENTRY_SAME(setpgid)
-	ENTRY_SAME(send)
-	ENTRY_SAME(newuname)
-	ENTRY_SAME(umask)		/* 60 */
-	ENTRY_SAME(chroot)
-	ENTRY_COMP(ustat)
-	ENTRY_SAME(dup2)
-	ENTRY_SAME(getppid)
-	ENTRY_SAME(getpgrp)		/* 65 */
-	ENTRY_SAME(setsid)
-	ENTRY_SAME(pivot_root)
-	/* I don't like this */
-	ENTRY_UHOH(sgetmask)
-	ENTRY_UHOH(ssetmask)
-	ENTRY_SAME(setreuid)		/* 70 */
-	ENTRY_SAME(setregid)
-	ENTRY_SAME(mincore)
-	ENTRY_COMP(sigpending)
-	ENTRY_SAME(sethostname)
-	/* Following 3 have linux-common-code structs containing longs -( */
-	ENTRY_COMP(setrlimit)		/* 75 */
-	ENTRY_COMP(getrlimit)
-	ENTRY_COMP(getrusage)
-	/* struct timeval and timezone are maybe?? consistent wide and narrow */
-	ENTRY_COMP(gettimeofday)
-	ENTRY_COMP(settimeofday)
-	ENTRY_SAME(getgroups)		/* 80 */
-	ENTRY_SAME(setgroups)
-	/* struct socketaddr... */
-	ENTRY_SAME(sendto)
-	ENTRY_SAME(symlink)
-	/* see stat comment */
-	ENTRY_COMP(newlstat)
-	ENTRY_SAME(readlink)		/* 85 */
-	ENTRY_SAME(ni_syscall)	/* was uselib */
-	ENTRY_SAME(swapon)
-	ENTRY_SAME(reboot)
-	ENTRY_SAME(mmap2)
-	ENTRY_SAME(mmap)		/* 90 */
-	ENTRY_SAME(munmap)
-	ENTRY_COMP(truncate)
-	ENTRY_COMP(ftruncate)
-	ENTRY_SAME(fchmod)
-	ENTRY_SAME(fchown)		/* 95 */
-	ENTRY_SAME(getpriority)
-	ENTRY_SAME(setpriority)
-	ENTRY_SAME(recv)
-	ENTRY_COMP(statfs)
-	ENTRY_COMP(fstatfs)		/* 100 */
-	ENTRY_SAME(stat64)
-	ENTRY_SAME(ni_syscall)	/* was socketcall */
-	ENTRY_SAME(syslog)
-	/* even though manpage says struct timeval contains longs, ours has
-	 * time_t and suseconds_t -- both of which are safe wide/narrow */
-	ENTRY_COMP(setitimer)
-	ENTRY_COMP(getitimer)		/* 105 */
-	ENTRY_SAME(capget)
-	ENTRY_SAME(capset)
-	ENTRY_OURS(pread64)
-	ENTRY_OURS(pwrite64)
-	ENTRY_SAME(getcwd)		/* 110 */
-	ENTRY_SAME(vhangup)
-	ENTRY_SAME(fstat64)
-	ENTRY_SAME(vfork_wrapper)
-	/* struct rusage contains longs... */
-	ENTRY_COMP(wait4)
-	ENTRY_SAME(swapoff)		/* 115 */
-	ENTRY_COMP(sysinfo)
-	ENTRY_SAME(shutdown)
-	ENTRY_SAME(fsync)
-	ENTRY_SAME(madvise)
-	ENTRY_SAME(clone_wrapper)	/* 120 */
-	ENTRY_SAME(setdomainname)
-	ENTRY_COMP(sendfile)
-	/* struct sockaddr... */
-	ENTRY_SAME(recvfrom)
-	/* struct timex contains longs */
-	ENTRY_COMP(adjtimex)
-	ENTRY_SAME(mprotect)		/* 125 */
-	/* old_sigset_t forced to 32 bits.  Beware glibc sigset_t */
-	ENTRY_COMP(sigprocmask)
-	ENTRY_SAME(ni_syscall)	/* create_module */
-	ENTRY_SAME(init_module)
-	ENTRY_SAME(delete_module)
-	ENTRY_SAME(ni_syscall)		/* 130: get_kernel_syms */
-	/* time_t inside struct dqblk */
-	ENTRY_SAME(quotactl)
-	ENTRY_SAME(getpgid)
-	ENTRY_SAME(fchdir)
-	ENTRY_SAME(bdflush)
-	ENTRY_SAME(sysfs)		/* 135 */
-	ENTRY_OURS(personality)
-	ENTRY_SAME(ni_syscall)	/* for afs_syscall */
-	ENTRY_SAME(setfsuid)
-	ENTRY_SAME(setfsgid)
-	/* I think this might work */
-	ENTRY_SAME(llseek)		/* 140 */
-	ENTRY_COMP(getdents)
-	/* it is POSSIBLE that select will be OK because even though fd_set
-	 * contains longs, the macros and sizes are clever. */
-	ENTRY_COMP(select)
-	ENTRY_SAME(flock)
-	ENTRY_SAME(msync)
-	/* struct iovec contains pointers */
-	ENTRY_COMP(readv)		/* 145 */
-	ENTRY_COMP(writev)
-	ENTRY_SAME(getsid)
-	ENTRY_SAME(fdatasync)
-	/* struct __sysctl_args is a mess */
-	ENTRY_COMP(sysctl)
-	ENTRY_SAME(mlock)		/* 150 */
-	ENTRY_SAME(munlock)
-	ENTRY_SAME(mlockall)
-	ENTRY_SAME(munlockall)
-	/* struct sched_param is ok for now */
-	ENTRY_SAME(sched_setparam)
-	ENTRY_SAME(sched_getparam)	/* 155 */
-	ENTRY_SAME(sched_setscheduler)
-	ENTRY_SAME(sched_getscheduler)
-	ENTRY_SAME(sched_yield)
-	ENTRY_SAME(sched_get_priority_max)
-	ENTRY_SAME(sched_get_priority_min)	/* 160 */
-	ENTRY_COMP(sched_rr_get_interval)
-	ENTRY_COMP(nanosleep)
-	ENTRY_SAME(mremap)
-	ENTRY_SAME(setresuid)
-	ENTRY_SAME(getresuid)		/* 165 */
-	ENTRY_COMP(sigaltstack)
-	ENTRY_SAME(ni_syscall)		/* query_module */
-	ENTRY_SAME(poll)
-	/* structs contain pointers and an in_addr... */
-	ENTRY_SAME(ni_syscall)		/* was nfsservctl */
-	ENTRY_SAME(setresgid)		/* 170 */
-	ENTRY_SAME(getresgid)
-	ENTRY_SAME(prctl)
-	/* signals need a careful review */
-	ENTRY_SAME(rt_sigreturn_wrapper)
-	ENTRY_COMP(rt_sigaction)
-	ENTRY_COMP(rt_sigprocmask)	/* 175 */
-	ENTRY_COMP(rt_sigpending)
-	ENTRY_COMP(rt_sigtimedwait)
-	/* even though the struct siginfo_t is different, it appears like
-	 * all the paths use values which should be same wide and narrow.
-	 * Also the struct is padded to 128 bytes which means we don't have
-	 * to worry about faulting trying to copy in a larger 64-bit
-	 * struct from a 32-bit user-space app.
-	 */
-	ENTRY_COMP(rt_sigqueueinfo)
-	ENTRY_COMP(rt_sigsuspend)
-	ENTRY_SAME(chown)		/* 180 */
-	/* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */
-	ENTRY_COMP(setsockopt)
-	ENTRY_COMP(getsockopt)
-	ENTRY_COMP(sendmsg)
-	ENTRY_COMP(recvmsg)
-	ENTRY_SAME(semop)		/* 185 */
-	ENTRY_SAME(semget)
-	ENTRY_COMP(semctl)
-	ENTRY_COMP(msgsnd)
-	ENTRY_COMP(msgrcv)
-	ENTRY_SAME(msgget)		/* 190 */
-	ENTRY_COMP(msgctl)
-	ENTRY_COMP(shmat)
-	ENTRY_SAME(shmdt)
-	ENTRY_SAME(shmget)
-	ENTRY_COMP(shmctl)		/* 195 */
-	ENTRY_SAME(ni_syscall)		/* streams1 */
-	ENTRY_SAME(ni_syscall)		/* streams2 */
-	ENTRY_SAME(lstat64)
-	ENTRY_OURS(truncate64)
-	ENTRY_OURS(ftruncate64)		/* 200 */
-	ENTRY_SAME(getdents64)
-	ENTRY_COMP(fcntl64)
-	ENTRY_SAME(ni_syscall)	/* attrctl -- dead */
-	ENTRY_SAME(ni_syscall)	/* acl_get -- dead */
-	ENTRY_SAME(ni_syscall)		/* 205 (acl_set -- dead) */
-	ENTRY_SAME(gettid)
-	ENTRY_OURS(readahead)
-	ENTRY_SAME(tkill)
-	ENTRY_COMP(sendfile64)
-	ENTRY_COMP(futex)		/* 210 */
-	ENTRY_COMP(sched_setaffinity)
-	ENTRY_COMP(sched_getaffinity)
-	ENTRY_SAME(ni_syscall)	/* set_thread_area */
-	ENTRY_SAME(ni_syscall)	/* get_thread_area */
-	ENTRY_COMP(io_setup)		/* 215 */
-	ENTRY_SAME(io_destroy)
-	ENTRY_COMP(io_getevents)
-	ENTRY_COMP(io_submit)
-	ENTRY_SAME(io_cancel)
-	ENTRY_SAME(ni_syscall)		/* 220: was alloc_hugepages */
-	ENTRY_SAME(ni_syscall)		/* was free_hugepages */
-	ENTRY_SAME(exit_group)
-	ENTRY_COMP(lookup_dcookie)
-	ENTRY_SAME(epoll_create)
-	ENTRY_SAME(epoll_ctl)		/* 225 */
-	ENTRY_SAME(epoll_wait)
- 	ENTRY_SAME(remap_file_pages)
-	ENTRY_COMP(semtimedop)
-	ENTRY_COMP(mq_open)
-	ENTRY_SAME(mq_unlink)		/* 230 */
-	ENTRY_COMP(mq_timedsend)
-	ENTRY_COMP(mq_timedreceive)
-	ENTRY_COMP(mq_notify)
-	ENTRY_COMP(mq_getsetattr)
-	ENTRY_COMP(waitid)		/* 235 */
-	ENTRY_OURS(fadvise64_64)
-	ENTRY_SAME(set_tid_address)
-	ENTRY_SAME(setxattr)
-	ENTRY_SAME(lsetxattr)
-	ENTRY_SAME(fsetxattr)		/* 240 */
-	ENTRY_SAME(getxattr)
-	ENTRY_SAME(lgetxattr)
-	ENTRY_SAME(fgetxattr)
-	ENTRY_SAME(listxattr)
-	ENTRY_SAME(llistxattr)		/* 245 */
-	ENTRY_SAME(flistxattr)
-	ENTRY_SAME(removexattr)
-	ENTRY_SAME(lremovexattr)
-	ENTRY_SAME(fremovexattr)
-	ENTRY_COMP(timer_create)	/* 250 */
-	ENTRY_COMP(timer_settime)
-	ENTRY_COMP(timer_gettime)
-	ENTRY_SAME(timer_getoverrun)
-	ENTRY_SAME(timer_delete)
-	ENTRY_COMP(clock_settime)	/* 255 */
-	ENTRY_COMP(clock_gettime)
-	ENTRY_COMP(clock_getres)
-	ENTRY_COMP(clock_nanosleep)
-	ENTRY_SAME(tgkill)
-	ENTRY_COMP(mbind)		/* 260 */
-	ENTRY_COMP(get_mempolicy)
-	ENTRY_COMP(set_mempolicy)
-	ENTRY_SAME(ni_syscall)	/* 263: reserved for vserver */
-	ENTRY_SAME(add_key)
-	ENTRY_SAME(request_key)		/* 265 */
-	ENTRY_COMP(keyctl)
-	ENTRY_SAME(ioprio_set)
-	ENTRY_SAME(ioprio_get)
-	ENTRY_SAME(inotify_init)
-	ENTRY_SAME(inotify_add_watch)	/* 270 */
-	ENTRY_SAME(inotify_rm_watch)
-	ENTRY_SAME(migrate_pages)
-	ENTRY_COMP(pselect6)
-	ENTRY_COMP(ppoll)
-	ENTRY_COMP(openat)		/* 275 */
-	ENTRY_SAME(mkdirat)
-	ENTRY_SAME(mknodat)
-	ENTRY_SAME(fchownat)
-	ENTRY_COMP(futimesat)
-	ENTRY_SAME(fstatat64)		/* 280 */
-	ENTRY_SAME(unlinkat)
-	ENTRY_SAME(renameat)
-	ENTRY_SAME(linkat)
-	ENTRY_SAME(symlinkat)
-	ENTRY_SAME(readlinkat)		/* 285 */
-	ENTRY_SAME(fchmodat)
-	ENTRY_SAME(faccessat)
-	ENTRY_SAME(unshare)
-	ENTRY_COMP(set_robust_list)
-	ENTRY_COMP(get_robust_list)	/* 290 */
-	ENTRY_SAME(splice)
-	ENTRY_OURS(sync_file_range)
-	ENTRY_SAME(tee)
-	ENTRY_COMP(vmsplice)
-	ENTRY_COMP(move_pages)		/* 295 */
-	ENTRY_SAME(getcpu)
-	ENTRY_COMP(epoll_pwait)
-	ENTRY_COMP(statfs64)
-	ENTRY_COMP(fstatfs64)
-	ENTRY_COMP(kexec_load)		/* 300 */
-	ENTRY_COMP(utimensat)
-	ENTRY_COMP(signalfd)
-	ENTRY_SAME(ni_syscall)		/* was timerfd */
-	ENTRY_SAME(eventfd)
-	ENTRY_OURS(fallocate)		/* 305 */
-	ENTRY_SAME(timerfd_create)
-	ENTRY_COMP(timerfd_settime)
-	ENTRY_COMP(timerfd_gettime)
-	ENTRY_COMP(signalfd4)
-	ENTRY_SAME(eventfd2)		/* 310 */
-	ENTRY_SAME(epoll_create1)
-	ENTRY_SAME(dup3)
-	ENTRY_SAME(pipe2)
-	ENTRY_SAME(inotify_init1)
-	ENTRY_COMP(preadv)		/* 315 */
-	ENTRY_COMP(pwritev)
-	ENTRY_COMP(rt_tgsigqueueinfo)
-	ENTRY_SAME(perf_event_open)
-	ENTRY_COMP(recvmmsg)
-	ENTRY_SAME(accept4)		/* 320 */
-	ENTRY_SAME(prlimit64)
-	ENTRY_SAME(fanotify_init)
-	ENTRY_DIFF(fanotify_mark)
-	ENTRY_COMP(clock_adjtime)
-	ENTRY_SAME(name_to_handle_at)	/* 325 */
-	ENTRY_COMP(open_by_handle_at)
-	ENTRY_SAME(syncfs)
-	ENTRY_SAME(setns)
-	ENTRY_COMP(sendmmsg)
-	ENTRY_COMP(process_vm_readv)	/* 330 */
-	ENTRY_COMP(process_vm_writev)
-	ENTRY_SAME(kcmp)
-	ENTRY_SAME(finit_module)
-	ENTRY_SAME(sched_setattr)
-	ENTRY_SAME(sched_getattr)	/* 335 */
-	ENTRY_COMP(utimes)
-	ENTRY_SAME(renameat2)
-	ENTRY_SAME(seccomp)
-	ENTRY_SAME(getrandom)
-	ENTRY_SAME(memfd_create)	/* 340 */
-	ENTRY_SAME(bpf)
-	ENTRY_COMP(execveat)
-	ENTRY_SAME(membarrier)
-	ENTRY_SAME(userfaultfd)
-	ENTRY_SAME(mlock2)		/* 345 */
-	ENTRY_SAME(copy_file_range)
-	ENTRY_COMP(preadv2)
-	ENTRY_COMP(pwritev2)
-	ENTRY_SAME(statx)
-	ENTRY_COMP(io_pgetevents)	/* 350 */
-
-
-.ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
-.error "size of syscall table does not fit value of __NR_Linux_syscalls"
-.endif
-
-#undef ENTRY_SAME
-#undef ENTRY_DIFF
-#undef ENTRY_UHOH
-#undef ENTRY_COMP
-#undef ENTRY_OURS
diff --git a/arch/parisc/kernel/syscall_table_32.S b/arch/parisc/kernel/syscall_table_32.S
new file mode 100644
index 0000000..eec2c9a
--- /dev/null
+++ b/arch/parisc/kernel/syscall_table_32.S
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <linux/linkage.h>
+
+	.align 8
+ENTRY(sys_call_table)
+	.export sys_call_table,data
+#if !defined(CONFIG_64BIT)
+#define __SYSCALL(nr, entry, nargs) .word entry
+#include <asm/syscall_table_32.h>
+#endif
+#undef __SYSCALL
+END(sys_call_table)
+
diff --git a/arch/parisc/kernel/syscall_table_64.S b/arch/parisc/kernel/syscall_table_64.S
new file mode 100644
index 0000000..af915688
--- /dev/null
+++ b/arch/parisc/kernel/syscall_table_64.S
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <linux/linkage.h>
+
+	.align 8
+ENTRY(sys_call_table64)
+#if defined(CONFIG_64BIT) && defined(SYSCALL_TABLE_64BIT)
+#define __SYSCALL(nr, entry, nargs) .dword entry
+#include <asm/syscall_table_64.h>
+#endif
+#undef __SYSCALL
+END(sys_call_table64)
+
+	.align 8
+ENTRY(sys_call_tablec32)
+#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
+#define __SYSCALL(nr, entry, nargs) .dword entry
+#include <asm/syscall_table_c32.h>
+#endif
+#undef __SYSCALL
+END(sys_call_tablec32)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-08  5:16 ` [PATCH v3 4/6] parisc: uapi header and system call table file generation Firoz Khan
@ 2018-10-08  5:16   ` Firoz Khan
  2018-10-08 19:43   ` Helge Deller
  2018-10-09 20:13   ` Helge Deller
  2 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

System call table generation script must be run to generate
unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
will have changes which will invokes the script.

This patch will generate unistd_32/64.h and syscall_table_
32/64/c32.h files by the syscall table generation script
invoked by arch/parisc/Makefile and the generated files against
the removed files will be identical.

The generated uapi header file will be included in uapi/asm/
unistd_32/64.h and generated system call table support file will
be included by arch/sparc/kernel/syscall_table_32/64.S file.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/Makefile                  |   4 +
 arch/parisc/include/asm/Kbuild        |   3 +
 arch/parisc/include/uapi/asm/Kbuild   |   2 +
 arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
 arch/parisc/kernel/syscall.S          |  12 +-
 arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
 arch/parisc/kernel/syscall_table_32.S |  13 +
 arch/parisc/kernel/syscall_table_64.S |  20 ++
 8 files changed, 50 insertions(+), 836 deletions(-)
 delete mode 100644 arch/parisc/kernel/syscall_table.S
 create mode 100644 arch/parisc/kernel/syscall_table_32.S
 create mode 100644 arch/parisc/kernel/syscall_table_64.S

diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 5ce0302..6b217da 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -159,6 +159,10 @@ endef
 
 # we require gcc 3.3 or above to compile the kernel
 archprepare: checkbin
+
+archheaders:
+	$(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all
+
 checkbin:
 	@if test "$(cc-version)" -lt "0303"; then \
 		echo -n "Sorry, GCC v3.3 or above is required to build " ; \
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 2013d63..6b66fb9 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -23,3 +23,6 @@ generic-y += user.h
 generic-y += vga.h
 generic-y += word-at-a-time.h
 generic-y += xor.h
+generic-y += syscall_table_32.h
+generic-y += syscall_table_64.h
+generic-y += syscall_table_c32.h
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
index 286ef5a..04360d9 100644
--- a/arch/parisc/include/uapi/asm/Kbuild
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -7,3 +7,5 @@ generic-y += kvm_para.h
 generic-y += param.h
 generic-y += poll.h
 generic-y += resource.h
+generic-y += unistd_32.h
+generic-y += unistd_64.h
diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
index f10d065..76e3a3b 100644
--- a/arch/parisc/include/uapi/asm/unistd.h
+++ b/arch/parisc/include/uapi/asm/unistd.h
@@ -2,374 +2,13 @@
 #ifndef _UAPI_ASM_PARISC_UNISTD_H_
 #define _UAPI_ASM_PARISC_UNISTD_H_
 
-/*
- * Linux system call numbers.
- *
- * Cary Coutant says that we should just use another syscall gateway
- * page to avoid clashing with the HPUX space, and I think he's right:
- * it will would keep a branch out of our syscall entry path, at the
- * very least.  If we decide to change it later, we can ``just'' tweak
- * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
- * 1024 or something.  Oh, and recompile libc. =)
- */
-
-#define __NR_Linux                0
-#define __NR_restart_syscall      (__NR_Linux + 0)
-#define __NR_exit                 (__NR_Linux + 1)
-#define __NR_fork                 (__NR_Linux + 2)
-#define __NR_read                 (__NR_Linux + 3)
-#define __NR_write                (__NR_Linux + 4)
-#define __NR_open                 (__NR_Linux + 5)
-#define __NR_close                (__NR_Linux + 6)
-#define __NR_waitpid              (__NR_Linux + 7)
-#define __NR_creat                (__NR_Linux + 8)
-#define __NR_link                 (__NR_Linux + 9)
-#define __NR_unlink              (__NR_Linux + 10)
-#define __NR_execve              (__NR_Linux + 11)
-#define __NR_chdir               (__NR_Linux + 12)
-#define __NR_time                (__NR_Linux + 13)
-#define __NR_mknod               (__NR_Linux + 14)
-#define __NR_chmod               (__NR_Linux + 15)
-#define __NR_lchown              (__NR_Linux + 16)
-#define __NR_socket              (__NR_Linux + 17)
-#define __NR_stat                (__NR_Linux + 18)
-#define __NR_lseek               (__NR_Linux + 19)
-#define __NR_getpid              (__NR_Linux + 20)
-#define __NR_mount               (__NR_Linux + 21)
-#define __NR_bind                (__NR_Linux + 22)
-#define __NR_setuid              (__NR_Linux + 23)
-#define __NR_getuid              (__NR_Linux + 24)
-#define __NR_stime               (__NR_Linux + 25)
-#define __NR_ptrace              (__NR_Linux + 26)
-#define __NR_alarm               (__NR_Linux + 27)
-#define __NR_fstat               (__NR_Linux + 28)
-#define __NR_pause               (__NR_Linux + 29)
-#define __NR_utime               (__NR_Linux + 30)
-#define __NR_connect             (__NR_Linux + 31)
-#define __NR_listen              (__NR_Linux + 32)
-#define __NR_access              (__NR_Linux + 33)
-#define __NR_nice                (__NR_Linux + 34)
-#define __NR_accept              (__NR_Linux + 35)
-#define __NR_sync                (__NR_Linux + 36)
-#define __NR_kill                (__NR_Linux + 37)
-#define __NR_rename              (__NR_Linux + 38)
-#define __NR_mkdir               (__NR_Linux + 39)
-#define __NR_rmdir               (__NR_Linux + 40)
-#define __NR_dup                 (__NR_Linux + 41)
-#define __NR_pipe                (__NR_Linux + 42)
-#define __NR_times               (__NR_Linux + 43)
-#define __NR_getsockname         (__NR_Linux + 44)
-#define __NR_brk                 (__NR_Linux + 45)
-#define __NR_setgid              (__NR_Linux + 46)
-#define __NR_getgid              (__NR_Linux + 47)
-#define __NR_signal              (__NR_Linux + 48)
-#define __NR_geteuid             (__NR_Linux + 49)
-#define __NR_getegid             (__NR_Linux + 50)
-#define __NR_acct                (__NR_Linux + 51)
-#define __NR_umount2             (__NR_Linux + 52)
-#define __NR_getpeername         (__NR_Linux + 53)
-#define __NR_ioctl               (__NR_Linux + 54)
-#define __NR_fcntl               (__NR_Linux + 55)
-#define __NR_socketpair          (__NR_Linux + 56)
-#define __NR_setpgid             (__NR_Linux + 57)
-#define __NR_send                (__NR_Linux + 58)
-#define __NR_uname               (__NR_Linux + 59)
-#define __NR_umask               (__NR_Linux + 60)
-#define __NR_chroot              (__NR_Linux + 61)
-#define __NR_ustat               (__NR_Linux + 62)
-#define __NR_dup2                (__NR_Linux + 63)
-#define __NR_getppid             (__NR_Linux + 64)
-#define __NR_getpgrp             (__NR_Linux + 65)
-#define __NR_setsid              (__NR_Linux + 66)
-#define __NR_pivot_root          (__NR_Linux + 67)
-#define __NR_sgetmask            (__NR_Linux + 68)
-#define __NR_ssetmask            (__NR_Linux + 69)
-#define __NR_setreuid            (__NR_Linux + 70)
-#define __NR_setregid            (__NR_Linux + 71)
-#define __NR_mincore             (__NR_Linux + 72)
-#define __NR_sigpending          (__NR_Linux + 73)
-#define __NR_sethostname         (__NR_Linux + 74)
-#define __NR_setrlimit           (__NR_Linux + 75)
-#define __NR_getrlimit           (__NR_Linux + 76)
-#define __NR_getrusage           (__NR_Linux + 77)
-#define __NR_gettimeofday        (__NR_Linux + 78)
-#define __NR_settimeofday        (__NR_Linux + 79)
-#define __NR_getgroups           (__NR_Linux + 80)
-#define __NR_setgroups           (__NR_Linux + 81)
-#define __NR_sendto              (__NR_Linux + 82)
-#define __NR_symlink             (__NR_Linux + 83)
-#define __NR_lstat               (__NR_Linux + 84)
-#define __NR_readlink            (__NR_Linux + 85)
-#define __NR_uselib              (__NR_Linux + 86)
-#define __NR_swapon              (__NR_Linux + 87)
-#define __NR_reboot              (__NR_Linux + 88)
-#define __NR_mmap2               (__NR_Linux + 89)
-#define __NR_mmap                (__NR_Linux + 90)
-#define __NR_munmap              (__NR_Linux + 91)
-#define __NR_truncate            (__NR_Linux + 92)
-#define __NR_ftruncate           (__NR_Linux + 93)
-#define __NR_fchmod              (__NR_Linux + 94)
-#define __NR_fchown              (__NR_Linux + 95)
-#define __NR_getpriority         (__NR_Linux + 96)
-#define __NR_setpriority         (__NR_Linux + 97)
-#define __NR_recv                (__NR_Linux + 98)
-#define __NR_statfs              (__NR_Linux + 99)
-#define __NR_fstatfs            (__NR_Linux + 100)
-#define __NR_stat64             (__NR_Linux + 101)
-/* #define __NR_socketcall         (__NR_Linux + 102) */
-#define __NR_syslog             (__NR_Linux + 103)
-#define __NR_setitimer          (__NR_Linux + 104)
-#define __NR_getitimer          (__NR_Linux + 105)
-#define __NR_capget             (__NR_Linux + 106)
-#define __NR_capset             (__NR_Linux + 107)
-#define __NR_pread64            (__NR_Linux + 108)
-#define __NR_pwrite64           (__NR_Linux + 109)
-#define __NR_getcwd             (__NR_Linux + 110)
-#define __NR_vhangup            (__NR_Linux + 111)
-#define __NR_fstat64            (__NR_Linux + 112)
-#define __NR_vfork              (__NR_Linux + 113)
-#define __NR_wait4              (__NR_Linux + 114)
-#define __NR_swapoff            (__NR_Linux + 115)
-#define __NR_sysinfo            (__NR_Linux + 116)
-#define __NR_shutdown           (__NR_Linux + 117)
-#define __NR_fsync              (__NR_Linux + 118)
-#define __NR_madvise            (__NR_Linux + 119)
-#define __NR_clone              (__NR_Linux + 120)
-#define __NR_setdomainname      (__NR_Linux + 121)
-#define __NR_sendfile           (__NR_Linux + 122)
-#define __NR_recvfrom           (__NR_Linux + 123)
-#define __NR_adjtimex           (__NR_Linux + 124)
-#define __NR_mprotect           (__NR_Linux + 125)
-#define __NR_sigprocmask        (__NR_Linux + 126)
-#define __NR_create_module      (__NR_Linux + 127) /* not used */
-#define __NR_init_module        (__NR_Linux + 128)
-#define __NR_delete_module      (__NR_Linux + 129)
-#define __NR_get_kernel_syms    (__NR_Linux + 130) /* not used */
-#define __NR_quotactl           (__NR_Linux + 131)
-#define __NR_getpgid            (__NR_Linux + 132)
-#define __NR_fchdir             (__NR_Linux + 133)
-#define __NR_bdflush            (__NR_Linux + 134)
-#define __NR_sysfs              (__NR_Linux + 135)
-#define __NR_personality        (__NR_Linux + 136)
-#define __NR_afs_syscall        (__NR_Linux + 137) /* not used */
-#define __NR_setfsuid           (__NR_Linux + 138)
-#define __NR_setfsgid           (__NR_Linux + 139)
-#define __NR__llseek            (__NR_Linux + 140)
-#define __NR_getdents           (__NR_Linux + 141)
-#define __NR__newselect         (__NR_Linux + 142)
-#define __NR_flock              (__NR_Linux + 143)
-#define __NR_msync              (__NR_Linux + 144)
-#define __NR_readv              (__NR_Linux + 145)
-#define __NR_writev             (__NR_Linux + 146)
-#define __NR_getsid             (__NR_Linux + 147)
-#define __NR_fdatasync          (__NR_Linux + 148)
-#define __NR__sysctl            (__NR_Linux + 149)
-#define __NR_mlock              (__NR_Linux + 150)
-#define __NR_munlock            (__NR_Linux + 151)
-#define __NR_mlockall           (__NR_Linux + 152)
-#define __NR_munlockall         (__NR_Linux + 153)
-#define __NR_sched_setparam             (__NR_Linux + 154)
-#define __NR_sched_getparam             (__NR_Linux + 155)
-#define __NR_sched_setscheduler         (__NR_Linux + 156)
-#define __NR_sched_getscheduler         (__NR_Linux + 157)
-#define __NR_sched_yield                (__NR_Linux + 158)
-#define __NR_sched_get_priority_max     (__NR_Linux + 159)
-#define __NR_sched_get_priority_min     (__NR_Linux + 160)
-#define __NR_sched_rr_get_interval      (__NR_Linux + 161)
-#define __NR_nanosleep          (__NR_Linux + 162)
-#define __NR_mremap             (__NR_Linux + 163)
-#define __NR_setresuid          (__NR_Linux + 164)
-#define __NR_getresuid          (__NR_Linux + 165)
-#define __NR_sigaltstack        (__NR_Linux + 166)
-#define __NR_query_module       (__NR_Linux + 167) /* not used */
-#define __NR_poll               (__NR_Linux + 168)
-#define __NR_nfsservctl         (__NR_Linux + 169) /* not used */
-#define __NR_setresgid          (__NR_Linux + 170)
-#define __NR_getresgid          (__NR_Linux + 171)
-#define __NR_prctl              (__NR_Linux + 172)
-#define __NR_rt_sigreturn       (__NR_Linux + 173)
-#define __NR_rt_sigaction       (__NR_Linux + 174)
-#define __NR_rt_sigprocmask     (__NR_Linux + 175)
-#define __NR_rt_sigpending      (__NR_Linux + 176)
-#define __NR_rt_sigtimedwait    (__NR_Linux + 177)
-#define __NR_rt_sigqueueinfo    (__NR_Linux + 178)
-#define __NR_rt_sigsuspend      (__NR_Linux + 179)
-#define __NR_chown              (__NR_Linux + 180)
-#define __NR_setsockopt         (__NR_Linux + 181)
-#define __NR_getsockopt         (__NR_Linux + 182)
-#define __NR_sendmsg            (__NR_Linux + 183)
-#define __NR_recvmsg            (__NR_Linux + 184)
-#define __NR_semop              (__NR_Linux + 185)
-#define __NR_semget             (__NR_Linux + 186)
-#define __NR_semctl             (__NR_Linux + 187)
-#define __NR_msgsnd             (__NR_Linux + 188)
-#define __NR_msgrcv             (__NR_Linux + 189)
-#define __NR_msgget             (__NR_Linux + 190)
-#define __NR_msgctl             (__NR_Linux + 191)
-#define __NR_shmat              (__NR_Linux + 192)
-#define __NR_shmdt              (__NR_Linux + 193)
-#define __NR_shmget             (__NR_Linux + 194)
-#define __NR_shmctl             (__NR_Linux + 195)
-#define __NR_getpmsg            (__NR_Linux + 196) /* not used */
-#define __NR_putpmsg            (__NR_Linux + 197) /* not used */
-#define __NR_lstat64            (__NR_Linux + 198)
-#define __NR_truncate64         (__NR_Linux + 199)
-#define __NR_ftruncate64        (__NR_Linux + 200)
-#define __NR_getdents64         (__NR_Linux + 201)
-#define __NR_fcntl64            (__NR_Linux + 202)
-#define __NR_attrctl            (__NR_Linux + 203) /* not used */
-#define __NR_acl_get            (__NR_Linux + 204) /* not used */
-#define __NR_acl_set            (__NR_Linux + 205) /* not used */
-#define __NR_gettid             (__NR_Linux + 206)
-#define __NR_readahead          (__NR_Linux + 207)
-#define __NR_tkill              (__NR_Linux + 208)
-#define __NR_sendfile64         (__NR_Linux + 209)
-#define __NR_futex              (__NR_Linux + 210)
-#define __NR_sched_setaffinity  (__NR_Linux + 211)
-#define __NR_sched_getaffinity  (__NR_Linux + 212)
-#define __NR_set_thread_area    (__NR_Linux + 213) /* not used */
-#define __NR_get_thread_area    (__NR_Linux + 214) /* not used */
-#define __NR_io_setup           (__NR_Linux + 215)
-#define __NR_io_destroy         (__NR_Linux + 216)
-#define __NR_io_getevents       (__NR_Linux + 217)
-#define __NR_io_submit          (__NR_Linux + 218)
-#define __NR_io_cancel          (__NR_Linux + 219)
-#define __NR_alloc_hugepages    (__NR_Linux + 220) /* not used */
-#define __NR_free_hugepages     (__NR_Linux + 221) /* not used */
-#define __NR_exit_group         (__NR_Linux + 222)
-#define __NR_lookup_dcookie     (__NR_Linux + 223)
-#define __NR_epoll_create       (__NR_Linux + 224)
-#define __NR_epoll_ctl          (__NR_Linux + 225)
-#define __NR_epoll_wait         (__NR_Linux + 226)
-#define __NR_remap_file_pages   (__NR_Linux + 227)
-#define __NR_semtimedop         (__NR_Linux + 228)
-#define __NR_mq_open            (__NR_Linux + 229)
-#define __NR_mq_unlink          (__NR_Linux + 230)
-#define __NR_mq_timedsend       (__NR_Linux + 231)
-#define __NR_mq_timedreceive    (__NR_Linux + 232)
-#define __NR_mq_notify          (__NR_Linux + 233)
-#define __NR_mq_getsetattr      (__NR_Linux + 234)
-#define __NR_waitid		(__NR_Linux + 235)
-#define __NR_fadvise64_64	(__NR_Linux + 236)
-#define __NR_set_tid_address	(__NR_Linux + 237)
-#define __NR_setxattr		(__NR_Linux + 238)
-#define __NR_lsetxattr		(__NR_Linux + 239)
-#define __NR_fsetxattr		(__NR_Linux + 240)
-#define __NR_getxattr		(__NR_Linux + 241)
-#define __NR_lgetxattr		(__NR_Linux + 242)
-#define __NR_fgetxattr		(__NR_Linux + 243)
-#define __NR_listxattr		(__NR_Linux + 244)
-#define __NR_llistxattr		(__NR_Linux + 245)
-#define __NR_flistxattr		(__NR_Linux + 246)
-#define __NR_removexattr	(__NR_Linux + 247)
-#define __NR_lremovexattr	(__NR_Linux + 248)
-#define __NR_fremovexattr	(__NR_Linux + 249)
-#define __NR_timer_create	(__NR_Linux + 250)
-#define __NR_timer_settime	(__NR_Linux + 251)
-#define __NR_timer_gettime	(__NR_Linux + 252)
-#define __NR_timer_getoverrun	(__NR_Linux + 253)
-#define __NR_timer_delete	(__NR_Linux + 254)
-#define __NR_clock_settime	(__NR_Linux + 255)
-#define __NR_clock_gettime	(__NR_Linux + 256)
-#define __NR_clock_getres	(__NR_Linux + 257)
-#define __NR_clock_nanosleep	(__NR_Linux + 258)
-#define __NR_tgkill		(__NR_Linux + 259)
-#define __NR_mbind		(__NR_Linux + 260)
-#define __NR_get_mempolicy	(__NR_Linux + 261)
-#define __NR_set_mempolicy	(__NR_Linux + 262)
-#define __NR_vserver		(__NR_Linux + 263) /* not used */
-#define __NR_add_key		(__NR_Linux + 264)
-#define __NR_request_key	(__NR_Linux + 265)
-#define __NR_keyctl		(__NR_Linux + 266)
-#define __NR_ioprio_set		(__NR_Linux + 267)
-#define __NR_ioprio_get		(__NR_Linux + 268)
-#define __NR_inotify_init	(__NR_Linux + 269)
-#define __NR_inotify_add_watch	(__NR_Linux + 270)
-#define __NR_inotify_rm_watch	(__NR_Linux + 271)
-#define __NR_migrate_pages	(__NR_Linux + 272)
-#define __NR_pselect6		(__NR_Linux + 273)
-#define __NR_ppoll		(__NR_Linux + 274)
-#define __NR_openat		(__NR_Linux + 275)
-#define __NR_mkdirat		(__NR_Linux + 276)
-#define __NR_mknodat		(__NR_Linux + 277)
-#define __NR_fchownat		(__NR_Linux + 278)
-#define __NR_futimesat		(__NR_Linux + 279)
-#define __NR_fstatat64		(__NR_Linux + 280)
-#define __NR_unlinkat		(__NR_Linux + 281)
-#define __NR_renameat		(__NR_Linux + 282)
-#define __NR_linkat		(__NR_Linux + 283)
-#define __NR_symlinkat		(__NR_Linux + 284)
-#define __NR_readlinkat		(__NR_Linux + 285)
-#define __NR_fchmodat		(__NR_Linux + 286)
-#define __NR_faccessat		(__NR_Linux + 287)
-#define __NR_unshare		(__NR_Linux + 288)
-#define __NR_set_robust_list	(__NR_Linux + 289)
-#define __NR_get_robust_list	(__NR_Linux + 290)
-#define __NR_splice		(__NR_Linux + 291)
-#define __NR_sync_file_range	(__NR_Linux + 292)
-#define __NR_tee		(__NR_Linux + 293)
-#define __NR_vmsplice		(__NR_Linux + 294)
-#define __NR_move_pages		(__NR_Linux + 295)
-#define __NR_getcpu		(__NR_Linux + 296)
-#define __NR_epoll_pwait	(__NR_Linux + 297)
-#define __NR_statfs64		(__NR_Linux + 298)
-#define __NR_fstatfs64		(__NR_Linux + 299)
-#define __NR_kexec_load		(__NR_Linux + 300)
-#define __NR_utimensat		(__NR_Linux + 301)
-#define __NR_signalfd		(__NR_Linux + 302)
-#define __NR_timerfd		(__NR_Linux + 303) /* not used */
-#define __NR_eventfd		(__NR_Linux + 304)
-#define __NR_fallocate		(__NR_Linux + 305)
-#define __NR_timerfd_create	(__NR_Linux + 306)
-#define __NR_timerfd_settime	(__NR_Linux + 307)
-#define __NR_timerfd_gettime	(__NR_Linux + 308)
-#define __NR_signalfd4		(__NR_Linux + 309)
-#define __NR_eventfd2		(__NR_Linux + 310)
-#define __NR_epoll_create1	(__NR_Linux + 311)
-#define __NR_dup3		(__NR_Linux + 312)
-#define __NR_pipe2		(__NR_Linux + 313)
-#define __NR_inotify_init1	(__NR_Linux + 314)
-#define __NR_preadv		(__NR_Linux + 315)
-#define __NR_pwritev		(__NR_Linux + 316)
-#define __NR_rt_tgsigqueueinfo	(__NR_Linux + 317)
-#define __NR_perf_event_open	(__NR_Linux + 318)
-#define __NR_recvmmsg		(__NR_Linux + 319)
-#define __NR_accept4		(__NR_Linux + 320)
-#define __NR_prlimit64		(__NR_Linux + 321)
-#define __NR_fanotify_init	(__NR_Linux + 322)
-#define __NR_fanotify_mark	(__NR_Linux + 323)
-#define __NR_clock_adjtime	(__NR_Linux + 324)
-#define __NR_name_to_handle_at	(__NR_Linux + 325)
-#define __NR_open_by_handle_at	(__NR_Linux + 326)
-#define __NR_syncfs		(__NR_Linux + 327)
-#define __NR_setns		(__NR_Linux + 328)
-#define __NR_sendmmsg		(__NR_Linux + 329)
-#define __NR_process_vm_readv	(__NR_Linux + 330)
-#define __NR_process_vm_writev	(__NR_Linux + 331)
-#define __NR_kcmp		(__NR_Linux + 332)
-#define __NR_finit_module	(__NR_Linux + 333)
-#define __NR_sched_setattr	(__NR_Linux + 334)
-#define __NR_sched_getattr	(__NR_Linux + 335)
-#define __NR_utimes		(__NR_Linux + 336)
-#define __NR_renameat2		(__NR_Linux + 337)
-#define __NR_seccomp		(__NR_Linux + 338)
-#define __NR_getrandom		(__NR_Linux + 339)
-#define __NR_memfd_create	(__NR_Linux + 340)
-#define __NR_bpf		(__NR_Linux + 341)
-#define __NR_execveat		(__NR_Linux + 342)
-#define __NR_membarrier		(__NR_Linux + 343)
-#define __NR_userfaultfd	(__NR_Linux + 344)
-#define __NR_mlock2		(__NR_Linux + 345)
-#define __NR_copy_file_range	(__NR_Linux + 346)
-#define __NR_preadv2		(__NR_Linux + 347)
-#define __NR_pwritev2		(__NR_Linux + 348)
-#define __NR_statx		(__NR_Linux + 349)
-#define __NR_io_pgetevents	(__NR_Linux + 350)
-
-#ifdef __KERNEL__
-#define __NR_syscalls           351
+#define __NR_Linux           0
+#ifdef CONFIG_64BIT
+#include <asm/unistd_64.h>
+#else
+#include <asm/unistd_32.h>
 #endif
 
-#define LINUX_GATEWAY_ADDR      0x100
+#define LINUX_GATEWAY_ADDR   0x100
 
 #endif /* _UAPI_ASM_PARISC_UNISTD_H_ */
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index f453997..2523b83 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -923,18 +923,10 @@ ENTRY(lws_table)
 END(lws_table)
 	/* End of lws table */
 
-	.align 8
-ENTRY(sys_call_table)
-	.export sys_call_table,data
-#include "syscall_table.S"
-END(sys_call_table)
-
+#include "syscall_table_32.S"
 #ifdef CONFIG_64BIT
-	.align 8
-ENTRY(sys_call_table64)
 #define SYSCALL_TABLE_64BIT
-#include "syscall_table.S"
-END(sys_call_table64)
+#include "syscall_table_64.S"
 #endif
 
 	/*
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
deleted file mode 100644
index fe3f2a4..0000000
--- a/arch/parisc/kernel/syscall_table.S
+++ /dev/null
@@ -1,459 +0,0 @@
-/*    System Call Table
- *
- *    Copyright (C) 1999-2004 Matthew Wilcox <willy at parisc-linux.org>
- *    Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
- *    Copyright (C) 2000 Alan Modra <amodra at parisc-linux.org>
- *    Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
- *    Copyright (C) 2000 Philipp Rumpf <prumpf with tux.org>
- *    Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
- *    Copyright (C) 2000 David Huggins-Daines <dhd with pobox.org>
- *    Copyright (C) 2000 Grant Grundler <grundler at parisc-linux.org>
- *    Copyright (C) 2001 Richard Hirst <rhirst with parisc-linux.org>
- *    Copyright (C) 2001-2002 Ryan Bradetich <rbrad at parisc-linux.org>
- *    Copyright (C) 2001-2007 Helge Deller <deller at parisc-linux.org>
- *    Copyright (C) 2000-2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
- *    Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
- *    Copyright (C) 2005-2006 Kyle McMartin <kyle at parisc-linux.org>
- *
- *    This program is free software; you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation; either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    This program is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with this program; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
-/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
- * narrow palinux.  Use ENTRY_DIFF for those where a 32-bit specific
- * implementation is required on wide palinux.  Use ENTRY_COMP where
- * the compatibility layer has a useful 32-bit implementation.
- */
-#define ENTRY_SAME(_name_) .dword sys_##_name_
-#define ENTRY_DIFF(_name_) .dword sys32_##_name_
-#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented
-#define ENTRY_OURS(_name_) .dword parisc_##_name_
-#define ENTRY_COMP(_name_) .dword compat_sys_##_name_
-#elif defined(CONFIG_64BIT) && defined(SYSCALL_TABLE_64BIT)
-#define ENTRY_SAME(_name_) .dword sys_##_name_
-#define ENTRY_DIFF(_name_) .dword sys_##_name_
-#define ENTRY_UHOH(_name_) .dword sys_##_name_
-#define ENTRY_OURS(_name_) .dword sys_##_name_
-#define ENTRY_COMP(_name_) .dword sys_##_name_
-#else
-#define ENTRY_SAME(_name_) .word sys_##_name_
-#define ENTRY_DIFF(_name_) .word sys_##_name_
-#define ENTRY_UHOH(_name_) .word sys_##_name_
-#define ENTRY_OURS(_name_) .word parisc_##_name_
-#define ENTRY_COMP(_name_) .word sys_##_name_
-#endif
-
-90:	ENTRY_SAME(restart_syscall)	/* 0 */
-91:	ENTRY_SAME(exit)
-	ENTRY_SAME(fork_wrapper)
-	ENTRY_SAME(read)
-	ENTRY_SAME(write)
-	ENTRY_COMP(open)		/* 5 */
-	ENTRY_SAME(close)
-	ENTRY_SAME(waitpid)
-	ENTRY_SAME(creat)
-	ENTRY_SAME(link)
-	ENTRY_SAME(unlink)		/* 10 */
-	ENTRY_COMP(execve)
-	ENTRY_SAME(chdir)
-	/* See comments in kernel/time.c!!! Maybe we don't need this? */
-	ENTRY_COMP(time)
-	ENTRY_SAME(mknod)
-	ENTRY_SAME(chmod)		/* 15 */
-	ENTRY_SAME(lchown)
-	ENTRY_SAME(socket)
-	/* struct stat is MAYBE identical wide and narrow ?? */
-	ENTRY_COMP(newstat)
-	ENTRY_COMP(lseek)
-	ENTRY_SAME(getpid)		/* 20 */
-	/* the 'void * data' parameter may need re-packing in wide */
-	ENTRY_COMP(mount)
-	/* concerned about struct sockaddr in wide/narrow */
-	/* ---> I think sockaddr is OK unless the compiler packs the struct */
-	/*      differently to align the char array */
-	ENTRY_SAME(bind)
-	ENTRY_SAME(setuid)
-	ENTRY_SAME(getuid)
-	ENTRY_COMP(stime)		/* 25 */
-	ENTRY_COMP(ptrace)
-	ENTRY_SAME(alarm)
-	/* see stat comment */
-	ENTRY_COMP(newfstat)
-	ENTRY_SAME(pause)
-	/* struct utimbuf uses time_t which might vary */
-	ENTRY_COMP(utime)		/* 30 */
-	/* struct sockaddr... */
-	ENTRY_SAME(connect)
-	ENTRY_SAME(listen)
-	ENTRY_SAME(access)
-	ENTRY_SAME(nice)
-	/* struct sockaddr... */
-	ENTRY_SAME(accept)		/* 35 */
-	ENTRY_SAME(sync)
-	ENTRY_SAME(kill)
-	ENTRY_SAME(rename)
-	ENTRY_SAME(mkdir)
-	ENTRY_SAME(rmdir)		/* 40 */
-	ENTRY_SAME(dup)
-	ENTRY_SAME(pipe)
-	ENTRY_COMP(times)
-	/* struct sockaddr... */
-	ENTRY_SAME(getsockname)
-	/* it seems possible brk() could return a >4G pointer... */
-	ENTRY_SAME(brk)			/* 45 */
-	ENTRY_SAME(setgid)
-	ENTRY_SAME(getgid)
-	ENTRY_SAME(signal)
-	ENTRY_SAME(geteuid)
-	ENTRY_SAME(getegid)		/* 50 */
-	ENTRY_SAME(acct)
-	ENTRY_SAME(umount)
-	/* struct sockaddr... */
-	ENTRY_SAME(getpeername)
-	ENTRY_COMP(ioctl)
-	ENTRY_COMP(fcntl)		/* 55 */
-	ENTRY_SAME(socketpair)
-	ENTRY_SAME(setpgid)
-	ENTRY_SAME(send)
-	ENTRY_SAME(newuname)
-	ENTRY_SAME(umask)		/* 60 */
-	ENTRY_SAME(chroot)
-	ENTRY_COMP(ustat)
-	ENTRY_SAME(dup2)
-	ENTRY_SAME(getppid)
-	ENTRY_SAME(getpgrp)		/* 65 */
-	ENTRY_SAME(setsid)
-	ENTRY_SAME(pivot_root)
-	/* I don't like this */
-	ENTRY_UHOH(sgetmask)
-	ENTRY_UHOH(ssetmask)
-	ENTRY_SAME(setreuid)		/* 70 */
-	ENTRY_SAME(setregid)
-	ENTRY_SAME(mincore)
-	ENTRY_COMP(sigpending)
-	ENTRY_SAME(sethostname)
-	/* Following 3 have linux-common-code structs containing longs -( */
-	ENTRY_COMP(setrlimit)		/* 75 */
-	ENTRY_COMP(getrlimit)
-	ENTRY_COMP(getrusage)
-	/* struct timeval and timezone are maybe?? consistent wide and narrow */
-	ENTRY_COMP(gettimeofday)
-	ENTRY_COMP(settimeofday)
-	ENTRY_SAME(getgroups)		/* 80 */
-	ENTRY_SAME(setgroups)
-	/* struct socketaddr... */
-	ENTRY_SAME(sendto)
-	ENTRY_SAME(symlink)
-	/* see stat comment */
-	ENTRY_COMP(newlstat)
-	ENTRY_SAME(readlink)		/* 85 */
-	ENTRY_SAME(ni_syscall)	/* was uselib */
-	ENTRY_SAME(swapon)
-	ENTRY_SAME(reboot)
-	ENTRY_SAME(mmap2)
-	ENTRY_SAME(mmap)		/* 90 */
-	ENTRY_SAME(munmap)
-	ENTRY_COMP(truncate)
-	ENTRY_COMP(ftruncate)
-	ENTRY_SAME(fchmod)
-	ENTRY_SAME(fchown)		/* 95 */
-	ENTRY_SAME(getpriority)
-	ENTRY_SAME(setpriority)
-	ENTRY_SAME(recv)
-	ENTRY_COMP(statfs)
-	ENTRY_COMP(fstatfs)		/* 100 */
-	ENTRY_SAME(stat64)
-	ENTRY_SAME(ni_syscall)	/* was socketcall */
-	ENTRY_SAME(syslog)
-	/* even though manpage says struct timeval contains longs, ours has
-	 * time_t and suseconds_t -- both of which are safe wide/narrow */
-	ENTRY_COMP(setitimer)
-	ENTRY_COMP(getitimer)		/* 105 */
-	ENTRY_SAME(capget)
-	ENTRY_SAME(capset)
-	ENTRY_OURS(pread64)
-	ENTRY_OURS(pwrite64)
-	ENTRY_SAME(getcwd)		/* 110 */
-	ENTRY_SAME(vhangup)
-	ENTRY_SAME(fstat64)
-	ENTRY_SAME(vfork_wrapper)
-	/* struct rusage contains longs... */
-	ENTRY_COMP(wait4)
-	ENTRY_SAME(swapoff)		/* 115 */
-	ENTRY_COMP(sysinfo)
-	ENTRY_SAME(shutdown)
-	ENTRY_SAME(fsync)
-	ENTRY_SAME(madvise)
-	ENTRY_SAME(clone_wrapper)	/* 120 */
-	ENTRY_SAME(setdomainname)
-	ENTRY_COMP(sendfile)
-	/* struct sockaddr... */
-	ENTRY_SAME(recvfrom)
-	/* struct timex contains longs */
-	ENTRY_COMP(adjtimex)
-	ENTRY_SAME(mprotect)		/* 125 */
-	/* old_sigset_t forced to 32 bits.  Beware glibc sigset_t */
-	ENTRY_COMP(sigprocmask)
-	ENTRY_SAME(ni_syscall)	/* create_module */
-	ENTRY_SAME(init_module)
-	ENTRY_SAME(delete_module)
-	ENTRY_SAME(ni_syscall)		/* 130: get_kernel_syms */
-	/* time_t inside struct dqblk */
-	ENTRY_SAME(quotactl)
-	ENTRY_SAME(getpgid)
-	ENTRY_SAME(fchdir)
-	ENTRY_SAME(bdflush)
-	ENTRY_SAME(sysfs)		/* 135 */
-	ENTRY_OURS(personality)
-	ENTRY_SAME(ni_syscall)	/* for afs_syscall */
-	ENTRY_SAME(setfsuid)
-	ENTRY_SAME(setfsgid)
-	/* I think this might work */
-	ENTRY_SAME(llseek)		/* 140 */
-	ENTRY_COMP(getdents)
-	/* it is POSSIBLE that select will be OK because even though fd_set
-	 * contains longs, the macros and sizes are clever. */
-	ENTRY_COMP(select)
-	ENTRY_SAME(flock)
-	ENTRY_SAME(msync)
-	/* struct iovec contains pointers */
-	ENTRY_COMP(readv)		/* 145 */
-	ENTRY_COMP(writev)
-	ENTRY_SAME(getsid)
-	ENTRY_SAME(fdatasync)
-	/* struct __sysctl_args is a mess */
-	ENTRY_COMP(sysctl)
-	ENTRY_SAME(mlock)		/* 150 */
-	ENTRY_SAME(munlock)
-	ENTRY_SAME(mlockall)
-	ENTRY_SAME(munlockall)
-	/* struct sched_param is ok for now */
-	ENTRY_SAME(sched_setparam)
-	ENTRY_SAME(sched_getparam)	/* 155 */
-	ENTRY_SAME(sched_setscheduler)
-	ENTRY_SAME(sched_getscheduler)
-	ENTRY_SAME(sched_yield)
-	ENTRY_SAME(sched_get_priority_max)
-	ENTRY_SAME(sched_get_priority_min)	/* 160 */
-	ENTRY_COMP(sched_rr_get_interval)
-	ENTRY_COMP(nanosleep)
-	ENTRY_SAME(mremap)
-	ENTRY_SAME(setresuid)
-	ENTRY_SAME(getresuid)		/* 165 */
-	ENTRY_COMP(sigaltstack)
-	ENTRY_SAME(ni_syscall)		/* query_module */
-	ENTRY_SAME(poll)
-	/* structs contain pointers and an in_addr... */
-	ENTRY_SAME(ni_syscall)		/* was nfsservctl */
-	ENTRY_SAME(setresgid)		/* 170 */
-	ENTRY_SAME(getresgid)
-	ENTRY_SAME(prctl)
-	/* signals need a careful review */
-	ENTRY_SAME(rt_sigreturn_wrapper)
-	ENTRY_COMP(rt_sigaction)
-	ENTRY_COMP(rt_sigprocmask)	/* 175 */
-	ENTRY_COMP(rt_sigpending)
-	ENTRY_COMP(rt_sigtimedwait)
-	/* even though the struct siginfo_t is different, it appears like
-	 * all the paths use values which should be same wide and narrow.
-	 * Also the struct is padded to 128 bytes which means we don't have
-	 * to worry about faulting trying to copy in a larger 64-bit
-	 * struct from a 32-bit user-space app.
-	 */
-	ENTRY_COMP(rt_sigqueueinfo)
-	ENTRY_COMP(rt_sigsuspend)
-	ENTRY_SAME(chown)		/* 180 */
-	/* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */
-	ENTRY_COMP(setsockopt)
-	ENTRY_COMP(getsockopt)
-	ENTRY_COMP(sendmsg)
-	ENTRY_COMP(recvmsg)
-	ENTRY_SAME(semop)		/* 185 */
-	ENTRY_SAME(semget)
-	ENTRY_COMP(semctl)
-	ENTRY_COMP(msgsnd)
-	ENTRY_COMP(msgrcv)
-	ENTRY_SAME(msgget)		/* 190 */
-	ENTRY_COMP(msgctl)
-	ENTRY_COMP(shmat)
-	ENTRY_SAME(shmdt)
-	ENTRY_SAME(shmget)
-	ENTRY_COMP(shmctl)		/* 195 */
-	ENTRY_SAME(ni_syscall)		/* streams1 */
-	ENTRY_SAME(ni_syscall)		/* streams2 */
-	ENTRY_SAME(lstat64)
-	ENTRY_OURS(truncate64)
-	ENTRY_OURS(ftruncate64)		/* 200 */
-	ENTRY_SAME(getdents64)
-	ENTRY_COMP(fcntl64)
-	ENTRY_SAME(ni_syscall)	/* attrctl -- dead */
-	ENTRY_SAME(ni_syscall)	/* acl_get -- dead */
-	ENTRY_SAME(ni_syscall)		/* 205 (acl_set -- dead) */
-	ENTRY_SAME(gettid)
-	ENTRY_OURS(readahead)
-	ENTRY_SAME(tkill)
-	ENTRY_COMP(sendfile64)
-	ENTRY_COMP(futex)		/* 210 */
-	ENTRY_COMP(sched_setaffinity)
-	ENTRY_COMP(sched_getaffinity)
-	ENTRY_SAME(ni_syscall)	/* set_thread_area */
-	ENTRY_SAME(ni_syscall)	/* get_thread_area */
-	ENTRY_COMP(io_setup)		/* 215 */
-	ENTRY_SAME(io_destroy)
-	ENTRY_COMP(io_getevents)
-	ENTRY_COMP(io_submit)
-	ENTRY_SAME(io_cancel)
-	ENTRY_SAME(ni_syscall)		/* 220: was alloc_hugepages */
-	ENTRY_SAME(ni_syscall)		/* was free_hugepages */
-	ENTRY_SAME(exit_group)
-	ENTRY_COMP(lookup_dcookie)
-	ENTRY_SAME(epoll_create)
-	ENTRY_SAME(epoll_ctl)		/* 225 */
-	ENTRY_SAME(epoll_wait)
- 	ENTRY_SAME(remap_file_pages)
-	ENTRY_COMP(semtimedop)
-	ENTRY_COMP(mq_open)
-	ENTRY_SAME(mq_unlink)		/* 230 */
-	ENTRY_COMP(mq_timedsend)
-	ENTRY_COMP(mq_timedreceive)
-	ENTRY_COMP(mq_notify)
-	ENTRY_COMP(mq_getsetattr)
-	ENTRY_COMP(waitid)		/* 235 */
-	ENTRY_OURS(fadvise64_64)
-	ENTRY_SAME(set_tid_address)
-	ENTRY_SAME(setxattr)
-	ENTRY_SAME(lsetxattr)
-	ENTRY_SAME(fsetxattr)		/* 240 */
-	ENTRY_SAME(getxattr)
-	ENTRY_SAME(lgetxattr)
-	ENTRY_SAME(fgetxattr)
-	ENTRY_SAME(listxattr)
-	ENTRY_SAME(llistxattr)		/* 245 */
-	ENTRY_SAME(flistxattr)
-	ENTRY_SAME(removexattr)
-	ENTRY_SAME(lremovexattr)
-	ENTRY_SAME(fremovexattr)
-	ENTRY_COMP(timer_create)	/* 250 */
-	ENTRY_COMP(timer_settime)
-	ENTRY_COMP(timer_gettime)
-	ENTRY_SAME(timer_getoverrun)
-	ENTRY_SAME(timer_delete)
-	ENTRY_COMP(clock_settime)	/* 255 */
-	ENTRY_COMP(clock_gettime)
-	ENTRY_COMP(clock_getres)
-	ENTRY_COMP(clock_nanosleep)
-	ENTRY_SAME(tgkill)
-	ENTRY_COMP(mbind)		/* 260 */
-	ENTRY_COMP(get_mempolicy)
-	ENTRY_COMP(set_mempolicy)
-	ENTRY_SAME(ni_syscall)	/* 263: reserved for vserver */
-	ENTRY_SAME(add_key)
-	ENTRY_SAME(request_key)		/* 265 */
-	ENTRY_COMP(keyctl)
-	ENTRY_SAME(ioprio_set)
-	ENTRY_SAME(ioprio_get)
-	ENTRY_SAME(inotify_init)
-	ENTRY_SAME(inotify_add_watch)	/* 270 */
-	ENTRY_SAME(inotify_rm_watch)
-	ENTRY_SAME(migrate_pages)
-	ENTRY_COMP(pselect6)
-	ENTRY_COMP(ppoll)
-	ENTRY_COMP(openat)		/* 275 */
-	ENTRY_SAME(mkdirat)
-	ENTRY_SAME(mknodat)
-	ENTRY_SAME(fchownat)
-	ENTRY_COMP(futimesat)
-	ENTRY_SAME(fstatat64)		/* 280 */
-	ENTRY_SAME(unlinkat)
-	ENTRY_SAME(renameat)
-	ENTRY_SAME(linkat)
-	ENTRY_SAME(symlinkat)
-	ENTRY_SAME(readlinkat)		/* 285 */
-	ENTRY_SAME(fchmodat)
-	ENTRY_SAME(faccessat)
-	ENTRY_SAME(unshare)
-	ENTRY_COMP(set_robust_list)
-	ENTRY_COMP(get_robust_list)	/* 290 */
-	ENTRY_SAME(splice)
-	ENTRY_OURS(sync_file_range)
-	ENTRY_SAME(tee)
-	ENTRY_COMP(vmsplice)
-	ENTRY_COMP(move_pages)		/* 295 */
-	ENTRY_SAME(getcpu)
-	ENTRY_COMP(epoll_pwait)
-	ENTRY_COMP(statfs64)
-	ENTRY_COMP(fstatfs64)
-	ENTRY_COMP(kexec_load)		/* 300 */
-	ENTRY_COMP(utimensat)
-	ENTRY_COMP(signalfd)
-	ENTRY_SAME(ni_syscall)		/* was timerfd */
-	ENTRY_SAME(eventfd)
-	ENTRY_OURS(fallocate)		/* 305 */
-	ENTRY_SAME(timerfd_create)
-	ENTRY_COMP(timerfd_settime)
-	ENTRY_COMP(timerfd_gettime)
-	ENTRY_COMP(signalfd4)
-	ENTRY_SAME(eventfd2)		/* 310 */
-	ENTRY_SAME(epoll_create1)
-	ENTRY_SAME(dup3)
-	ENTRY_SAME(pipe2)
-	ENTRY_SAME(inotify_init1)
-	ENTRY_COMP(preadv)		/* 315 */
-	ENTRY_COMP(pwritev)
-	ENTRY_COMP(rt_tgsigqueueinfo)
-	ENTRY_SAME(perf_event_open)
-	ENTRY_COMP(recvmmsg)
-	ENTRY_SAME(accept4)		/* 320 */
-	ENTRY_SAME(prlimit64)
-	ENTRY_SAME(fanotify_init)
-	ENTRY_DIFF(fanotify_mark)
-	ENTRY_COMP(clock_adjtime)
-	ENTRY_SAME(name_to_handle_at)	/* 325 */
-	ENTRY_COMP(open_by_handle_at)
-	ENTRY_SAME(syncfs)
-	ENTRY_SAME(setns)
-	ENTRY_COMP(sendmmsg)
-	ENTRY_COMP(process_vm_readv)	/* 330 */
-	ENTRY_COMP(process_vm_writev)
-	ENTRY_SAME(kcmp)
-	ENTRY_SAME(finit_module)
-	ENTRY_SAME(sched_setattr)
-	ENTRY_SAME(sched_getattr)	/* 335 */
-	ENTRY_COMP(utimes)
-	ENTRY_SAME(renameat2)
-	ENTRY_SAME(seccomp)
-	ENTRY_SAME(getrandom)
-	ENTRY_SAME(memfd_create)	/* 340 */
-	ENTRY_SAME(bpf)
-	ENTRY_COMP(execveat)
-	ENTRY_SAME(membarrier)
-	ENTRY_SAME(userfaultfd)
-	ENTRY_SAME(mlock2)		/* 345 */
-	ENTRY_SAME(copy_file_range)
-	ENTRY_COMP(preadv2)
-	ENTRY_COMP(pwritev2)
-	ENTRY_SAME(statx)
-	ENTRY_COMP(io_pgetevents)	/* 350 */
-
-
-.ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
-.error "size of syscall table does not fit value of __NR_Linux_syscalls"
-.endif
-
-#undef ENTRY_SAME
-#undef ENTRY_DIFF
-#undef ENTRY_UHOH
-#undef ENTRY_COMP
-#undef ENTRY_OURS
diff --git a/arch/parisc/kernel/syscall_table_32.S b/arch/parisc/kernel/syscall_table_32.S
new file mode 100644
index 0000000..eec2c9a
--- /dev/null
+++ b/arch/parisc/kernel/syscall_table_32.S
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <linux/linkage.h>
+
+	.align 8
+ENTRY(sys_call_table)
+	.export sys_call_table,data
+#if !defined(CONFIG_64BIT)
+#define __SYSCALL(nr, entry, nargs) .word entry
+#include <asm/syscall_table_32.h>
+#endif
+#undef __SYSCALL
+END(sys_call_table)
+
diff --git a/arch/parisc/kernel/syscall_table_64.S b/arch/parisc/kernel/syscall_table_64.S
new file mode 100644
index 0000000..af915688
--- /dev/null
+++ b/arch/parisc/kernel/syscall_table_64.S
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <linux/linkage.h>
+
+	.align 8
+ENTRY(sys_call_table64)
+#if defined(CONFIG_64BIT) && defined(SYSCALL_TABLE_64BIT)
+#define __SYSCALL(nr, entry, nargs) .dword entry
+#include <asm/syscall_table_64.h>
+#endif
+#undef __SYSCALL
+END(sys_call_table64)
+
+	.align 8
+ENTRY(sys_call_tablec32)
+#if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT)
+#define __SYSCALL(nr, entry, nargs) .dword entry
+#include <asm/syscall_table_c32.h>
+#endif
+#undef __SYSCALL
+END(sys_call_tablec32)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
                   ` (4 preceding siblings ...)
  2018-10-08  5:16 ` [PATCH v3 4/6] parisc: uapi header and system call table file generation Firoz Khan
@ 2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
  2018-10-08  5:36   ` Helge Deller
  2018-10-08  5:16 ` [PATCH v3 6/6] parisc: syscalls: Ignore nfsservctl for other architectures Firoz Khan
  6 siblings, 2 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
index 4e85293..4334bb7 100644
--- a/arch/parisc/kernel/syscalls/syscall.tbl
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@ -349,4 +349,5 @@
 347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
 348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
 349     common  statx                           sys_statx
-350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
\ No newline at end of file
+350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
+351	common	rseq				sys_rseq			compat_sys_rseq
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  5:16 ` [PATCH v3 5/6] parisc: wire up rseq system call Firoz Khan
@ 2018-10-08  5:16   ` Firoz Khan
  2018-10-08  5:36   ` Helge Deller
  1 sibling, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
index 4e85293..4334bb7 100644
--- a/arch/parisc/kernel/syscalls/syscall.tbl
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@ -349,4 +349,5 @@
 347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
 348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
 349     common  statx                           sys_statx
-350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
\ No newline at end of file
+350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
+351	common	rseq				sys_rseq			compat_sys_rseq
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 6/6] parisc: syscalls: Ignore nfsservctl for other architectures
  2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
                   ` (5 preceding siblings ...)
  2018-10-08  5:16 ` [PATCH v3 5/6] parisc: wire up rseq system call Firoz Khan
@ 2018-10-08  5:16 ` Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
  6 siblings, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

This adds an exception to the syscall table checking script.

nfsservctl entry is only provided on x86, and there is no
reason to add it elsewhere. However, including it on the
syscall table caused a warning for most configurations on
non-x86.

<stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 scripts/checksyscalls.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index ee3dfb5..cf93100 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -150,6 +150,7 @@ cat << EOF
 #define __IGNORE_uselib
 #define __IGNORE__sysctl
 #define __IGNORE_arch_prctl
+#define __IGNORE_nfsservctl
 
 /* ... including the "new" 32-bit uid syscalls */
 #define __IGNORE_lchown32
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* [PATCH v3 6/6] parisc: syscalls: Ignore nfsservctl for other architectures
  2018-10-08  5:16 ` [PATCH v3 6/6] parisc: syscalls: Ignore nfsservctl for other architectures Firoz Khan
@ 2018-10-08  5:16   ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:16 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel,
	marcin.juszkiewicz, firoz.khan

This adds an exception to the syscall table checking script.

nfsservctl entry is only provided on x86, and there is no
reason to add it elsewhere. However, including it on the
syscall table caused a warning for most configurations on
non-x86.

<stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 scripts/checksyscalls.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index ee3dfb5..cf93100 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -150,6 +150,7 @@ cat << EOF
 #define __IGNORE_uselib
 #define __IGNORE__sysctl
 #define __IGNORE_arch_prctl
+#define __IGNORE_nfsservctl
 
 /* ... including the "new" 32-bit uid syscalls */
 #define __IGNORE_lchown32
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  5:16 ` [PATCH v3 5/6] parisc: wire up rseq system call Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
@ 2018-10-08  5:36   ` Helge Deller
  2018-10-08  5:36     ` Helge Deller
  2018-10-08  5:52     ` Firoz Khan
  1 sibling, 2 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-08  5:36 UTC (permalink / raw)
  To: Firoz Khan, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel, marcin.juszkiewicz

On 08.10.2018 07:16, Firoz Khan wrote:
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ---
>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> index 4e85293..4334bb7 100644
> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> @@ -349,4 +349,5 @@
>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
>  349     common  statx                           sys_statx
> -350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
> \ No newline at end of file
> +350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
> +351	common	rseq				sys_rseq			compat_sys_rseq

You can't add the rseq syscall for parisc yet.
It needs additional code in the kernel for parisc which hasn't been tested yet.
See my initial untested patch at https://patchwork.kernel.org/patch/10495209/

Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  5:36   ` Helge Deller
@ 2018-10-08  5:36     ` Helge Deller
  2018-10-08  5:52     ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-08  5:36 UTC (permalink / raw)
  To: Firoz Khan, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel, marcin.juszkiewicz

On 08.10.2018 07:16, Firoz Khan wrote:
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ---
>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> index 4e85293..4334bb7 100644
> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> @@ -349,4 +349,5 @@
>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
>  349     common  statx                           sys_statx
> -350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
> \ No newline at end of file
> +350	common  io_pgetevents			sys_io_pgetevents		compat_sys_io_pgetevents
> +351	common	rseq				sys_rseq			compat_sys_rseq

You can't add the rseq syscall for parisc yet.
It needs additional code in the kernel for parisc which hasn't been tested yet.
See my initial untested patch at https://patchwork.kernel.org/patch/10495209/

Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  5:36   ` Helge Deller
  2018-10-08  5:36     ` Helge Deller
@ 2018-10-08  5:52     ` Firoz Khan
  2018-10-08  5:52       ` Firoz Khan
  2018-10-08  6:06       ` Helge Deller
  1 sibling, 2 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:52 UTC (permalink / raw)
  To: Helge Deller
  Cc: Kate Stewart, Linux-Arch, Arnd Bergmann, linux-parisc,
	y2038 Mailman List, Greg Kroah-Hartman, James E . J . Bottomley,
	Linux Kernel Mailing List, Marcin Juszkiewicz, Deepa Dinamani,
	Philippe Ombredanne, Thomas Gleixner

Hi Helge,

On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
>
> On 08.10.2018 07:16, Firoz Khan wrote:
> > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > ---
> >  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > index 4e85293..4334bb7 100644
> > --- a/arch/parisc/kernel/syscalls/syscall.tbl
> > +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > @@ -349,4 +349,5 @@
> >  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> >  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> >  349     common  statx                           sys_statx
> > -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > \ No newline at end of file
> > +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > +351  common  rseq                            sys_rseq                        compat_sys_rseq
>
> You can't add the rseq syscall for parisc yet.
> It needs additional code in the kernel for parisc which hasn't been tested yet.
> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/

Thanks for your update!

When I compiled the kernel I got below warnings.

<stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
<stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]

I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
syscall is gone. But we definitely have to keep rseq entry on parisc
architecture.

I can ignore this patch currently as your patch not yet tested.

FYI, I have merged the system call table files based on our previous
discussions.
Please comment on that.

I would appreciate if you can perform a boot test without this patch
on the actual
platform.

Firoz

>
> Helge
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  5:52     ` Firoz Khan
@ 2018-10-08  5:52       ` Firoz Khan
  2018-10-08  6:06       ` Helge Deller
  1 sibling, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  5:52 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
>
> On 08.10.2018 07:16, Firoz Khan wrote:
> > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > ---
> >  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > index 4e85293..4334bb7 100644
> > --- a/arch/parisc/kernel/syscalls/syscall.tbl
> > +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > @@ -349,4 +349,5 @@
> >  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> >  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> >  349     common  statx                           sys_statx
> > -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > \ No newline at end of file
> > +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > +351  common  rseq                            sys_rseq                        compat_sys_rseq
>
> You can't add the rseq syscall for parisc yet.
> It needs additional code in the kernel for parisc which hasn't been tested yet.
> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/

Thanks for your update!

When I compiled the kernel I got below warnings.

<stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
<stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]

I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
syscall is gone. But we definitely have to keep rseq entry on parisc
architecture.

I can ignore this patch currently as your patch not yet tested.

FYI, I have merged the system call table files based on our previous
discussions.
Please comment on that.

I would appreciate if you can perform a boot test without this patch
on the actual
platform.

Firoz

>
> Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  5:52     ` Firoz Khan
  2018-10-08  5:52       ` Firoz Khan
@ 2018-10-08  6:06       ` Helge Deller
  2018-10-08  6:06         ` Helge Deller
  2018-10-08  6:48         ` Firoz Khan
  1 sibling, 2 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-08  6:06 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

On 08.10.2018 07:52, Firoz Khan wrote:
> Hi Helge,
> 
> On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
>>
>> On 08.10.2018 07:16, Firoz Khan wrote:
>>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
>>> ---
>>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
>>> index 4e85293..4334bb7 100644
>>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
>>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
>>> @@ -349,4 +349,5 @@
>>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
>>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
>>>  349     common  statx                           sys_statx
>>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
>>> \ No newline at end of file
>>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
>>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
>>
>> You can't add the rseq syscall for parisc yet.
>> It needs additional code in the kernel for parisc which hasn't been tested yet.
>> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> 
> Thanks for your update!
> 
> When I compiled the kernel I got below warnings.
> 
> <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> 
> I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> syscall is gone. But we definitely have to keep rseq entry on parisc
> architecture.

I prefer to keep the warning for rseq for now.
It reminds me that we still may want the rseq syscall.
If the warning is a problem, you may simply add the __IGNORE_rseq define. 

> I can ignore this patch currently as your patch not yet tested.
> 
> FYI, I have merged the system call table files based on our previous
> discussions.
> Please comment on that.

I'll do after testing.

Thanks!
Helge
 
> I would appreciate if you can perform a boot test without this patch
> on the actual
> platform.
> 
> Firoz
> 
>>
>> Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  6:06       ` Helge Deller
@ 2018-10-08  6:06         ` Helge Deller
  2018-10-08  6:48         ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-08  6:06 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

On 08.10.2018 07:52, Firoz Khan wrote:
> Hi Helge,
> 
> On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
>>
>> On 08.10.2018 07:16, Firoz Khan wrote:
>>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
>>> ---
>>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
>>> index 4e85293..4334bb7 100644
>>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
>>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
>>> @@ -349,4 +349,5 @@
>>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
>>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
>>>  349     common  statx                           sys_statx
>>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
>>> \ No newline at end of file
>>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
>>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
>>
>> You can't add the rseq syscall for parisc yet.
>> It needs additional code in the kernel for parisc which hasn't been tested yet.
>> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> 
> Thanks for your update!
> 
> When I compiled the kernel I got below warnings.
> 
> <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> 
> I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> syscall is gone. But we definitely have to keep rseq entry on parisc
> architecture.

I prefer to keep the warning for rseq for now.
It reminds me that we still may want the rseq syscall.
If the warning is a problem, you may simply add the __IGNORE_rseq define. 

> I can ignore this patch currently as your patch not yet tested.
> 
> FYI, I have merged the system call table files based on our previous
> discussions.
> Please comment on that.

I'll do after testing.

Thanks!
Helge
 
> I would appreciate if you can perform a boot test without this patch
> on the actual
> platform.
> 
> Firoz
> 
>>
>> Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  6:06       ` Helge Deller
  2018-10-08  6:06         ` Helge Deller
@ 2018-10-08  6:48         ` Firoz Khan
  2018-10-08  6:48           ` Firoz Khan
  2018-10-08  8:23           ` Geert Uytterhoeven
  1 sibling, 2 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  6:48 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
>
> On 08.10.2018 07:52, Firoz Khan wrote:
> > Hi Helge,
> >
> > On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
> >>
> >> On 08.10.2018 07:16, Firoz Khan wrote:
> >>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> >>> ---
> >>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> >>> index 4e85293..4334bb7 100644
> >>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> >>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> >>> @@ -349,4 +349,5 @@
> >>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> >>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> >>>  349     common  statx                           sys_statx
> >>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> >>> \ No newline at end of file
> >>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> >>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
> >>
> >> You can't add the rseq syscall for parisc yet.
> >> It needs additional code in the kernel for parisc which hasn't been tested yet.
> >> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> >
> > Thanks for your update!
> >
> > When I compiled the kernel I got below warnings.
> >
> > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> >
> > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > syscall is gone. But we definitely have to keep rseq entry on parisc
> > architecture.
>
> I prefer to keep the warning for rseq for now.

I'm fine with this.

> It reminds me that we still may want the rseq syscall.
> If the warning is a problem, you may simply add the __IGNORE_rseq define.

But I still feel to keep an IGNORE entry, so once you test your patch; we can
remove IGNORE entry and update the syscall.tbl.

I would like you to take the call here :)

Thanks
Firoz

>
> > I can ignore this patch currently as your patch not yet tested.
> >
> > FYI, I have merged the system call table files based on our previous
> > discussions.
> > Please comment on that.
>
> I'll do after testing.
>
> Thanks!
> Helge
>
> > I would appreciate if you can perform a boot test without this patch
> > on the actual
> > platform.
> >
> > Firoz
> >
> >>
> >> Helge
>

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  6:48         ` Firoz Khan
@ 2018-10-08  6:48           ` Firoz Khan
  2018-10-08  8:23           ` Geert Uytterhoeven
  1 sibling, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  6:48 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
>
> On 08.10.2018 07:52, Firoz Khan wrote:
> > Hi Helge,
> >
> > On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
> >>
> >> On 08.10.2018 07:16, Firoz Khan wrote:
> >>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> >>> ---
> >>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> >>> index 4e85293..4334bb7 100644
> >>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> >>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> >>> @@ -349,4 +349,5 @@
> >>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> >>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> >>>  349     common  statx                           sys_statx
> >>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> >>> \ No newline at end of file
> >>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> >>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
> >>
> >> You can't add the rseq syscall for parisc yet.
> >> It needs additional code in the kernel for parisc which hasn't been tested yet.
> >> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> >
> > Thanks for your update!
> >
> > When I compiled the kernel I got below warnings.
> >
> > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> >
> > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > syscall is gone. But we definitely have to keep rseq entry on parisc
> > architecture.
>
> I prefer to keep the warning for rseq for now.

I'm fine with this.

> It reminds me that we still may want the rseq syscall.
> If the warning is a problem, you may simply add the __IGNORE_rseq define.

But I still feel to keep an IGNORE entry, so once you test your patch; we can
remove IGNORE entry and update the syscall.tbl.

I would like you to take the call here :)

Thanks
Firoz

>
> > I can ignore this patch currently as your patch not yet tested.
> >
> > FYI, I have merged the system call table files based on our previous
> > discussions.
> > Please comment on that.
>
> I'll do after testing.
>
> Thanks!
> Helge
>
> > I would appreciate if you can perform a boot test without this patch
> > on the actual
> > platform.
> >
> > Firoz
> >
> >>
> >> Helge
>

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08  5:16 ` [PATCH v3 3/6] parisc: add system call table generation support Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
@ 2018-10-08  7:33   ` Firoz Khan
  2018-10-08  7:33     ` Firoz Khan
  2018-10-08 13:03     ` Eugene Syromiatnikov
  1 sibling, 2 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  7:33 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> The system call tables are in different format in all
> architecture and it will be difficult to manually add or
> modify the system calls in the respective files. To make
> it easy by keeping a script and which'll generate the
> header file and syscall table file so this change will
> unify them across all architectures.
>
> The system call table generation script is added in
> syscalls directory which contain the script to generate
> both uapi header file system call table generation file
> and syscall.tbl file which'll be the input for the
> scripts.
>
> syscall.tbl contains the list of available system calls
> along with system call number and corresponding entry point.
> Add a new system call in this architecture will be possible
> by adding new entry in the syscall.tbl file.
>
> Adding a new table entry consisting of:
>         - System call number.
>         - ABI.
>         - System call name.
>         - Entry point name.
>         - Compat entry name, if required.
>
> syscallhdr.sh and syscalltbl.sh will generate uapi header-
> unistd_32/64.h and syscall_table_32/64/c32.h files respect-
> ively. File syscall_table_32/64/c32.h is included by sys-
> call.S - the real system call table. Both .sh files will
> parse the content syscall.tbl to generate the header and
> table files.
>
> ARM, s390 and x86 architecuture does have the similar support.
> I leverage their implementation to come up with a generic
> solution.
>
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ---
>  arch/parisc/kernel/syscalls/Makefile      |  55 +++++
>  arch/parisc/kernel/syscalls/syscall.tbl   | 352 ++++++++++++++++++++++++++++++
>  arch/parisc/kernel/syscalls/syscallhdr.sh |  35 +++
>  arch/parisc/kernel/syscalls/syscalltbl.sh |  41 ++++
>  4 files changed, 483 insertions(+)
>  create mode 100644 arch/parisc/kernel/syscalls/Makefile
>  create mode 100644 arch/parisc/kernel/syscalls/syscall.tbl
>  create mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh
>  create mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh
>
> diff --git a/arch/parisc/kernel/syscalls/Makefile b/arch/parisc/kernel/syscalls/Makefile
> new file mode 100644
> index 0000000..e4c9c63
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/Makefile
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: GPL-2.0
> +kapi := arch/$(SRCARCH)/include/generated/asm
> +uapi := arch/$(SRCARCH)/include/generated/uapi/asm
> +
> +_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
> +         $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
> +
> +syscall := $(srctree)/$(src)/syscall.tbl
> +syshdr := $(srctree)/$(src)/syscallhdr.sh
> +systbl := $(srctree)/$(src)/syscalltbl.sh
> +
> +quiet_cmd_syshdr = SYSHDR  $@
> +      cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'  \
> +                  '$(syshdr_abi_$(basetarget))'          \
> +                  '$(syshdr_pfx_$(basetarget))'          \
> +                  '$(syshdr_offset_$(basetarget))'
> +
> +quiet_cmd_systbl = SYSTBL  $@
> +      cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'  \
> +                   '$(systbl_abi_$(basetarget))'          \
> +                  '$(systbl_offset_$(basetarget))'
> +
> +syshdr_abi_unistd_32 := common,32
> +syshdr_offset_unistd_32 := __NR_Linux
> +$(uapi)/unistd_32.h: $(syscall) $(syshdr)
> +       $(call if_changed,syshdr)
> +
> +syshdr_abi_unistd_64 := common,64
> +syshdr_offset_unistd_64 := __NR_Linux
> +$(uapi)/unistd_64.h: $(syscall) $(syshdr)
> +       $(call if_changed,syshdr)
> +
> +systbl_abi_syscall_table_32 := common,32
> +$(kapi)/syscall_table_32.h: $(syscall) $(systbl)
> +       $(call if_changed,systbl)
> +
> +systbl_abi_syscall_table_64 := common,64
> +$(kapi)/syscall_table_64.h: $(syscall) $(systbl)
> +       $(call if_changed,systbl)
> +
> +systbl_abi_syscall_table_c32 := common,64
> +$(kapi)/syscall_table_c32.h: $(syscall) $(systbl)
> +       $(call if_changed,systbl)
> +
> +uapisyshdr-y                   += unistd_32.h unistd_64.h
> +kapisyshdr-y                   += syscall_table_32.h     \
> +                                   syscall_table_64.h     \
> +                                   syscall_table_c32.h
> +
> +targets        += $(uapisyshdr-y) $(kapisyshdr-y)
> +
> +PHONY += all
> +all: $(addprefix $(uapi)/,$(uapisyshdr-y))
> +all: $(addprefix $(kapi)/,$(kapisyshdr-y))
> +       @:
> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> new file mode 100644
> index 0000000..4e85293
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> @@ -0,0 +1,352 @@
> +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
> +#
> +# system call numbers and entry vectors for parisc
> +#
> +# The format is:
> +# <number> <abi> <name> <entry point> <compat entry point>
> +#
> +# The <abi> can be common, 64, or 32 for this file.
> +#
> +0       common  restart_syscall                 sys_restart_syscall
> +1       common  exit                            sys_exit
> +2       common  fork                            sys_fork_wrapper
> +3       common  read                            sys_read
> +4       common  write                           sys_write
> +5       common  open                            sys_open                        compat_sys_open
> +6       common  close                           sys_close
> +7       common  waitpid                         sys_waitpid
> +8       common  creat                           sys_creat
> +9       common  link                            sys_link
> +10      common  unlink                          sys_unlink
> +11      common  execve                          sys_execve                      compat_sys_execve
> +12      common  chdir                           sys_chdir
> +13      common  time                            sys_time                        compat_sys_time
> +14      common  mknod                           sys_mknod
> +15      common  chmod                           sys_chmod
> +16      common  lchown                          sys_lchown
> +17      common  socket                          sys_socket
> +18      common  stat                            sys_newstat                     compat_sys_newstat
> +19      common  lseek                           sys_lseek                       compat_sys_lseek
> +20      common  getpid                          sys_getpid
> +21      common  mount                           sys_mount                       compat_sys_mount
> +22      common  bind                            sys_bind
> +23      common  setuid                          sys_setuid
> +24      common  getuid                          sys_getuid
> +25      common  stime                           sys_stime                       compat_sys_stime
> +26      common  ptrace                          sys_ptrace                      compat_sys_ptrace
> +27      common  alarm                           sys_alarm
> +28      common  fstat                           sys_newfstat                    compat_sys_newfstat
> +29      common  pause                           sys_pause
> +30      common  utime                           sys_utime                       compat_sys_utime
> +31      common  connect                         sys_connect
> +32      common  listen                          sys_listen
> +33      common  access                          sys_access
> +34      common  nice                            sys_nice
> +35      common  accept                          sys_accept
> +36      common  sync                            sys_sync
> +37      common  kill                            sys_kill
> +38      common  rename                          sys_rename
> +39      common  mkdir                           sys_mkdir
> +40      common  rmdir                           sys_rmdir
> +41      common  dup                             sys_dup
> +42      common  pipe                            sys_pipe
> +43      common  times                           sys_times                       compat_sys_times
> +44      common  getsockname                     sys_getsockname
> +45      common  brk                             sys_brk
> +46      common  setgid                          sys_setgid
> +47      common  getgid                          sys_getgid
> +48      common  signal                          sys_signal
> +49      common  geteuid                         sys_geteuid
> +50      common  getegid                         sys_getegid
> +51      common  acct                            sys_acct
> +52      common  umount2                         sys_umount
> +53      common  getpeername                     sys_getpeername
> +54      common  ioctl                           sys_ioctl                       compat_sys_ioctl
> +55      common  fcntl                           sys_fcntl                       compat_sys_fcntl
> +56      common  socketpair                      sys_socketpair
> +57      common  setpgid                         sys_setpgid
> +58      common  send                            sys_send
> +59      common  uname                           sys_newuname
> +60      common  umask                           sys_umask
> +61      common  chroot                          sys_chroot
> +62      common  ustat                           sys_ustat                       compat_sys_ustat
> +63      common  dup2                            sys_dup2
> +64      common  getppid                         sys_getppid
> +65      common  getpgrp                         sys_getpgrp
> +66      common  setsid                          sys_setsid
> +67      common  pivot_root                      sys_pivot_root
> +68      common  sgetmask                        sys_sgetmask                    sys32_unimplemented
> +69      common  ssetmask                        sys_ssetmask                    sys32_unimplemented
> +70      common  setreuid                        sys_setreuid
> +71      common  setregid                        sys_setregid
> +72      common  mincore                         sys_mincore
> +73      common  sigpending                      sys_sigpending                  compat_sys_sigpending
> +74      common  sethostname                     sys_sethostname
> +75      common  setrlimit                       sys_setrlimit                   compat_sys_setrlimit
> +76      common  getrlimit                       sys_getrlimit                   compat_sys_getrlimit
> +77      common  getrusage                       sys_getrusage                   compat_sys_getrusage
> +78      common  gettimeofday                    sys_gettimeofday                compat_sys_gettimeofday
> +79      common  settimeofday                    sys_settimeofday                compat_sys_settimeofday
> +80      common  getgroups                       sys_getgroups
> +81      common  setgroups                       sys_setgroups
> +82      common  sendto                          sys_sendto
> +83      common  symlink                         sys_symlink
> +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> +85      common  readlink                        sys_readlink
> +86      common  uselib                          sys_ni_syscall
> +87      common  swapon                          sys_swapon
> +88      common  reboot                          sys_reboot
> +89      common  mmap2                           sys_mmap2
> +90      common  mmap                            sys_mmap
> +91      common  munmap                          sys_munmap
> +92      common  truncate                        sys_truncate                    compat_sys_truncate
> +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> +94      common  fchmod                          sys_fchmod
> +95      common  fchown                          sys_fchown
> +96      common  getpriority                     sys_getpriority
> +97      common  setpriority                     sys_setpriority
> +98      common  recv                            sys_recv
> +99      common  statfs                          sys_statfs                      compat_sys_statfs
> +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> +101     common  stat64                          sys_stat64
> +103     common  syslog                          sys_syslog
> +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> +106     common  capget                          sys_capget
> +107     common  capset                          sys_capset
> +108     32      pread64                         parisc_pread64
> +108     64      pread64                         sys_pread64                     parisc_pread64
> +109     32      pwrite64                        parisc_pwrite64
> +109     64      pwrite64                        sys_pwrite64                    parisc_pwrite64
> +110     common  getcwd                          sys_getcwd
> +111     common  vhangup                         sys_vhangup
> +112     common  fstat64                         sys_fstat64
> +113     common  vfork                           sys_vfork_wrapper
> +114     common  wait4                           sys_wait4                       compat_sys_wait4
> +115     common  swapoff                         sys_swapoff
> +116     common  sysinfo                         sys_sysinfo                     compat_sys_sysinfo
> +117     common  shutdown                        sys_shutdown
> +118     common  fsync                           sys_fsync
> +119     common  madvise                         sys_madvise
> +120     common  clone                           sys_clone_wrapper
> +121     common  setdomainname                   sys_setdomainname
> +122     common  sendfile                        sys_sendfile                    compat_sys_sendfile
> +123     common  recvfrom                        sys_recvfrom
> +124     common  adjtimex                        sys_adjtimex                    compat_sys_adjtimex
> +125     common  mprotect                        sys_mprotect
> +126     common  sigprocmask                     sys_sigprocmask                 compat_sys_sigprocmask
> +128     common  init_module                     sys_init_module
> +129     common  delete_module                   sys_delete_module
> +131     common  quotactl                        sys_quotactl
> +132     common  getpgid                         sys_getpgid
> +133     common  fchdir                          sys_fchdir
> +134     common  bdflush                         sys_bdflush
> +135     common  sysfs                           sys_sysfs
> +136     32      personality                     parisc_personality
> +136     64      personality                     sys_personality                 parisc_personality
> +138     common  setfsuid                        sys_setfsuid
> +139     common  setfsgid                        sys_setfsgid
> +140     common  _llseek                         sys_llseek
> +141     common  getdents                        sys_getdents                    compat_sys_getdents
> +142     common  _newselect                      sys_select                      compat_sys_select
> +143     common  flock                           sys_flock
> +144     common  msync                           sys_msync
> +145     common  readv                           sys_readv                       compat_sys_readv
> +146     common  writev                          sys_writev                      compat_sys_writev
> +147     common  getsid                          sys_getsid
> +148     common  fdatasync                       sys_fdatasync
> +149     common  _sysctl                         sys_sysctl                      compat_sys_sysctl
> +150     common  mlock                           sys_mlock
> +151     common  munlock                         sys_munlock
> +152     common  mlockall                        sys_mlockall
> +153     common  munlockall                      sys_munlockall
> +154     common  sched_setparam                  sys_sched_setparam
> +155     common  sched_getparam                  sys_sched_getparam
> +156     common  sched_setscheduler              sys_sched_setscheduler
> +157     common  sched_getscheduler              sys_sched_getscheduler
> +158     common  sched_yield                     sys_sched_yield
> +159     common  sched_get_priority_max          sys_sched_get_priority_max
> +160     common  sched_get_priority_min          sys_sched_get_priority_min
> +161     common  sched_rr_get_interval           sys_sched_rr_get_interval       compat_sys_sched_rr_get_interval
> +162     common  nanosleep                       sys_nanosleep                   compat_sys_nanosleep
> +163     common  mremap                          sys_mremap
> +164     common  setresuid                       sys_setresuid
> +165     common  getresuid                       sys_getresuid
> +166     common  sigaltstack                     sys_sigaltstack                 compat_sys_sigaltstack
> +168     common  poll                            sys_poll
> +170     common  setresgid                       sys_setresgid
> +171     common  getresgid                       sys_getresgid
> +172     common  prctl                           sys_prctl
> +173     common  rt_sigreturn                    sys_rt_sigreturn
> +174     common  rt_sigaction                    sys_rt_sigaction                compat_sys_rt_sigaction
> +175     common  rt_sigprocmask                  sys_rt_sigprocmask              compat_sys_rt_sigprocmask
> +176     common  rt_sigpending                   sys_rt_sigpending               compat_sys_rt_sigpending
> +177     common  rt_sigtimedwait                 sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
> +178     common  rt_sigqueueinfo                 sys_rt_sigqueueinfo             compat_sys_rt_sigqueueinfo
> +179     common  rt_sigsuspend                   sys_rt_sigsuspend               compat_sys_rt_sigsuspend
> +180     common  chown                           sys_chown
> +181     common  setsockopt                      sys_setsockopt                  compat_sys_setsockopt
> +182     common  getsockopt                      sys_getsockopt                  compat_sys_getsockopt
> +183     common  sendmsg                         sys_sendmsg                     compat_sys_sendmsg
> +184     common  recvmsg                         sys_recvmsg                     compat_sys_recvmsg
> +185     common  semop                           sys_semop
> +186     common  semget                          sys_semget
> +187     common  semctl                          sys_semctl                      compat_sys_semctl
> +188     common  msgsnd                          sys_msgsnd                      compat_sys_msgsnd
> +189     common  msgrcv                          sys_msgrcv                      compat_sys_msgrcv
> +190     common  msgget                          sys_msgget
> +191     common  msgctl                          sys_msgctl                      compat_sys_msgctl
> +192     common  shmat                           sys_shmat                       compat_sys_shmat
> +193     common  shmdt                           sys_shmdt
> +194     common  shmget                          sys_shmget
> +195     common  shmctl                          sys_shmctl                      compat_sys_shmctl
> +198     common  lstat64                         sys_lstat64
> +199     32      truncate64                      parisc_truncate64
> +199     64      truncate64                      sys_truncate64                  parisc_truncate64
> +200     32      ftruncate64                     parisc_ftruncate64
> +200     64      ftruncate64                     sys_ftruncate64                 parisc_ftruncate64
> +201     common  getdents64                      sys_getdents64
> +202     common  fcntl64                         sys_fcntl64                     compat_sys_fcntl64
> +206     common  gettid                          sys_gettid
> +207     32      readahead                       parisc_readahead
> +207     64      readahead                       sys_readahead                   parisc_readahead
> +208     common  tkill                           sys_tkill
> +209     common  sendfile64                      sys_sendfile64                  compat_sys_sendfile64
> +210     common  futex                           sys_futex                       compat_sys_futex
> +211     common  sched_setaffinity               sys_sched_setaffinity           compat_sys_sched_setaffinity
> +212     common  sched_getaffinity               sys_sched_getaffinity           compat_sys_sched_getaffinity
> +215     common  io_setup                        sys_io_setup                    compat_sys_io_setup
> +216     common  io_destroy                      sys_io_destroy
> +217     common  io_getevents                    sys_io_getevents                compat_sys_io_getevents
> +218     common  io_submit                       sys_io_submit                   compat_sys_io_submit
> +219     common  io_cancel                       sys_io_cancel
> +222     common  exit_group                      sys_exit_group
> +223     common  lookup_dcookie                  sys_lookup_dcookie              compat_sys_lookup_dcookie
> +224     common  epoll_create                    sys_epoll_create
> +225     common  epoll_ctl                       sys_epoll_ctl
> +226     common  epoll_wait                      sys_epoll_wait
> +227     common  remap_file_pages                sys_remap_file_pages
> +228     common  semtimedop                      sys_semtimedop                  compat_sys_semtimedop
> +229     common  mq_open                         sys_mq_open                     compat_sys_mq_open
> +230     common  mq_unlink                       sys_mq_unlink
> +231     common  mq_timedsend                    sys_mq_timedsend                compat_sys_mq_timedsend
> +232     common  mq_timedreceive                 sys_mq_timedreceive             compat_sys_mq_timedreceive
> +233     common  mq_notify                       sys_mq_notify                   compat_sys_mq_notify
> +234     common  mq_getsetattr                   sys_mq_getsetattr               compat_sys_mq_getsetattr
> +235     common  waitid                          sys_waitid                      compat_sys_waitid
> +236     32      fadvise64_64                    parisc_fadvise64_64
> +236     64      fadvise64_64                    sys_fadvise64_64                parisc_fadvise64_64
> +237     common  set_tid_address                 sys_set_tid_address
> +238     common  setxattr                        sys_setxattr
> +239     common  lsetxattr                       sys_lsetxattr
> +240     common  fsetxattr                       sys_fsetxattr
> +241     common  getxattr                        sys_getxattr
> +242     common  lgetxattr                       sys_lgetxattr
> +243     common  fgetxattr                       sys_fgetxattr
> +244     common  listxattr                       sys_listxattr
> +245     common  llistxattr                      sys_llistxattr
> +246     common  flistxattr                      sys_flistxattr
> +247     common  removexattr                     sys_removexattr
> +248     common  lremovexattr                    sys_lremovexattr
> +249     common  fremovexattr                    sys_fremovexattr
> +250     common  timer_create                    sys_timer_create                compat_sys_timer_create
> +251     common  timer_settime                   sys_timer_settime               compat_sys_timer_settime
> +252     common  timer_gettime                   sys_timer_gettime               compat_sys_timer_gettime
> +253     common  timer_getoverrun                sys_timer_getoverrun
> +254     common  timer_delete                    sys_timer_delete
> +255     common  clock_settime                   sys_clock_settime               compat_sys_clock_settime
> +256     common  clock_gettime                   sys_clock_gettime               compat_sys_clock_gettime
> +257     common  clock_getres                    sys_clock_getres                compat_sys_clock_getres
> +258     common  clock_nanosleep                 sys_clock_nanosleep             compat_sys_clock_nanosleep
> +259     common  tgkill                          sys_tgkill
> +260     common  mbind                           sys_mbind                       compat_sys_mbind
> +261     common  get_mempolicy                   sys_get_mempolicy               compat_sys_get_mempolicy
> +262     common  set_mempolicy                   sys_set_mempolicy               compat_sys_set_mempolicy
> +264     common  add_key                         sys_add_key
> +265     common  request_key                     sys_request_key
> +266     common  keyctl                          sys_keyctl                      compat_sys_keyctl
> +267     common  ioprio_set                      sys_ioprio_set
> +268     common  ioprio_get                      sys_ioprio_get
> +269     common  inotify_init                    sys_inotify_init
> +270     common  inotify_add_watch               sys_inotify_add_watch
> +271     common  inotify_rm_watch                sys_inotify_rm_watch
> +272     common  migrate_pages                   sys_migrate_pages
> +273     common  pselect6                        sys_pselect6                    compat_sys_pselect6
> +274     common  ppoll                           sys_ppoll                       compat_sys_ppoll
> +275     common  openat                          sys_openat                      compat_sys_openat
> +276     common  mkdirat                         sys_mkdirat
> +277     common  mknodat                         sys_mknodat
> +278     common  fchownat                        sys_fchownat
> +279     common  futimesat                       sys_futimesat                   compat_sys_futimesat
> +280     common  fstatat64                       sys_fstatat64
> +281     common  unlinkat                        sys_unlinkat
> +282     common  renameat                        sys_renameat
> +283     common  linkat                          sys_linkat
> +284     common  symlinkat                       sys_symlinkat
> +285     common  readlinkat                      sys_readlinkat
> +286     common  fchmodat                        sys_fchmodat
> +287     common  faccessat                       sys_faccessat
> +288     common  unshare                         sys_unshare
> +289     common  set_robust_list                 sys_set_robust_list             compat_sys_set_robust_list
> +290     common  get_robust_list                 sys_get_robust_list             compat_sys_get_robust_list
> +291     common  splice                          sys_splice
> +292     32      sync_file_range                 parisc_sync_file_range
> +292     64      sync_file_range                 sys_sync_file_range             parisc_sync_file_range
> +293     common  tee                             sys_tee
> +294     common  vmsplice                        sys_vmsplice                    compat_sys_vmsplice
> +295     common  move_pages                      sys_move_pages                  compat_sys_move_pages
> +296     common  getcpu                          sys_getcpu
> +297     common  epoll_pwait                     sys_epoll_pwait                 compat_sys_epoll_pwait
> +298     common  statfs64                        sys_statfs64                    compat_sys_statfs64
> +299     common  fstatfs64                       sys_fstatfs64                   compat_sys_fstatfs64
> +300     common  kexec_load                      sys_kexec_load                  compat_sys_kexec_load
> +301     common  utimensat                       sys_utimensat                   compat_sys_utimensat
> +302     common  signalfd                        sys_signalfd                    compat_sys_signalfd
> +304     common  eventfd                         sys_eventfd
> +305     32      fallocate                       parisc_fallocate
> +305     64      fallocate                       sys_fallocate                   parisc_fallocate
> +306     common  timerfd_create                  sys_timerfd_create
> +307     common  timerfd_settime                 sys_timerfd_settime             compat_sys_timerfd_settime
> +308     common  timerfd_gettime                 sys_timerfd_gettime             compat_sys_timerfd_gettime
> +309     common  signalfd4                       sys_signalfd4                   compat_sys_signalfd4
> +310     common  eventfd2                        sys_eventfd2
> +311     common  epoll_create1                   sys_epoll_create1
> +312     common  dup3                            sys_dup3
> +313     common  pipe2                           sys_pipe2
> +314     common  inotify_init1                   sys_inotify_init1
> +315     common  preadv                          sys_preadv                      compat_sys_preadv
> +316     common  pwritev                         sys_pwritev                     compat_sys_pwritev
> +317     common  rt_tgsigqueueinfo               sys_rt_tgsigqueueinfo           compat_sys_rt_tgsigqueueinfo
> +318     common  perf_event_open                 sys_perf_event_open
> +319     common  recvmmsg                        sys_recvmmsg                    compat_sys_recvmmsg
> +320     common  accept4                         sys_accept4
> +321     common  prlimit64                       sys_prlimit64
> +322     common  fanotify_init                   sys_fanotify_init
> +323     common  fanotify_mark                   sys_fanotify_mark               sys32_fanotify_mark
> +324     common  clock_adjtime                   sys_clock_adjtime               compat_sys_clock_adjtime
> +325     common  name_to_handle_at               sys_name_to_handle_at
> +326     common  open_by_handle_at               sys_open_by_handle_at           compat_sys_open_by_handle_at
> +327     common  syncfs                          sys_syncfs
> +328     common  setns                           sys_setns
> +329     common  sendmmsg                        sys_sendmmsg                    compat_sys_sendmmsg
> +330     common  process_vm_readv                sys_process_vm_readv            compat_sys_process_vm_readv
> +331     common  process_vm_writev               sys_process_vm_writev           compat_sys_process_vm_writev
> +332     common  kcmp                            sys_kcmp
> +333     common  finit_module                    sys_finit_module
> +334     common  sched_setattr                   sys_sched_setattr
> +335     common  sched_getattr                   sys_sched_getattr
> +336     common  utimes                          sys_utimes                      compat_sys_utimes
> +337     common  renameat2                       sys_renameat2
> +338     common  seccomp                         sys_seccomp
> +339     common  getrandom                       sys_getrandom
> +340     common  memfd_create                    sys_memfd_create
> +341     common  bpf                             sys_bpf
> +342     common  execveat                        sys_execveat                    compat_sys_execveat
> +343     common  membarrier                      sys_membarrier
> +344     common  userfaultfd                     sys_userfaultfd
> +345     common  mlock2                          sys_mlock2
> +346     common  copy_file_range                 sys_copy_file_range
> +347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> +349     common  statx                           sys_statx
> +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> \ No newline at end of file
> diff --git a/arch/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh
> new file mode 100644
> index 0000000..607d4ca
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscallhdr.sh
> @@ -0,0 +1,35 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +
> +in="$1"
> +out="$2"
> +my_abis=`echo "($3)" | tr ',' '|'`
> +prefix="$4"
> +offset="$5"
> +
> +fileguard=_UAPI_ASM_PARISC_`basename "$out" | sed \
> +    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
> +    -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
> +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> +    echo "#ifndef ${fileguard}"
> +    echo "#define ${fileguard}"
> +    echo ""
> +
> +    nxt=0
> +    while read nr abi name entry compat ; do
> +       if [ -z "$offset" ]; then
> +           echo -e "#define __NR_${prefix}${name}\t$nr"
> +       else
> +           echo -e "#define __NR_${prefix}${name}\t($offset + $nr)"
> +       fi
> +       nxt=$nr
> +       let nxt=nxt+1
> +    done
> +
> +    echo ""
> +    echo "#ifdef __KERNEL__"
> +    echo -e "#define __NR_syscalls\t$nxt"
> +    echo "#endif"
> +    echo ""
> +    echo "#endif /* ${fileguard} */"
> +) > "$out"
> diff --git a/arch/parisc/kernel/syscalls/syscalltbl.sh b/arch/parisc/kernel/syscalls/syscalltbl.sh
> new file mode 100644
> index 0000000..82b0416
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscalltbl.sh
> @@ -0,0 +1,41 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +
> +in="$1"
> +out="$2"
> +my_abis=`echo "($3)" | tr ',' '|'`
> +offset="$4"
> +
> +emit() {
> +    nxt="$1"
> +    nr="$2"
> +    entry="$3"
> +
> +    while [ $nxt -lt $nr ]; do
> +       echo "__SYSCALL($nxt, sys_ni_syscall, )"
> +        let nxt=nxt+1
> +    done
> +    echo "__SYSCALL($nr, $entry, )"
> +}
> +
> +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> +    if [ -z "$offset" ]; then
> +       nxt=0
> +    else
> +       nxt=$offset
> +    fi
> +
> +    while read nr abi name entry compat ; do
> +       if [ ${out: -5} = "c32.h" ]; then
> +           if [ -z "$compat" ]; then
> +               emit $nxt $nr $entry
> +           else
> +               emit $nxt $nr $compat
> +           fi
> +       elif [ ${out: -4} = "64.h" -o  ${out: -4} = "32.h" ]; then
> +           emit $nxt $nr $entry
> +       fi
> +       nxt=$nr
> +        let nxt=nxt+1
> +    done
> +) > "$out"
> --
> 1.9.1
>

I did some stupidity here. will fix now. Thanks!

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08  7:33   ` Firoz Khan
@ 2018-10-08  7:33     ` Firoz Khan
  2018-10-08 13:03     ` Eugene Syromiatnikov
  1 sibling, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  7:33 UTC (permalink / raw)
  To: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> The system call tables are in different format in all
> architecture and it will be difficult to manually add or
> modify the system calls in the respective files. To make
> it easy by keeping a script and which'll generate the
> header file and syscall table file so this change will
> unify them across all architectures.
>
> The system call table generation script is added in
> syscalls directory which contain the script to generate
> both uapi header file system call table generation file
> and syscall.tbl file which'll be the input for the
> scripts.
>
> syscall.tbl contains the list of available system calls
> along with system call number and corresponding entry point.
> Add a new system call in this architecture will be possible
> by adding new entry in the syscall.tbl file.
>
> Adding a new table entry consisting of:
>         - System call number.
>         - ABI.
>         - System call name.
>         - Entry point name.
>         - Compat entry name, if required.
>
> syscallhdr.sh and syscalltbl.sh will generate uapi header-
> unistd_32/64.h and syscall_table_32/64/c32.h files respect-
> ively. File syscall_table_32/64/c32.h is included by sys-
> call.S - the real system call table. Both .sh files will
> parse the content syscall.tbl to generate the header and
> table files.
>
> ARM, s390 and x86 architecuture does have the similar support.
> I leverage their implementation to come up with a generic
> solution.
>
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ---
>  arch/parisc/kernel/syscalls/Makefile      |  55 +++++
>  arch/parisc/kernel/syscalls/syscall.tbl   | 352 ++++++++++++++++++++++++++++++
>  arch/parisc/kernel/syscalls/syscallhdr.sh |  35 +++
>  arch/parisc/kernel/syscalls/syscalltbl.sh |  41 ++++
>  4 files changed, 483 insertions(+)
>  create mode 100644 arch/parisc/kernel/syscalls/Makefile
>  create mode 100644 arch/parisc/kernel/syscalls/syscall.tbl
>  create mode 100644 arch/parisc/kernel/syscalls/syscallhdr.sh
>  create mode 100644 arch/parisc/kernel/syscalls/syscalltbl.sh
>
> diff --git a/arch/parisc/kernel/syscalls/Makefile b/arch/parisc/kernel/syscalls/Makefile
> new file mode 100644
> index 0000000..e4c9c63
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/Makefile
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: GPL-2.0
> +kapi := arch/$(SRCARCH)/include/generated/asm
> +uapi := arch/$(SRCARCH)/include/generated/uapi/asm
> +
> +_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
> +         $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
> +
> +syscall := $(srctree)/$(src)/syscall.tbl
> +syshdr := $(srctree)/$(src)/syscallhdr.sh
> +systbl := $(srctree)/$(src)/syscalltbl.sh
> +
> +quiet_cmd_syshdr = SYSHDR  $@
> +      cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@'  \
> +                  '$(syshdr_abi_$(basetarget))'          \
> +                  '$(syshdr_pfx_$(basetarget))'          \
> +                  '$(syshdr_offset_$(basetarget))'
> +
> +quiet_cmd_systbl = SYSTBL  $@
> +      cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@'  \
> +                   '$(systbl_abi_$(basetarget))'          \
> +                  '$(systbl_offset_$(basetarget))'
> +
> +syshdr_abi_unistd_32 := common,32
> +syshdr_offset_unistd_32 := __NR_Linux
> +$(uapi)/unistd_32.h: $(syscall) $(syshdr)
> +       $(call if_changed,syshdr)
> +
> +syshdr_abi_unistd_64 := common,64
> +syshdr_offset_unistd_64 := __NR_Linux
> +$(uapi)/unistd_64.h: $(syscall) $(syshdr)
> +       $(call if_changed,syshdr)
> +
> +systbl_abi_syscall_table_32 := common,32
> +$(kapi)/syscall_table_32.h: $(syscall) $(systbl)
> +       $(call if_changed,systbl)
> +
> +systbl_abi_syscall_table_64 := common,64
> +$(kapi)/syscall_table_64.h: $(syscall) $(systbl)
> +       $(call if_changed,systbl)
> +
> +systbl_abi_syscall_table_c32 := common,64
> +$(kapi)/syscall_table_c32.h: $(syscall) $(systbl)
> +       $(call if_changed,systbl)
> +
> +uapisyshdr-y                   += unistd_32.h unistd_64.h
> +kapisyshdr-y                   += syscall_table_32.h     \
> +                                   syscall_table_64.h     \
> +                                   syscall_table_c32.h
> +
> +targets        += $(uapisyshdr-y) $(kapisyshdr-y)
> +
> +PHONY += all
> +all: $(addprefix $(uapi)/,$(uapisyshdr-y))
> +all: $(addprefix $(kapi)/,$(kapisyshdr-y))
> +       @:
> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> new file mode 100644
> index 0000000..4e85293
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> @@ -0,0 +1,352 @@
> +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
> +#
> +# system call numbers and entry vectors for parisc
> +#
> +# The format is:
> +# <number> <abi> <name> <entry point> <compat entry point>
> +#
> +# The <abi> can be common, 64, or 32 for this file.
> +#
> +0       common  restart_syscall                 sys_restart_syscall
> +1       common  exit                            sys_exit
> +2       common  fork                            sys_fork_wrapper
> +3       common  read                            sys_read
> +4       common  write                           sys_write
> +5       common  open                            sys_open                        compat_sys_open
> +6       common  close                           sys_close
> +7       common  waitpid                         sys_waitpid
> +8       common  creat                           sys_creat
> +9       common  link                            sys_link
> +10      common  unlink                          sys_unlink
> +11      common  execve                          sys_execve                      compat_sys_execve
> +12      common  chdir                           sys_chdir
> +13      common  time                            sys_time                        compat_sys_time
> +14      common  mknod                           sys_mknod
> +15      common  chmod                           sys_chmod
> +16      common  lchown                          sys_lchown
> +17      common  socket                          sys_socket
> +18      common  stat                            sys_newstat                     compat_sys_newstat
> +19      common  lseek                           sys_lseek                       compat_sys_lseek
> +20      common  getpid                          sys_getpid
> +21      common  mount                           sys_mount                       compat_sys_mount
> +22      common  bind                            sys_bind
> +23      common  setuid                          sys_setuid
> +24      common  getuid                          sys_getuid
> +25      common  stime                           sys_stime                       compat_sys_stime
> +26      common  ptrace                          sys_ptrace                      compat_sys_ptrace
> +27      common  alarm                           sys_alarm
> +28      common  fstat                           sys_newfstat                    compat_sys_newfstat
> +29      common  pause                           sys_pause
> +30      common  utime                           sys_utime                       compat_sys_utime
> +31      common  connect                         sys_connect
> +32      common  listen                          sys_listen
> +33      common  access                          sys_access
> +34      common  nice                            sys_nice
> +35      common  accept                          sys_accept
> +36      common  sync                            sys_sync
> +37      common  kill                            sys_kill
> +38      common  rename                          sys_rename
> +39      common  mkdir                           sys_mkdir
> +40      common  rmdir                           sys_rmdir
> +41      common  dup                             sys_dup
> +42      common  pipe                            sys_pipe
> +43      common  times                           sys_times                       compat_sys_times
> +44      common  getsockname                     sys_getsockname
> +45      common  brk                             sys_brk
> +46      common  setgid                          sys_setgid
> +47      common  getgid                          sys_getgid
> +48      common  signal                          sys_signal
> +49      common  geteuid                         sys_geteuid
> +50      common  getegid                         sys_getegid
> +51      common  acct                            sys_acct
> +52      common  umount2                         sys_umount
> +53      common  getpeername                     sys_getpeername
> +54      common  ioctl                           sys_ioctl                       compat_sys_ioctl
> +55      common  fcntl                           sys_fcntl                       compat_sys_fcntl
> +56      common  socketpair                      sys_socketpair
> +57      common  setpgid                         sys_setpgid
> +58      common  send                            sys_send
> +59      common  uname                           sys_newuname
> +60      common  umask                           sys_umask
> +61      common  chroot                          sys_chroot
> +62      common  ustat                           sys_ustat                       compat_sys_ustat
> +63      common  dup2                            sys_dup2
> +64      common  getppid                         sys_getppid
> +65      common  getpgrp                         sys_getpgrp
> +66      common  setsid                          sys_setsid
> +67      common  pivot_root                      sys_pivot_root
> +68      common  sgetmask                        sys_sgetmask                    sys32_unimplemented
> +69      common  ssetmask                        sys_ssetmask                    sys32_unimplemented
> +70      common  setreuid                        sys_setreuid
> +71      common  setregid                        sys_setregid
> +72      common  mincore                         sys_mincore
> +73      common  sigpending                      sys_sigpending                  compat_sys_sigpending
> +74      common  sethostname                     sys_sethostname
> +75      common  setrlimit                       sys_setrlimit                   compat_sys_setrlimit
> +76      common  getrlimit                       sys_getrlimit                   compat_sys_getrlimit
> +77      common  getrusage                       sys_getrusage                   compat_sys_getrusage
> +78      common  gettimeofday                    sys_gettimeofday                compat_sys_gettimeofday
> +79      common  settimeofday                    sys_settimeofday                compat_sys_settimeofday
> +80      common  getgroups                       sys_getgroups
> +81      common  setgroups                       sys_setgroups
> +82      common  sendto                          sys_sendto
> +83      common  symlink                         sys_symlink
> +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> +85      common  readlink                        sys_readlink
> +86      common  uselib                          sys_ni_syscall
> +87      common  swapon                          sys_swapon
> +88      common  reboot                          sys_reboot
> +89      common  mmap2                           sys_mmap2
> +90      common  mmap                            sys_mmap
> +91      common  munmap                          sys_munmap
> +92      common  truncate                        sys_truncate                    compat_sys_truncate
> +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> +94      common  fchmod                          sys_fchmod
> +95      common  fchown                          sys_fchown
> +96      common  getpriority                     sys_getpriority
> +97      common  setpriority                     sys_setpriority
> +98      common  recv                            sys_recv
> +99      common  statfs                          sys_statfs                      compat_sys_statfs
> +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> +101     common  stat64                          sys_stat64
> +103     common  syslog                          sys_syslog
> +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> +106     common  capget                          sys_capget
> +107     common  capset                          sys_capset
> +108     32      pread64                         parisc_pread64
> +108     64      pread64                         sys_pread64                     parisc_pread64
> +109     32      pwrite64                        parisc_pwrite64
> +109     64      pwrite64                        sys_pwrite64                    parisc_pwrite64
> +110     common  getcwd                          sys_getcwd
> +111     common  vhangup                         sys_vhangup
> +112     common  fstat64                         sys_fstat64
> +113     common  vfork                           sys_vfork_wrapper
> +114     common  wait4                           sys_wait4                       compat_sys_wait4
> +115     common  swapoff                         sys_swapoff
> +116     common  sysinfo                         sys_sysinfo                     compat_sys_sysinfo
> +117     common  shutdown                        sys_shutdown
> +118     common  fsync                           sys_fsync
> +119     common  madvise                         sys_madvise
> +120     common  clone                           sys_clone_wrapper
> +121     common  setdomainname                   sys_setdomainname
> +122     common  sendfile                        sys_sendfile                    compat_sys_sendfile
> +123     common  recvfrom                        sys_recvfrom
> +124     common  adjtimex                        sys_adjtimex                    compat_sys_adjtimex
> +125     common  mprotect                        sys_mprotect
> +126     common  sigprocmask                     sys_sigprocmask                 compat_sys_sigprocmask
> +128     common  init_module                     sys_init_module
> +129     common  delete_module                   sys_delete_module
> +131     common  quotactl                        sys_quotactl
> +132     common  getpgid                         sys_getpgid
> +133     common  fchdir                          sys_fchdir
> +134     common  bdflush                         sys_bdflush
> +135     common  sysfs                           sys_sysfs
> +136     32      personality                     parisc_personality
> +136     64      personality                     sys_personality                 parisc_personality
> +138     common  setfsuid                        sys_setfsuid
> +139     common  setfsgid                        sys_setfsgid
> +140     common  _llseek                         sys_llseek
> +141     common  getdents                        sys_getdents                    compat_sys_getdents
> +142     common  _newselect                      sys_select                      compat_sys_select
> +143     common  flock                           sys_flock
> +144     common  msync                           sys_msync
> +145     common  readv                           sys_readv                       compat_sys_readv
> +146     common  writev                          sys_writev                      compat_sys_writev
> +147     common  getsid                          sys_getsid
> +148     common  fdatasync                       sys_fdatasync
> +149     common  _sysctl                         sys_sysctl                      compat_sys_sysctl
> +150     common  mlock                           sys_mlock
> +151     common  munlock                         sys_munlock
> +152     common  mlockall                        sys_mlockall
> +153     common  munlockall                      sys_munlockall
> +154     common  sched_setparam                  sys_sched_setparam
> +155     common  sched_getparam                  sys_sched_getparam
> +156     common  sched_setscheduler              sys_sched_setscheduler
> +157     common  sched_getscheduler              sys_sched_getscheduler
> +158     common  sched_yield                     sys_sched_yield
> +159     common  sched_get_priority_max          sys_sched_get_priority_max
> +160     common  sched_get_priority_min          sys_sched_get_priority_min
> +161     common  sched_rr_get_interval           sys_sched_rr_get_interval       compat_sys_sched_rr_get_interval
> +162     common  nanosleep                       sys_nanosleep                   compat_sys_nanosleep
> +163     common  mremap                          sys_mremap
> +164     common  setresuid                       sys_setresuid
> +165     common  getresuid                       sys_getresuid
> +166     common  sigaltstack                     sys_sigaltstack                 compat_sys_sigaltstack
> +168     common  poll                            sys_poll
> +170     common  setresgid                       sys_setresgid
> +171     common  getresgid                       sys_getresgid
> +172     common  prctl                           sys_prctl
> +173     common  rt_sigreturn                    sys_rt_sigreturn
> +174     common  rt_sigaction                    sys_rt_sigaction                compat_sys_rt_sigaction
> +175     common  rt_sigprocmask                  sys_rt_sigprocmask              compat_sys_rt_sigprocmask
> +176     common  rt_sigpending                   sys_rt_sigpending               compat_sys_rt_sigpending
> +177     common  rt_sigtimedwait                 sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
> +178     common  rt_sigqueueinfo                 sys_rt_sigqueueinfo             compat_sys_rt_sigqueueinfo
> +179     common  rt_sigsuspend                   sys_rt_sigsuspend               compat_sys_rt_sigsuspend
> +180     common  chown                           sys_chown
> +181     common  setsockopt                      sys_setsockopt                  compat_sys_setsockopt
> +182     common  getsockopt                      sys_getsockopt                  compat_sys_getsockopt
> +183     common  sendmsg                         sys_sendmsg                     compat_sys_sendmsg
> +184     common  recvmsg                         sys_recvmsg                     compat_sys_recvmsg
> +185     common  semop                           sys_semop
> +186     common  semget                          sys_semget
> +187     common  semctl                          sys_semctl                      compat_sys_semctl
> +188     common  msgsnd                          sys_msgsnd                      compat_sys_msgsnd
> +189     common  msgrcv                          sys_msgrcv                      compat_sys_msgrcv
> +190     common  msgget                          sys_msgget
> +191     common  msgctl                          sys_msgctl                      compat_sys_msgctl
> +192     common  shmat                           sys_shmat                       compat_sys_shmat
> +193     common  shmdt                           sys_shmdt
> +194     common  shmget                          sys_shmget
> +195     common  shmctl                          sys_shmctl                      compat_sys_shmctl
> +198     common  lstat64                         sys_lstat64
> +199     32      truncate64                      parisc_truncate64
> +199     64      truncate64                      sys_truncate64                  parisc_truncate64
> +200     32      ftruncate64                     parisc_ftruncate64
> +200     64      ftruncate64                     sys_ftruncate64                 parisc_ftruncate64
> +201     common  getdents64                      sys_getdents64
> +202     common  fcntl64                         sys_fcntl64                     compat_sys_fcntl64
> +206     common  gettid                          sys_gettid
> +207     32      readahead                       parisc_readahead
> +207     64      readahead                       sys_readahead                   parisc_readahead
> +208     common  tkill                           sys_tkill
> +209     common  sendfile64                      sys_sendfile64                  compat_sys_sendfile64
> +210     common  futex                           sys_futex                       compat_sys_futex
> +211     common  sched_setaffinity               sys_sched_setaffinity           compat_sys_sched_setaffinity
> +212     common  sched_getaffinity               sys_sched_getaffinity           compat_sys_sched_getaffinity
> +215     common  io_setup                        sys_io_setup                    compat_sys_io_setup
> +216     common  io_destroy                      sys_io_destroy
> +217     common  io_getevents                    sys_io_getevents                compat_sys_io_getevents
> +218     common  io_submit                       sys_io_submit                   compat_sys_io_submit
> +219     common  io_cancel                       sys_io_cancel
> +222     common  exit_group                      sys_exit_group
> +223     common  lookup_dcookie                  sys_lookup_dcookie              compat_sys_lookup_dcookie
> +224     common  epoll_create                    sys_epoll_create
> +225     common  epoll_ctl                       sys_epoll_ctl
> +226     common  epoll_wait                      sys_epoll_wait
> +227     common  remap_file_pages                sys_remap_file_pages
> +228     common  semtimedop                      sys_semtimedop                  compat_sys_semtimedop
> +229     common  mq_open                         sys_mq_open                     compat_sys_mq_open
> +230     common  mq_unlink                       sys_mq_unlink
> +231     common  mq_timedsend                    sys_mq_timedsend                compat_sys_mq_timedsend
> +232     common  mq_timedreceive                 sys_mq_timedreceive             compat_sys_mq_timedreceive
> +233     common  mq_notify                       sys_mq_notify                   compat_sys_mq_notify
> +234     common  mq_getsetattr                   sys_mq_getsetattr               compat_sys_mq_getsetattr
> +235     common  waitid                          sys_waitid                      compat_sys_waitid
> +236     32      fadvise64_64                    parisc_fadvise64_64
> +236     64      fadvise64_64                    sys_fadvise64_64                parisc_fadvise64_64
> +237     common  set_tid_address                 sys_set_tid_address
> +238     common  setxattr                        sys_setxattr
> +239     common  lsetxattr                       sys_lsetxattr
> +240     common  fsetxattr                       sys_fsetxattr
> +241     common  getxattr                        sys_getxattr
> +242     common  lgetxattr                       sys_lgetxattr
> +243     common  fgetxattr                       sys_fgetxattr
> +244     common  listxattr                       sys_listxattr
> +245     common  llistxattr                      sys_llistxattr
> +246     common  flistxattr                      sys_flistxattr
> +247     common  removexattr                     sys_removexattr
> +248     common  lremovexattr                    sys_lremovexattr
> +249     common  fremovexattr                    sys_fremovexattr
> +250     common  timer_create                    sys_timer_create                compat_sys_timer_create
> +251     common  timer_settime                   sys_timer_settime               compat_sys_timer_settime
> +252     common  timer_gettime                   sys_timer_gettime               compat_sys_timer_gettime
> +253     common  timer_getoverrun                sys_timer_getoverrun
> +254     common  timer_delete                    sys_timer_delete
> +255     common  clock_settime                   sys_clock_settime               compat_sys_clock_settime
> +256     common  clock_gettime                   sys_clock_gettime               compat_sys_clock_gettime
> +257     common  clock_getres                    sys_clock_getres                compat_sys_clock_getres
> +258     common  clock_nanosleep                 sys_clock_nanosleep             compat_sys_clock_nanosleep
> +259     common  tgkill                          sys_tgkill
> +260     common  mbind                           sys_mbind                       compat_sys_mbind
> +261     common  get_mempolicy                   sys_get_mempolicy               compat_sys_get_mempolicy
> +262     common  set_mempolicy                   sys_set_mempolicy               compat_sys_set_mempolicy
> +264     common  add_key                         sys_add_key
> +265     common  request_key                     sys_request_key
> +266     common  keyctl                          sys_keyctl                      compat_sys_keyctl
> +267     common  ioprio_set                      sys_ioprio_set
> +268     common  ioprio_get                      sys_ioprio_get
> +269     common  inotify_init                    sys_inotify_init
> +270     common  inotify_add_watch               sys_inotify_add_watch
> +271     common  inotify_rm_watch                sys_inotify_rm_watch
> +272     common  migrate_pages                   sys_migrate_pages
> +273     common  pselect6                        sys_pselect6                    compat_sys_pselect6
> +274     common  ppoll                           sys_ppoll                       compat_sys_ppoll
> +275     common  openat                          sys_openat                      compat_sys_openat
> +276     common  mkdirat                         sys_mkdirat
> +277     common  mknodat                         sys_mknodat
> +278     common  fchownat                        sys_fchownat
> +279     common  futimesat                       sys_futimesat                   compat_sys_futimesat
> +280     common  fstatat64                       sys_fstatat64
> +281     common  unlinkat                        sys_unlinkat
> +282     common  renameat                        sys_renameat
> +283     common  linkat                          sys_linkat
> +284     common  symlinkat                       sys_symlinkat
> +285     common  readlinkat                      sys_readlinkat
> +286     common  fchmodat                        sys_fchmodat
> +287     common  faccessat                       sys_faccessat
> +288     common  unshare                         sys_unshare
> +289     common  set_robust_list                 sys_set_robust_list             compat_sys_set_robust_list
> +290     common  get_robust_list                 sys_get_robust_list             compat_sys_get_robust_list
> +291     common  splice                          sys_splice
> +292     32      sync_file_range                 parisc_sync_file_range
> +292     64      sync_file_range                 sys_sync_file_range             parisc_sync_file_range
> +293     common  tee                             sys_tee
> +294     common  vmsplice                        sys_vmsplice                    compat_sys_vmsplice
> +295     common  move_pages                      sys_move_pages                  compat_sys_move_pages
> +296     common  getcpu                          sys_getcpu
> +297     common  epoll_pwait                     sys_epoll_pwait                 compat_sys_epoll_pwait
> +298     common  statfs64                        sys_statfs64                    compat_sys_statfs64
> +299     common  fstatfs64                       sys_fstatfs64                   compat_sys_fstatfs64
> +300     common  kexec_load                      sys_kexec_load                  compat_sys_kexec_load
> +301     common  utimensat                       sys_utimensat                   compat_sys_utimensat
> +302     common  signalfd                        sys_signalfd                    compat_sys_signalfd
> +304     common  eventfd                         sys_eventfd
> +305     32      fallocate                       parisc_fallocate
> +305     64      fallocate                       sys_fallocate                   parisc_fallocate
> +306     common  timerfd_create                  sys_timerfd_create
> +307     common  timerfd_settime                 sys_timerfd_settime             compat_sys_timerfd_settime
> +308     common  timerfd_gettime                 sys_timerfd_gettime             compat_sys_timerfd_gettime
> +309     common  signalfd4                       sys_signalfd4                   compat_sys_signalfd4
> +310     common  eventfd2                        sys_eventfd2
> +311     common  epoll_create1                   sys_epoll_create1
> +312     common  dup3                            sys_dup3
> +313     common  pipe2                           sys_pipe2
> +314     common  inotify_init1                   sys_inotify_init1
> +315     common  preadv                          sys_preadv                      compat_sys_preadv
> +316     common  pwritev                         sys_pwritev                     compat_sys_pwritev
> +317     common  rt_tgsigqueueinfo               sys_rt_tgsigqueueinfo           compat_sys_rt_tgsigqueueinfo
> +318     common  perf_event_open                 sys_perf_event_open
> +319     common  recvmmsg                        sys_recvmmsg                    compat_sys_recvmmsg
> +320     common  accept4                         sys_accept4
> +321     common  prlimit64                       sys_prlimit64
> +322     common  fanotify_init                   sys_fanotify_init
> +323     common  fanotify_mark                   sys_fanotify_mark               sys32_fanotify_mark
> +324     common  clock_adjtime                   sys_clock_adjtime               compat_sys_clock_adjtime
> +325     common  name_to_handle_at               sys_name_to_handle_at
> +326     common  open_by_handle_at               sys_open_by_handle_at           compat_sys_open_by_handle_at
> +327     common  syncfs                          sys_syncfs
> +328     common  setns                           sys_setns
> +329     common  sendmmsg                        sys_sendmmsg                    compat_sys_sendmmsg
> +330     common  process_vm_readv                sys_process_vm_readv            compat_sys_process_vm_readv
> +331     common  process_vm_writev               sys_process_vm_writev           compat_sys_process_vm_writev
> +332     common  kcmp                            sys_kcmp
> +333     common  finit_module                    sys_finit_module
> +334     common  sched_setattr                   sys_sched_setattr
> +335     common  sched_getattr                   sys_sched_getattr
> +336     common  utimes                          sys_utimes                      compat_sys_utimes
> +337     common  renameat2                       sys_renameat2
> +338     common  seccomp                         sys_seccomp
> +339     common  getrandom                       sys_getrandom
> +340     common  memfd_create                    sys_memfd_create
> +341     common  bpf                             sys_bpf
> +342     common  execveat                        sys_execveat                    compat_sys_execveat
> +343     common  membarrier                      sys_membarrier
> +344     common  userfaultfd                     sys_userfaultfd
> +345     common  mlock2                          sys_mlock2
> +346     common  copy_file_range                 sys_copy_file_range
> +347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> +349     common  statx                           sys_statx
> +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> \ No newline at end of file
> diff --git a/arch/parisc/kernel/syscalls/syscallhdr.sh b/arch/parisc/kernel/syscalls/syscallhdr.sh
> new file mode 100644
> index 0000000..607d4ca
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscallhdr.sh
> @@ -0,0 +1,35 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +
> +in="$1"
> +out="$2"
> +my_abis=`echo "($3)" | tr ',' '|'`
> +prefix="$4"
> +offset="$5"
> +
> +fileguard=_UAPI_ASM_PARISC_`basename "$out" | sed \
> +    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
> +    -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
> +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> +    echo "#ifndef ${fileguard}"
> +    echo "#define ${fileguard}"
> +    echo ""
> +
> +    nxt=0
> +    while read nr abi name entry compat ; do
> +       if [ -z "$offset" ]; then
> +           echo -e "#define __NR_${prefix}${name}\t$nr"
> +       else
> +           echo -e "#define __NR_${prefix}${name}\t($offset + $nr)"
> +       fi
> +       nxt=$nr
> +       let nxt=nxt+1
> +    done
> +
> +    echo ""
> +    echo "#ifdef __KERNEL__"
> +    echo -e "#define __NR_syscalls\t$nxt"
> +    echo "#endif"
> +    echo ""
> +    echo "#endif /* ${fileguard} */"
> +) > "$out"
> diff --git a/arch/parisc/kernel/syscalls/syscalltbl.sh b/arch/parisc/kernel/syscalls/syscalltbl.sh
> new file mode 100644
> index 0000000..82b0416
> --- /dev/null
> +++ b/arch/parisc/kernel/syscalls/syscalltbl.sh
> @@ -0,0 +1,41 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +
> +in="$1"
> +out="$2"
> +my_abis=`echo "($3)" | tr ',' '|'`
> +offset="$4"
> +
> +emit() {
> +    nxt="$1"
> +    nr="$2"
> +    entry="$3"
> +
> +    while [ $nxt -lt $nr ]; do
> +       echo "__SYSCALL($nxt, sys_ni_syscall, )"
> +        let nxt=nxt+1
> +    done
> +    echo "__SYSCALL($nr, $entry, )"
> +}
> +
> +grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
> +    if [ -z "$offset" ]; then
> +       nxt=0
> +    else
> +       nxt=$offset
> +    fi
> +
> +    while read nr abi name entry compat ; do
> +       if [ ${out: -5} = "c32.h" ]; then
> +           if [ -z "$compat" ]; then
> +               emit $nxt $nr $entry
> +           else
> +               emit $nxt $nr $compat
> +           fi
> +       elif [ ${out: -4} = "64.h" -o  ${out: -4} = "32.h" ]; then
> +           emit $nxt $nr $entry
> +       fi
> +       nxt=$nr
> +        let nxt=nxt+1
> +    done
> +) > "$out"
> --
> 1.9.1
>

I did some stupidity here. will fix now. Thanks!

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  6:48         ` Firoz Khan
  2018-10-08  6:48           ` Firoz Khan
@ 2018-10-08  8:23           ` Geert Uytterhoeven
  2018-10-08  8:23             ` Geert Uytterhoeven
  2018-10-08  8:55             ` Firoz Khan
  1 sibling, 2 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2018-10-08  8:23 UTC (permalink / raw)
  To: firoz.khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	Greg KH, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, Linux-Arch, Arnd Bergmann,
	Deepa Dinamani, marcin.juszkiewicz

Hi Firoz,

On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
> > On 08.10.2018 07:52, Firoz Khan wrote:
> > > On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
> > >> On 08.10.2018 07:16, Firoz Khan wrote:
> > >>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > >>> ---
> > >>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> > >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> > >>>
> > >>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > >>> index 4e85293..4334bb7 100644
> > >>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> > >>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > >>> @@ -349,4 +349,5 @@
> > >>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> > >>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > >>>  349     common  statx                           sys_statx
> > >>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > >>> \ No newline at end of file
> > >>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > >>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
> > >>
> > >> You can't add the rseq syscall for parisc yet.
> > >> It needs additional code in the kernel for parisc which hasn't been tested yet.
> > >> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> > >
> > > Thanks for your update!
> > >
> > > When I compiled the kernel I got below warnings.
> > >
> > > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> > >
> > > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > > syscall is gone. But we definitely have to keep rseq entry on parisc
> > > architecture.
> >
> > I prefer to keep the warning for rseq for now.
>
> I'm fine with this.
>
> > It reminds me that we still may want the rseq syscall.
> > If the warning is a problem, you may simply add the __IGNORE_rseq define.
>
> But I still feel to keep an IGNORE entry, so once you test your patch; we can
> remove IGNORE entry and update the syscall.tbl.

If the warning is bogus (e.g. obsolete syscall), an IGNORE entry
should be added.
If the warning is due to a not-yet-implemented feature, IMHO it should not be
silenced, as that would give the false impression that the feature is
present and
implemented.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  8:23           ` Geert Uytterhoeven
@ 2018-10-08  8:23             ` Geert Uytterhoeven
  2018-10-08  8:55             ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2018-10-08  8:23 UTC (permalink / raw)
  To: firoz.khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	Greg KH, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, Linux-Arch, Arnd Bergmann,
	Deepa Dinamani, marcin.juszkiewicz

Hi Firoz,

On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
> > On 08.10.2018 07:52, Firoz Khan wrote:
> > > On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
> > >> On 08.10.2018 07:16, Firoz Khan wrote:
> > >>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > >>> ---
> > >>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> > >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> > >>>
> > >>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > >>> index 4e85293..4334bb7 100644
> > >>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> > >>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > >>> @@ -349,4 +349,5 @@
> > >>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> > >>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > >>>  349     common  statx                           sys_statx
> > >>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > >>> \ No newline at end of file
> > >>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > >>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
> > >>
> > >> You can't add the rseq syscall for parisc yet.
> > >> It needs additional code in the kernel for parisc which hasn't been tested yet.
> > >> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> > >
> > > Thanks for your update!
> > >
> > > When I compiled the kernel I got below warnings.
> > >
> > > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> > >
> > > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > > syscall is gone. But we definitely have to keep rseq entry on parisc
> > > architecture.
> >
> > I prefer to keep the warning for rseq for now.
>
> I'm fine with this.
>
> > It reminds me that we still may want the rseq syscall.
> > If the warning is a problem, you may simply add the __IGNORE_rseq define.
>
> But I still feel to keep an IGNORE entry, so once you test your patch; we can
> remove IGNORE entry and update the syscall.tbl.

If the warning is bogus (e.g. obsolete syscall), an IGNORE entry
should be added.
If the warning is due to a not-yet-implemented feature, IMHO it should not be
silenced, as that would give the false impression that the feature is
present and
implemented.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  8:23           ` Geert Uytterhoeven
  2018-10-08  8:23             ` Geert Uytterhoeven
@ 2018-10-08  8:55             ` Firoz Khan
  2018-10-08  8:55               ` Firoz Khan
  2018-10-08  8:58               ` Geert Uytterhoeven
  1 sibling, 2 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  8:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Helge Deller, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Geert,

On Mon, 8 Oct 2018 at 13:53, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Firoz,
>
> On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
> > > On 08.10.2018 07:52, Firoz Khan wrote:
> > > > On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
> > > >> On 08.10.2018 07:16, Firoz Khan wrote:
> > > >>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > >>> ---
> > > >>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> > > >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >>>
> > > >>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > > >>> index 4e85293..4334bb7 100644
> > > >>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> > > >>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > > >>> @@ -349,4 +349,5 @@
> > > >>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> > > >>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > >>>  349     common  statx                           sys_statx
> > > >>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > >>> \ No newline at end of file
> > > >>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > >>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
> > > >>
> > > >> You can't add the rseq syscall for parisc yet.
> > > >> It needs additional code in the kernel for parisc which hasn't been tested yet.
> > > >> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> > > >
> > > > Thanks for your update!
> > > >
> > > > When I compiled the kernel I got below warnings.
> > > >
> > > > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > > > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> > > >
> > > > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > > > syscall is gone. But we definitely have to keep rseq entry on parisc
> > > > architecture.
> > >
> > > I prefer to keep the warning for rseq for now.
> >
> > I'm fine with this.
> >
> > > It reminds me that we still may want the rseq syscall.
> > > If the warning is a problem, you may simply add the __IGNORE_rseq define.
> >
> > But I still feel to keep an IGNORE entry, so once you test your patch; we can
> > remove IGNORE entry and update the syscall.tbl.
>
> If the warning is bogus (e.g. obsolete syscall), an IGNORE entry
> should be added.

nfsservctl  look like an obsolete one, so I added an IGNORE entry in
script/checksyscalls.h

> If the warning is due to a not-yet-implemented feature, IMHO it should not be
> silenced, as that would give the false impression that the feature is
> present and
> implemented.

Helge had done some implementation for rseq but not tested. So we
either add an IGNORE
entry or leave the warning as it is.

Thanks
Firoz

>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  8:55             ` Firoz Khan
@ 2018-10-08  8:55               ` Firoz Khan
  2018-10-08  8:58               ` Geert Uytterhoeven
  1 sibling, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-08  8:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Helge Deller, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Geert,

On Mon, 8 Oct 2018 at 13:53, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Firoz,
>
> On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
> > > On 08.10.2018 07:52, Firoz Khan wrote:
> > > > On Mon, 8 Oct 2018 at 11:11, Helge Deller <deller@gmx.de> wrote:
> > > >> On 08.10.2018 07:16, Firoz Khan wrote:
> > > >>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > >>> ---
> > > >>>  arch/parisc/kernel/syscalls/syscall.tbl | 3 ++-
> > > >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >>>
> > > >>> diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > > >>> index 4e85293..4334bb7 100644
> > > >>> --- a/arch/parisc/kernel/syscalls/syscall.tbl
> > > >>> +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > > >>> @@ -349,4 +349,5 @@
> > > >>>  347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> > > >>>  348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > >>>  349     common  statx                           sys_statx
> > > >>> -350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > >>> \ No newline at end of file
> > > >>> +350  common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > >>> +351  common  rseq                            sys_rseq                        compat_sys_rseq
> > > >>
> > > >> You can't add the rseq syscall for parisc yet.
> > > >> It needs additional code in the kernel for parisc which hasn't been tested yet.
> > > >> See my initial untested patch at https://patchwork.kernel.org/patch/10495209/
> > > >
> > > > Thanks for your update!
> > > >
> > > > When I compiled the kernel I got below warnings.
> > > >
> > > > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > > > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> > > >
> > > > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > > > syscall is gone. But we definitely have to keep rseq entry on parisc
> > > > architecture.
> > >
> > > I prefer to keep the warning for rseq for now.
> >
> > I'm fine with this.
> >
> > > It reminds me that we still may want the rseq syscall.
> > > If the warning is a problem, you may simply add the __IGNORE_rseq define.
> >
> > But I still feel to keep an IGNORE entry, so once you test your patch; we can
> > remove IGNORE entry and update the syscall.tbl.
>
> If the warning is bogus (e.g. obsolete syscall), an IGNORE entry
> should be added.

nfsservctl  look like an obsolete one, so I added an IGNORE entry in
script/checksyscalls.h

> If the warning is due to a not-yet-implemented feature, IMHO it should not be
> silenced, as that would give the false impression that the feature is
> present and
> implemented.

Helge had done some implementation for rseq but not tested. So we
either add an IGNORE
entry or leave the warning as it is.

Thanks
Firoz

>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  8:55             ` Firoz Khan
  2018-10-08  8:55               ` Firoz Khan
@ 2018-10-08  8:58               ` Geert Uytterhoeven
  2018-10-08  8:58                 ` Geert Uytterhoeven
  2018-10-08  9:11                 ` Arnd Bergmann
  1 sibling, 2 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2018-10-08  8:58 UTC (permalink / raw)
  To: firoz.khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	Greg KH, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, Linux-Arch, Arnd Bergmann,
	Deepa Dinamani, marcin.juszkiewicz

Hi Firoz,

On Mon, Oct 8, 2018 at 10:55 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Mon, 8 Oct 2018 at 13:53, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
> > > > On 08.10.2018 07:52, Firoz Khan wrote:
> > > > > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > > > > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> > > > >
> > > > > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > > > > syscall is gone. But we definitely have to keep rseq entry on parisc
> > > > > architecture.
> > > >
> > > > I prefer to keep the warning for rseq for now.
> > >
> > > I'm fine with this.
> > >
> > > > It reminds me that we still may want the rseq syscall.
> > > > If the warning is a problem, you may simply add the __IGNORE_rseq define.
> > >
> > > But I still feel to keep an IGNORE entry, so once you test your patch; we can
> > > remove IGNORE entry and update the syscall.tbl.
> >
> > If the warning is bogus (e.g. obsolete syscall), an IGNORE entry
> > should be added.
>
> nfsservctl  look like an obsolete one, so I added an IGNORE entry in
> script/checksyscalls.h

Yes it is.

> > If the warning is due to a not-yet-implemented feature, IMHO it should not be
> > silenced, as that would give the false impression that the feature is
> > present and
> > implemented.
>
> Helge had done some implementation for rseq but not tested. So we
> either add an IGNORE
> entry or leave the warning as it is.

Personally, I prefer keeping the warning, for the above reason.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  8:58               ` Geert Uytterhoeven
@ 2018-10-08  8:58                 ` Geert Uytterhoeven
  2018-10-08  9:11                 ` Arnd Bergmann
  1 sibling, 0 replies; 70+ messages in thread
From: Geert Uytterhoeven @ 2018-10-08  8:58 UTC (permalink / raw)
  To: firoz.khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	Greg KH, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, Linux-Arch, Arnd Bergmann,
	Deepa Dinamani, marcin.juszkiewicz

Hi Firoz,

On Mon, Oct 8, 2018 at 10:55 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Mon, 8 Oct 2018 at 13:53, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > On Mon, 8 Oct 2018 at 11:36, Helge Deller <deller@gmx.de> wrote:
> > > > On 08.10.2018 07:52, Firoz Khan wrote:
> > > > > <stdin>:696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]
> > > > > <stdin>:1335:2: warning: #warning syscall rseq not implemented [-Wcpp]
> > > > >
> > > > > I added an IGNORE entry nfsservctl in script/checksyscalls.sh because this
> > > > > syscall is gone. But we definitely have to keep rseq entry on parisc
> > > > > architecture.
> > > >
> > > > I prefer to keep the warning for rseq for now.
> > >
> > > I'm fine with this.
> > >
> > > > It reminds me that we still may want the rseq syscall.
> > > > If the warning is a problem, you may simply add the __IGNORE_rseq define.
> > >
> > > But I still feel to keep an IGNORE entry, so once you test your patch; we can
> > > remove IGNORE entry and update the syscall.tbl.
> >
> > If the warning is bogus (e.g. obsolete syscall), an IGNORE entry
> > should be added.
>
> nfsservctl  look like an obsolete one, so I added an IGNORE entry in
> script/checksyscalls.h

Yes it is.

> > If the warning is due to a not-yet-implemented feature, IMHO it should not be
> > silenced, as that would give the false impression that the feature is
> > present and
> > implemented.
>
> Helge had done some implementation for rseq but not tested. So we
> either add an IGNORE
> entry or leave the warning as it is.

Personally, I prefer keeping the warning, for the above reason.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  8:58               ` Geert Uytterhoeven
  2018-10-08  8:58                 ` Geert Uytterhoeven
@ 2018-10-08  9:11                 ` Arnd Bergmann
  2018-10-08  9:11                   ` Arnd Bergmann
  1 sibling, 1 reply; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-08  9:11 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Firoz Khan, Helge Deller, Parisc List, James E.J. Bottomley,
	Thomas Gleixner, gregkh, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, linux-arch,
	Deepa Dinamani, Marcin Juszkiewicz

On Mon, Oct 8, 2018 at 10:58 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Mon, Oct 8, 2018 at 10:55 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Mon, 8 Oct 2018 at 13:53, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > If the warning is due to a not-yet-implemented feature, IMHO it should not be
> > > silenced, as that would give the false impression that the feature is
> > > present and
> > > implemented.
> >
> > Helge had done some implementation for rseq but not tested. So we
> > either add an IGNORE
> > entry or leave the warning as it is.
>
> Personally, I prefer keeping the warning, for the above reason.

Agreed, there is no need to patch this now if Helge is already working
on the correct fix. Same for the other architectures. If there are architectures
that have multiple missing syscalls, we could add a line with a comment
for rseq but not actually define it, like

 348     common  pwritev2                     sys_pwritev2
       compat_sys_pwritev2
 349     common  statx                           sys_statx
+350    common  io_pgetevents            sys_io_pgetevents
  compat_sys_io_pgetevents
+# rseq requires an arch specific implementation
+# 351    common  rseq                          sys_rseq
         compat_sys_rseq */
+352     common  open_tree                 sys_open_tree
+353     common  move_mount             sys_move_mount
+354     common  fsopen                       sys_fsopen

      Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 5/6] parisc: wire up rseq system call
  2018-10-08  9:11                 ` Arnd Bergmann
@ 2018-10-08  9:11                   ` Arnd Bergmann
  0 siblings, 0 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-08  9:11 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Firoz Khan, Helge Deller, Parisc List, James E.J. Bottomley,
	Thomas Gleixner, gregkh, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, linux-arch,
	Deepa Dinamani, Marcin Juszkiewicz

On Mon, Oct 8, 2018 at 10:58 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Mon, Oct 8, 2018 at 10:55 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Mon, 8 Oct 2018 at 13:53, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Mon, Oct 8, 2018 at 8:49 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > If the warning is due to a not-yet-implemented feature, IMHO it should not be
> > > silenced, as that would give the false impression that the feature is
> > > present and
> > > implemented.
> >
> > Helge had done some implementation for rseq but not tested. So we
> > either add an IGNORE
> > entry or leave the warning as it is.
>
> Personally, I prefer keeping the warning, for the above reason.

Agreed, there is no need to patch this now if Helge is already working
on the correct fix. Same for the other architectures. If there are architectures
that have multiple missing syscalls, we could add a line with a comment
for rseq but not actually define it, like

 348     common  pwritev2                     sys_pwritev2
       compat_sys_pwritev2
 349     common  statx                           sys_statx
+350    common  io_pgetevents            sys_io_pgetevents
  compat_sys_io_pgetevents
+# rseq requires an arch specific implementation
+# 351    common  rseq                          sys_rseq
         compat_sys_rseq */
+352     common  open_tree                 sys_open_tree
+353     common  move_mount             sys_move_mount
+354     common  fsopen                       sys_fsopen

      Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08  7:33   ` Firoz Khan
  2018-10-08  7:33     ` Firoz Khan
@ 2018-10-08 13:03     ` Eugene Syromiatnikov
  2018-10-08 13:03       ` Eugene Syromiatnikov
  2018-10-08 13:56       ` Arnd Bergmann
  1 sibling, 2 replies; 70+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-08 13:03 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

> On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > new file mode 100644
> > index 0000000..4e85293
> > --- /dev/null
> > +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > @@ -0,0 +1,352 @@
> > +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
> > +#
> > +# system call numbers and entry vectors for parisc
> > +#
> > +# The format is:
> > +# <number> <abi> <name> <entry point> <compat entry point>
> > +#
> > +# The <abi> can be common, 64, or 32 for this file.
> > +#
> > +0       common  restart_syscall                 sys_restart_syscall
> > +1       common  exit                            sys_exit
> > +2       common  fork                            sys_fork_wrapper
> > +3       common  read                            sys_read
> > +4       common  write                           sys_write
> > +5       common  open                            sys_open                        compat_sys_open
> > +6       common  close                           sys_close
> > +7       common  waitpid                         sys_waitpid
> > +8       common  creat                           sys_creat
> > +9       common  link                            sys_link
> > +10      common  unlink                          sys_unlink
> > +11      common  execve                          sys_execve                      compat_sys_execve
> > +12      common  chdir                           sys_chdir
> > +13      common  time                            sys_time                        compat_sys_time
> > +14      common  mknod                           sys_mknod
> > +15      common  chmod                           sys_chmod
> > +16      common  lchown                          sys_lchown
> > +17      common  socket                          sys_socket
> > +18      common  stat                            sys_newstat                     compat_sys_newstat
> > +19      common  lseek                           sys_lseek                       compat_sys_lseek
> > +20      common  getpid                          sys_getpid
> > +21      common  mount                           sys_mount                       compat_sys_mount
> > +22      common  bind                            sys_bind
> > +23      common  setuid                          sys_setuid
> > +24      common  getuid                          sys_getuid
> > +25      common  stime                           sys_stime                       compat_sys_stime
> > +26      common  ptrace                          sys_ptrace                      compat_sys_ptrace
> > +27      common  alarm                           sys_alarm
> > +28      common  fstat                           sys_newfstat                    compat_sys_newfstat
> > +29      common  pause                           sys_pause
> > +30      common  utime                           sys_utime                       compat_sys_utime
> > +31      common  connect                         sys_connect
> > +32      common  listen                          sys_listen
> > +33      common  access                          sys_access
> > +34      common  nice                            sys_nice
> > +35      common  accept                          sys_accept
> > +36      common  sync                            sys_sync
> > +37      common  kill                            sys_kill
> > +38      common  rename                          sys_rename
> > +39      common  mkdir                           sys_mkdir
> > +40      common  rmdir                           sys_rmdir
> > +41      common  dup                             sys_dup
> > +42      common  pipe                            sys_pipe
> > +43      common  times                           sys_times                       compat_sys_times
> > +44      common  getsockname                     sys_getsockname
> > +45      common  brk                             sys_brk
> > +46      common  setgid                          sys_setgid
> > +47      common  getgid                          sys_getgid
> > +48      common  signal                          sys_signal
> > +49      common  geteuid                         sys_geteuid
> > +50      common  getegid                         sys_getegid
> > +51      common  acct                            sys_acct
> > +52      common  umount2                         sys_umount
> > +53      common  getpeername                     sys_getpeername
> > +54      common  ioctl                           sys_ioctl                       compat_sys_ioctl
> > +55      common  fcntl                           sys_fcntl                       compat_sys_fcntl
> > +56      common  socketpair                      sys_socketpair
> > +57      common  setpgid                         sys_setpgid
> > +58      common  send                            sys_send
> > +59      common  uname                           sys_newuname
> > +60      common  umask                           sys_umask
> > +61      common  chroot                          sys_chroot
> > +62      common  ustat                           sys_ustat                       compat_sys_ustat
> > +63      common  dup2                            sys_dup2
> > +64      common  getppid                         sys_getppid
> > +65      common  getpgrp                         sys_getpgrp
> > +66      common  setsid                          sys_setsid
> > +67      common  pivot_root                      sys_pivot_root
> > +68      common  sgetmask                        sys_sgetmask                    sys32_unimplemented
> > +69      common  ssetmask                        sys_ssetmask                    sys32_unimplemented
> > +70      common  setreuid                        sys_setreuid
> > +71      common  setregid                        sys_setregid
> > +72      common  mincore                         sys_mincore
> > +73      common  sigpending                      sys_sigpending                  compat_sys_sigpending
> > +74      common  sethostname                     sys_sethostname
> > +75      common  setrlimit                       sys_setrlimit                   compat_sys_setrlimit
> > +76      common  getrlimit                       sys_getrlimit                   compat_sys_getrlimit
> > +77      common  getrusage                       sys_getrusage                   compat_sys_getrusage
> > +78      common  gettimeofday                    sys_gettimeofday                compat_sys_gettimeofday
> > +79      common  settimeofday                    sys_settimeofday                compat_sys_settimeofday
> > +80      common  getgroups                       sys_getgroups
> > +81      common  setgroups                       sys_setgroups
> > +82      common  sendto                          sys_sendto
> > +83      common  symlink                         sys_symlink
> > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > +85      common  readlink                        sys_readlink
> > +86      common  uselib                          sys_ni_syscall

Why uselib is declared, contrary to all the skipped syscalls below,
that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
undefined in arch/parisc/include/uapi/asm/unistd.h.

> > +87      common  swapon                          sys_swapon
> > +88      common  reboot                          sys_reboot
> > +89      common  mmap2                           sys_mmap2
> > +90      common  mmap                            sys_mmap
> > +91      common  munmap                          sys_munmap
> > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > +94      common  fchmod                          sys_fchmod
> > +95      common  fchown                          sys_fchown
> > +96      common  getpriority                     sys_getpriority
> > +97      common  setpriority                     sys_setpriority
> > +98      common  recv                            sys_recv
> > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > +101     common  stat64                          sys_stat64

It is probably worth adding a comment here that syscall 102 was
socketcall, in order to make reason for this jump in syscall numeration
self-evident.

> > +103     common  syslog                          sys_syslog
> > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > +106     common  capget                          sys_capget
> > +107     common  capset                          sys_capset

> > +108     32      pread64                         parisc_pread64
> > +108     64      pread64                         sys_pread64                     parisc_pread64

It would be probably nice to have some syntax that would allow avoid
this duplication (as compat handler on 64 bit and native on 32 bit are
the same).

> > +109     32      pwrite64                        parisc_pwrite64
> > +109     64      pwrite64                        sys_pwrite64                    parisc_pwrite64
> > +110     common  getcwd                          sys_getcwd
> > +111     common  vhangup                         sys_vhangup
> > +112     common  fstat64                         sys_fstat64
> > +113     common  vfork                           sys_vfork_wrapper
> > +114     common  wait4                           sys_wait4                       compat_sys_wait4
> > +115     common  swapoff                         sys_swapoff
> > +116     common  sysinfo                         sys_sysinfo                     compat_sys_sysinfo
> > +117     common  shutdown                        sys_shutdown
> > +118     common  fsync                           sys_fsync
> > +119     common  madvise                         sys_madvise
> > +120     common  clone                           sys_clone_wrapper
> > +121     common  setdomainname                   sys_setdomainname
> > +122     common  sendfile                        sys_sendfile                    compat_sys_sendfile
> > +123     common  recvfrom                        sys_recvfrom
> > +124     common  adjtimex                        sys_adjtimex                    compat_sys_adjtimex
> > +125     common  mprotect                        sys_mprotect
> > +126     common  sigprocmask                     sys_sigprocmask                 compat_sys_sigprocmask

127 - create_module

> > +128     common  init_module                     sys_init_module
> > +129     common  delete_module                   sys_delete_module

130 - get_kernel_syms

> > +131     common  quotactl                        sys_quotactl
> > +132     common  getpgid                         sys_getpgid
> > +133     common  fchdir                          sys_fchdir
> > +134     common  bdflush                         sys_bdflush
> > +135     common  sysfs                           sys_sysfs
> > +136     32      personality                     parisc_personality
> > +136     64      personality                     sys_personality                 parisc_personality

136 - afs_syscall

> > +138     common  setfsuid                        sys_setfsuid
> > +139     common  setfsgid                        sys_setfsgid
> > +140     common  _llseek                         sys_llseek
> > +141     common  getdents                        sys_getdents                    compat_sys_getdents
> > +142     common  _newselect                      sys_select                      compat_sys_select
> > +143     common  flock                           sys_flock
> > +144     common  msync                           sys_msync
> > +145     common  readv                           sys_readv                       compat_sys_readv
> > +146     common  writev                          sys_writev                      compat_sys_writev
> > +147     common  getsid                          sys_getsid
> > +148     common  fdatasync                       sys_fdatasync
> > +149     common  _sysctl                         sys_sysctl                      compat_sys_sysctl
> > +150     common  mlock                           sys_mlock
> > +151     common  munlock                         sys_munlock
> > +152     common  mlockall                        sys_mlockall
> > +153     common  munlockall                      sys_munlockall
> > +154     common  sched_setparam                  sys_sched_setparam
> > +155     common  sched_getparam                  sys_sched_getparam
> > +156     common  sched_setscheduler              sys_sched_setscheduler
> > +157     common  sched_getscheduler              sys_sched_getscheduler
> > +158     common  sched_yield                     sys_sched_yield
> > +159     common  sched_get_priority_max          sys_sched_get_priority_max
> > +160     common  sched_get_priority_min          sys_sched_get_priority_min
> > +161     common  sched_rr_get_interval           sys_sched_rr_get_interval       compat_sys_sched_rr_get_interval
> > +162     common  nanosleep                       sys_nanosleep                   compat_sys_nanosleep
> > +163     common  mremap                          sys_mremap
> > +164     common  setresuid                       sys_setresuid
> > +165     common  getresuid                       sys_getresuid
> > +166     common  sigaltstack                     sys_sigaltstack                 compat_sys_sigaltstack

167 - query_module

> > +168     common  poll                            sys_poll

169 - nfsservctl

> > +170     common  setresgid                       sys_setresgid
> > +171     common  getresgid                       sys_getresgid
> > +172     common  prctl                           sys_prctl
> > +173     common  rt_sigreturn                    sys_rt_sigreturn
> > +174     common  rt_sigaction                    sys_rt_sigaction                compat_sys_rt_sigaction
> > +175     common  rt_sigprocmask                  sys_rt_sigprocmask              compat_sys_rt_sigprocmask
> > +176     common  rt_sigpending                   sys_rt_sigpending               compat_sys_rt_sigpending
> > +177     common  rt_sigtimedwait                 sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
> > +178     common  rt_sigqueueinfo                 sys_rt_sigqueueinfo             compat_sys_rt_sigqueueinfo
> > +179     common  rt_sigsuspend                   sys_rt_sigsuspend               compat_sys_rt_sigsuspend
> > +180     common  chown                           sys_chown
> > +181     common  setsockopt                      sys_setsockopt                  compat_sys_setsockopt
> > +182     common  getsockopt                      sys_getsockopt                  compat_sys_getsockopt
> > +183     common  sendmsg                         sys_sendmsg                     compat_sys_sendmsg
> > +184     common  recvmsg                         sys_recvmsg                     compat_sys_recvmsg
> > +185     common  semop                           sys_semop
> > +186     common  semget                          sys_semget
> > +187     common  semctl                          sys_semctl                      compat_sys_semctl
> > +188     common  msgsnd                          sys_msgsnd                      compat_sys_msgsnd
> > +189     common  msgrcv                          sys_msgrcv                      compat_sys_msgrcv
> > +190     common  msgget                          sys_msgget
> > +191     common  msgctl                          sys_msgctl                      compat_sys_msgctl
> > +192     common  shmat                           sys_shmat                       compat_sys_shmat
> > +193     common  shmdt                           sys_shmdt
> > +194     common  shmget                          sys_shmget
> > +195     common  shmctl                          sys_shmctl                      compat_sys_shmctl

196 - getpmsg
187 - putpmsg

> > +198     common  lstat64                         sys_lstat64
> > +199     32      truncate64                      parisc_truncate64
> > +199     64      truncate64                      sys_truncate64                  parisc_truncate64
> > +200     32      ftruncate64                     parisc_ftruncate64
> > +200     64      ftruncate64                     sys_ftruncate64                 parisc_ftruncate64
> > +201     common  getdents64                      sys_getdents64
> > +202     common  fcntl64                         sys_fcntl64                     compat_sys_fcntl64

203 - attrctl
204 - acl_get
205 - acl_set

> > +206     common  gettid                          sys_gettid
> > +207     32      readahead                       parisc_readahead
> > +207     64      readahead                       sys_readahead                   parisc_readahead
> > +208     common  tkill                           sys_tkill
> > +209     common  sendfile64                      sys_sendfile64                  compat_sys_sendfile64
> > +210     common  futex                           sys_futex                       compat_sys_futex
> > +211     common  sched_setaffinity               sys_sched_setaffinity           compat_sys_sched_setaffinity
> > +212     common  sched_getaffinity               sys_sched_getaffinity           compat_sys_sched_getaffinity

213 - set_thread_area
214 - get_thread_area

> > +215     common  io_setup                        sys_io_setup                    compat_sys_io_setup
> > +216     common  io_destroy                      sys_io_destroy
> > +217     common  io_getevents                    sys_io_getevents                compat_sys_io_getevents
> > +218     common  io_submit                       sys_io_submit                   compat_sys_io_submit
> > +219     common  io_cancel                       sys_io_cancel

220 - alloc_hugepages
221 - free_hugepages

> > +222     common  exit_group                      sys_exit_group
> > +223     common  lookup_dcookie                  sys_lookup_dcookie              compat_sys_lookup_dcookie
> > +224     common  epoll_create                    sys_epoll_create
> > +225     common  epoll_ctl                       sys_epoll_ctl
> > +226     common  epoll_wait                      sys_epoll_wait
> > +227     common  remap_file_pages                sys_remap_file_pages
> > +228     common  semtimedop                      sys_semtimedop                  compat_sys_semtimedop
> > +229     common  mq_open                         sys_mq_open                     compat_sys_mq_open
> > +230     common  mq_unlink                       sys_mq_unlink
> > +231     common  mq_timedsend                    sys_mq_timedsend                compat_sys_mq_timedsend
> > +232     common  mq_timedreceive                 sys_mq_timedreceive             compat_sys_mq_timedreceive
> > +233     common  mq_notify                       sys_mq_notify                   compat_sys_mq_notify
> > +234     common  mq_getsetattr                   sys_mq_getsetattr               compat_sys_mq_getsetattr
> > +235     common  waitid                          sys_waitid                      compat_sys_waitid
> > +236     32      fadvise64_64                    parisc_fadvise64_64
> > +236     64      fadvise64_64                    sys_fadvise64_64                parisc_fadvise64_64
> > +237     common  set_tid_address                 sys_set_tid_address
> > +238     common  setxattr                        sys_setxattr
> > +239     common  lsetxattr                       sys_lsetxattr
> > +240     common  fsetxattr                       sys_fsetxattr
> > +241     common  getxattr                        sys_getxattr
> > +242     common  lgetxattr                       sys_lgetxattr
> > +243     common  fgetxattr                       sys_fgetxattr
> > +244     common  listxattr                       sys_listxattr
> > +245     common  llistxattr                      sys_llistxattr
> > +246     common  flistxattr                      sys_flistxattr
> > +247     common  removexattr                     sys_removexattr
> > +248     common  lremovexattr                    sys_lremovexattr
> > +249     common  fremovexattr                    sys_fremovexattr
> > +250     common  timer_create                    sys_timer_create                compat_sys_timer_create
> > +251     common  timer_settime                   sys_timer_settime               compat_sys_timer_settime
> > +252     common  timer_gettime                   sys_timer_gettime               compat_sys_timer_gettime
> > +253     common  timer_getoverrun                sys_timer_getoverrun
> > +254     common  timer_delete                    sys_timer_delete
> > +255     common  clock_settime                   sys_clock_settime               compat_sys_clock_settime
> > +256     common  clock_gettime                   sys_clock_gettime               compat_sys_clock_gettime
> > +257     common  clock_getres                    sys_clock_getres                compat_sys_clock_getres
> > +258     common  clock_nanosleep                 sys_clock_nanosleep             compat_sys_clock_nanosleep
> > +259     common  tgkill                          sys_tgkill
> > +260     common  mbind                           sys_mbind                       compat_sys_mbind
> > +261     common  get_mempolicy                   sys_get_mempolicy               compat_sys_get_mempolicy
> > +262     common  set_mempolicy                   sys_set_mempolicy               compat_sys_set_mempolicy

263 - vserver

> > +264     common  add_key                         sys_add_key
> > +265     common  request_key                     sys_request_key
> > +266     common  keyctl                          sys_keyctl                      compat_sys_keyctl
> > +267     common  ioprio_set                      sys_ioprio_set
> > +268     common  ioprio_get                      sys_ioprio_get
> > +269     common  inotify_init                    sys_inotify_init
> > +270     common  inotify_add_watch               sys_inotify_add_watch
> > +271     common  inotify_rm_watch                sys_inotify_rm_watch
> > +272     common  migrate_pages                   sys_migrate_pages
> > +273     common  pselect6                        sys_pselect6                    compat_sys_pselect6
> > +274     common  ppoll                           sys_ppoll                       compat_sys_ppoll
> > +275     common  openat                          sys_openat                      compat_sys_openat
> > +276     common  mkdirat                         sys_mkdirat
> > +277     common  mknodat                         sys_mknodat
> > +278     common  fchownat                        sys_fchownat
> > +279     common  futimesat                       sys_futimesat                   compat_sys_futimesat
> > +280     common  fstatat64                       sys_fstatat64
> > +281     common  unlinkat                        sys_unlinkat
> > +282     common  renameat                        sys_renameat
> > +283     common  linkat                          sys_linkat
> > +284     common  symlinkat                       sys_symlinkat
> > +285     common  readlinkat                      sys_readlinkat
> > +286     common  fchmodat                        sys_fchmodat
> > +287     common  faccessat                       sys_faccessat
> > +288     common  unshare                         sys_unshare
> > +289     common  set_robust_list                 sys_set_robust_list             compat_sys_set_robust_list
> > +290     common  get_robust_list                 sys_get_robust_list             compat_sys_get_robust_list
> > +291     common  splice                          sys_splice
> > +292     32      sync_file_range                 parisc_sync_file_range
> > +292     64      sync_file_range                 sys_sync_file_range             parisc_sync_file_range
> > +293     common  tee                             sys_tee
> > +294     common  vmsplice                        sys_vmsplice                    compat_sys_vmsplice
> > +295     common  move_pages                      sys_move_pages                  compat_sys_move_pages
> > +296     common  getcpu                          sys_getcpu
> > +297     common  epoll_pwait                     sys_epoll_pwait                 compat_sys_epoll_pwait
> > +298     common  statfs64                        sys_statfs64                    compat_sys_statfs64
> > +299     common  fstatfs64                       sys_fstatfs64                   compat_sys_fstatfs64
> > +300     common  kexec_load                      sys_kexec_load                  compat_sys_kexec_load
> > +301     common  utimensat                       sys_utimensat                   compat_sys_utimensat
> > +302     common  signalfd                        sys_signalfd                    compat_sys_signalfd

303 - timerfd

> > +304     common  eventfd                         sys_eventfd
> > +305     32      fallocate                       parisc_fallocate
> > +305     64      fallocate                       sys_fallocate                   parisc_fallocate
> > +306     common  timerfd_create                  sys_timerfd_create
> > +307     common  timerfd_settime                 sys_timerfd_settime             compat_sys_timerfd_settime
> > +308     common  timerfd_gettime                 sys_timerfd_gettime             compat_sys_timerfd_gettime
> > +309     common  signalfd4                       sys_signalfd4                   compat_sys_signalfd4
> > +310     common  eventfd2                        sys_eventfd2
> > +311     common  epoll_create1                   sys_epoll_create1
> > +312     common  dup3                            sys_dup3
> > +313     common  pipe2                           sys_pipe2
> > +314     common  inotify_init1                   sys_inotify_init1
> > +315     common  preadv                          sys_preadv                      compat_sys_preadv
> > +316     common  pwritev                         sys_pwritev                     compat_sys_pwritev
> > +317     common  rt_tgsigqueueinfo               sys_rt_tgsigqueueinfo           compat_sys_rt_tgsigqueueinfo
> > +318     common  perf_event_open                 sys_perf_event_open
> > +319     common  recvmmsg                        sys_recvmmsg                    compat_sys_recvmmsg
> > +320     common  accept4                         sys_accept4
> > +321     common  prlimit64                       sys_prlimit64
> > +322     common  fanotify_init                   sys_fanotify_init
> > +323     common  fanotify_mark                   sys_fanotify_mark               sys32_fanotify_mark
> > +324     common  clock_adjtime                   sys_clock_adjtime               compat_sys_clock_adjtime
> > +325     common  name_to_handle_at               sys_name_to_handle_at
> > +326     common  open_by_handle_at               sys_open_by_handle_at           compat_sys_open_by_handle_at
> > +327     common  syncfs                          sys_syncfs
> > +328     common  setns                           sys_setns
> > +329     common  sendmmsg                        sys_sendmmsg                    compat_sys_sendmmsg
> > +330     common  process_vm_readv                sys_process_vm_readv            compat_sys_process_vm_readv
> > +331     common  process_vm_writev               sys_process_vm_writev           compat_sys_process_vm_writev
> > +332     common  kcmp                            sys_kcmp
> > +333     common  finit_module                    sys_finit_module
> > +334     common  sched_setattr                   sys_sched_setattr
> > +335     common  sched_getattr                   sys_sched_getattr
> > +336     common  utimes                          sys_utimes                      compat_sys_utimes
> > +337     common  renameat2                       sys_renameat2
> > +338     common  seccomp                         sys_seccomp
> > +339     common  getrandom                       sys_getrandom
> > +340     common  memfd_create                    sys_memfd_create
> > +341     common  bpf                             sys_bpf
> > +342     common  execveat                        sys_execveat                    compat_sys_execveat
> > +343     common  membarrier                      sys_membarrier
> > +344     common  userfaultfd                     sys_userfaultfd
> > +345     common  mlock2                          sys_mlock2
> > +346     common  copy_file_range                 sys_copy_file_range
> > +347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > +349     common  statx                           sys_statx
> > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > \ No newline at end of file

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08 13:03     ` Eugene Syromiatnikov
@ 2018-10-08 13:03       ` Eugene Syromiatnikov
  2018-10-08 13:56       ` Arnd Bergmann
  1 sibling, 0 replies; 70+ messages in thread
From: Eugene Syromiatnikov @ 2018-10-08 13:03 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

> On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > new file mode 100644
> > index 0000000..4e85293
> > --- /dev/null
> > +++ b/arch/parisc/kernel/syscalls/syscall.tbl
> > @@ -0,0 +1,352 @@
> > +# SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
> > +#
> > +# system call numbers and entry vectors for parisc
> > +#
> > +# The format is:
> > +# <number> <abi> <name> <entry point> <compat entry point>
> > +#
> > +# The <abi> can be common, 64, or 32 for this file.
> > +#
> > +0       common  restart_syscall                 sys_restart_syscall
> > +1       common  exit                            sys_exit
> > +2       common  fork                            sys_fork_wrapper
> > +3       common  read                            sys_read
> > +4       common  write                           sys_write
> > +5       common  open                            sys_open                        compat_sys_open
> > +6       common  close                           sys_close
> > +7       common  waitpid                         sys_waitpid
> > +8       common  creat                           sys_creat
> > +9       common  link                            sys_link
> > +10      common  unlink                          sys_unlink
> > +11      common  execve                          sys_execve                      compat_sys_execve
> > +12      common  chdir                           sys_chdir
> > +13      common  time                            sys_time                        compat_sys_time
> > +14      common  mknod                           sys_mknod
> > +15      common  chmod                           sys_chmod
> > +16      common  lchown                          sys_lchown
> > +17      common  socket                          sys_socket
> > +18      common  stat                            sys_newstat                     compat_sys_newstat
> > +19      common  lseek                           sys_lseek                       compat_sys_lseek
> > +20      common  getpid                          sys_getpid
> > +21      common  mount                           sys_mount                       compat_sys_mount
> > +22      common  bind                            sys_bind
> > +23      common  setuid                          sys_setuid
> > +24      common  getuid                          sys_getuid
> > +25      common  stime                           sys_stime                       compat_sys_stime
> > +26      common  ptrace                          sys_ptrace                      compat_sys_ptrace
> > +27      common  alarm                           sys_alarm
> > +28      common  fstat                           sys_newfstat                    compat_sys_newfstat
> > +29      common  pause                           sys_pause
> > +30      common  utime                           sys_utime                       compat_sys_utime
> > +31      common  connect                         sys_connect
> > +32      common  listen                          sys_listen
> > +33      common  access                          sys_access
> > +34      common  nice                            sys_nice
> > +35      common  accept                          sys_accept
> > +36      common  sync                            sys_sync
> > +37      common  kill                            sys_kill
> > +38      common  rename                          sys_rename
> > +39      common  mkdir                           sys_mkdir
> > +40      common  rmdir                           sys_rmdir
> > +41      common  dup                             sys_dup
> > +42      common  pipe                            sys_pipe
> > +43      common  times                           sys_times                       compat_sys_times
> > +44      common  getsockname                     sys_getsockname
> > +45      common  brk                             sys_brk
> > +46      common  setgid                          sys_setgid
> > +47      common  getgid                          sys_getgid
> > +48      common  signal                          sys_signal
> > +49      common  geteuid                         sys_geteuid
> > +50      common  getegid                         sys_getegid
> > +51      common  acct                            sys_acct
> > +52      common  umount2                         sys_umount
> > +53      common  getpeername                     sys_getpeername
> > +54      common  ioctl                           sys_ioctl                       compat_sys_ioctl
> > +55      common  fcntl                           sys_fcntl                       compat_sys_fcntl
> > +56      common  socketpair                      sys_socketpair
> > +57      common  setpgid                         sys_setpgid
> > +58      common  send                            sys_send
> > +59      common  uname                           sys_newuname
> > +60      common  umask                           sys_umask
> > +61      common  chroot                          sys_chroot
> > +62      common  ustat                           sys_ustat                       compat_sys_ustat
> > +63      common  dup2                            sys_dup2
> > +64      common  getppid                         sys_getppid
> > +65      common  getpgrp                         sys_getpgrp
> > +66      common  setsid                          sys_setsid
> > +67      common  pivot_root                      sys_pivot_root
> > +68      common  sgetmask                        sys_sgetmask                    sys32_unimplemented
> > +69      common  ssetmask                        sys_ssetmask                    sys32_unimplemented
> > +70      common  setreuid                        sys_setreuid
> > +71      common  setregid                        sys_setregid
> > +72      common  mincore                         sys_mincore
> > +73      common  sigpending                      sys_sigpending                  compat_sys_sigpending
> > +74      common  sethostname                     sys_sethostname
> > +75      common  setrlimit                       sys_setrlimit                   compat_sys_setrlimit
> > +76      common  getrlimit                       sys_getrlimit                   compat_sys_getrlimit
> > +77      common  getrusage                       sys_getrusage                   compat_sys_getrusage
> > +78      common  gettimeofday                    sys_gettimeofday                compat_sys_gettimeofday
> > +79      common  settimeofday                    sys_settimeofday                compat_sys_settimeofday
> > +80      common  getgroups                       sys_getgroups
> > +81      common  setgroups                       sys_setgroups
> > +82      common  sendto                          sys_sendto
> > +83      common  symlink                         sys_symlink
> > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > +85      common  readlink                        sys_readlink
> > +86      common  uselib                          sys_ni_syscall

Why uselib is declared, contrary to all the skipped syscalls below,
that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
undefined in arch/parisc/include/uapi/asm/unistd.h.

> > +87      common  swapon                          sys_swapon
> > +88      common  reboot                          sys_reboot
> > +89      common  mmap2                           sys_mmap2
> > +90      common  mmap                            sys_mmap
> > +91      common  munmap                          sys_munmap
> > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > +94      common  fchmod                          sys_fchmod
> > +95      common  fchown                          sys_fchown
> > +96      common  getpriority                     sys_getpriority
> > +97      common  setpriority                     sys_setpriority
> > +98      common  recv                            sys_recv
> > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > +101     common  stat64                          sys_stat64

It is probably worth adding a comment here that syscall 102 was
socketcall, in order to make reason for this jump in syscall numeration
self-evident.

> > +103     common  syslog                          sys_syslog
> > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > +106     common  capget                          sys_capget
> > +107     common  capset                          sys_capset

> > +108     32      pread64                         parisc_pread64
> > +108     64      pread64                         sys_pread64                     parisc_pread64

It would be probably nice to have some syntax that would allow avoid
this duplication (as compat handler on 64 bit and native on 32 bit are
the same).

> > +109     32      pwrite64                        parisc_pwrite64
> > +109     64      pwrite64                        sys_pwrite64                    parisc_pwrite64
> > +110     common  getcwd                          sys_getcwd
> > +111     common  vhangup                         sys_vhangup
> > +112     common  fstat64                         sys_fstat64
> > +113     common  vfork                           sys_vfork_wrapper
> > +114     common  wait4                           sys_wait4                       compat_sys_wait4
> > +115     common  swapoff                         sys_swapoff
> > +116     common  sysinfo                         sys_sysinfo                     compat_sys_sysinfo
> > +117     common  shutdown                        sys_shutdown
> > +118     common  fsync                           sys_fsync
> > +119     common  madvise                         sys_madvise
> > +120     common  clone                           sys_clone_wrapper
> > +121     common  setdomainname                   sys_setdomainname
> > +122     common  sendfile                        sys_sendfile                    compat_sys_sendfile
> > +123     common  recvfrom                        sys_recvfrom
> > +124     common  adjtimex                        sys_adjtimex                    compat_sys_adjtimex
> > +125     common  mprotect                        sys_mprotect
> > +126     common  sigprocmask                     sys_sigprocmask                 compat_sys_sigprocmask

127 - create_module

> > +128     common  init_module                     sys_init_module
> > +129     common  delete_module                   sys_delete_module

130 - get_kernel_syms

> > +131     common  quotactl                        sys_quotactl
> > +132     common  getpgid                         sys_getpgid
> > +133     common  fchdir                          sys_fchdir
> > +134     common  bdflush                         sys_bdflush
> > +135     common  sysfs                           sys_sysfs
> > +136     32      personality                     parisc_personality
> > +136     64      personality                     sys_personality                 parisc_personality

136 - afs_syscall

> > +138     common  setfsuid                        sys_setfsuid
> > +139     common  setfsgid                        sys_setfsgid
> > +140     common  _llseek                         sys_llseek
> > +141     common  getdents                        sys_getdents                    compat_sys_getdents
> > +142     common  _newselect                      sys_select                      compat_sys_select
> > +143     common  flock                           sys_flock
> > +144     common  msync                           sys_msync
> > +145     common  readv                           sys_readv                       compat_sys_readv
> > +146     common  writev                          sys_writev                      compat_sys_writev
> > +147     common  getsid                          sys_getsid
> > +148     common  fdatasync                       sys_fdatasync
> > +149     common  _sysctl                         sys_sysctl                      compat_sys_sysctl
> > +150     common  mlock                           sys_mlock
> > +151     common  munlock                         sys_munlock
> > +152     common  mlockall                        sys_mlockall
> > +153     common  munlockall                      sys_munlockall
> > +154     common  sched_setparam                  sys_sched_setparam
> > +155     common  sched_getparam                  sys_sched_getparam
> > +156     common  sched_setscheduler              sys_sched_setscheduler
> > +157     common  sched_getscheduler              sys_sched_getscheduler
> > +158     common  sched_yield                     sys_sched_yield
> > +159     common  sched_get_priority_max          sys_sched_get_priority_max
> > +160     common  sched_get_priority_min          sys_sched_get_priority_min
> > +161     common  sched_rr_get_interval           sys_sched_rr_get_interval       compat_sys_sched_rr_get_interval
> > +162     common  nanosleep                       sys_nanosleep                   compat_sys_nanosleep
> > +163     common  mremap                          sys_mremap
> > +164     common  setresuid                       sys_setresuid
> > +165     common  getresuid                       sys_getresuid
> > +166     common  sigaltstack                     sys_sigaltstack                 compat_sys_sigaltstack

167 - query_module

> > +168     common  poll                            sys_poll

169 - nfsservctl

> > +170     common  setresgid                       sys_setresgid
> > +171     common  getresgid                       sys_getresgid
> > +172     common  prctl                           sys_prctl
> > +173     common  rt_sigreturn                    sys_rt_sigreturn
> > +174     common  rt_sigaction                    sys_rt_sigaction                compat_sys_rt_sigaction
> > +175     common  rt_sigprocmask                  sys_rt_sigprocmask              compat_sys_rt_sigprocmask
> > +176     common  rt_sigpending                   sys_rt_sigpending               compat_sys_rt_sigpending
> > +177     common  rt_sigtimedwait                 sys_rt_sigtimedwait             compat_sys_rt_sigtimedwait
> > +178     common  rt_sigqueueinfo                 sys_rt_sigqueueinfo             compat_sys_rt_sigqueueinfo
> > +179     common  rt_sigsuspend                   sys_rt_sigsuspend               compat_sys_rt_sigsuspend
> > +180     common  chown                           sys_chown
> > +181     common  setsockopt                      sys_setsockopt                  compat_sys_setsockopt
> > +182     common  getsockopt                      sys_getsockopt                  compat_sys_getsockopt
> > +183     common  sendmsg                         sys_sendmsg                     compat_sys_sendmsg
> > +184     common  recvmsg                         sys_recvmsg                     compat_sys_recvmsg
> > +185     common  semop                           sys_semop
> > +186     common  semget                          sys_semget
> > +187     common  semctl                          sys_semctl                      compat_sys_semctl
> > +188     common  msgsnd                          sys_msgsnd                      compat_sys_msgsnd
> > +189     common  msgrcv                          sys_msgrcv                      compat_sys_msgrcv
> > +190     common  msgget                          sys_msgget
> > +191     common  msgctl                          sys_msgctl                      compat_sys_msgctl
> > +192     common  shmat                           sys_shmat                       compat_sys_shmat
> > +193     common  shmdt                           sys_shmdt
> > +194     common  shmget                          sys_shmget
> > +195     common  shmctl                          sys_shmctl                      compat_sys_shmctl

196 - getpmsg
187 - putpmsg

> > +198     common  lstat64                         sys_lstat64
> > +199     32      truncate64                      parisc_truncate64
> > +199     64      truncate64                      sys_truncate64                  parisc_truncate64
> > +200     32      ftruncate64                     parisc_ftruncate64
> > +200     64      ftruncate64                     sys_ftruncate64                 parisc_ftruncate64
> > +201     common  getdents64                      sys_getdents64
> > +202     common  fcntl64                         sys_fcntl64                     compat_sys_fcntl64

203 - attrctl
204 - acl_get
205 - acl_set

> > +206     common  gettid                          sys_gettid
> > +207     32      readahead                       parisc_readahead
> > +207     64      readahead                       sys_readahead                   parisc_readahead
> > +208     common  tkill                           sys_tkill
> > +209     common  sendfile64                      sys_sendfile64                  compat_sys_sendfile64
> > +210     common  futex                           sys_futex                       compat_sys_futex
> > +211     common  sched_setaffinity               sys_sched_setaffinity           compat_sys_sched_setaffinity
> > +212     common  sched_getaffinity               sys_sched_getaffinity           compat_sys_sched_getaffinity

213 - set_thread_area
214 - get_thread_area

> > +215     common  io_setup                        sys_io_setup                    compat_sys_io_setup
> > +216     common  io_destroy                      sys_io_destroy
> > +217     common  io_getevents                    sys_io_getevents                compat_sys_io_getevents
> > +218     common  io_submit                       sys_io_submit                   compat_sys_io_submit
> > +219     common  io_cancel                       sys_io_cancel

220 - alloc_hugepages
221 - free_hugepages

> > +222     common  exit_group                      sys_exit_group
> > +223     common  lookup_dcookie                  sys_lookup_dcookie              compat_sys_lookup_dcookie
> > +224     common  epoll_create                    sys_epoll_create
> > +225     common  epoll_ctl                       sys_epoll_ctl
> > +226     common  epoll_wait                      sys_epoll_wait
> > +227     common  remap_file_pages                sys_remap_file_pages
> > +228     common  semtimedop                      sys_semtimedop                  compat_sys_semtimedop
> > +229     common  mq_open                         sys_mq_open                     compat_sys_mq_open
> > +230     common  mq_unlink                       sys_mq_unlink
> > +231     common  mq_timedsend                    sys_mq_timedsend                compat_sys_mq_timedsend
> > +232     common  mq_timedreceive                 sys_mq_timedreceive             compat_sys_mq_timedreceive
> > +233     common  mq_notify                       sys_mq_notify                   compat_sys_mq_notify
> > +234     common  mq_getsetattr                   sys_mq_getsetattr               compat_sys_mq_getsetattr
> > +235     common  waitid                          sys_waitid                      compat_sys_waitid
> > +236     32      fadvise64_64                    parisc_fadvise64_64
> > +236     64      fadvise64_64                    sys_fadvise64_64                parisc_fadvise64_64
> > +237     common  set_tid_address                 sys_set_tid_address
> > +238     common  setxattr                        sys_setxattr
> > +239     common  lsetxattr                       sys_lsetxattr
> > +240     common  fsetxattr                       sys_fsetxattr
> > +241     common  getxattr                        sys_getxattr
> > +242     common  lgetxattr                       sys_lgetxattr
> > +243     common  fgetxattr                       sys_fgetxattr
> > +244     common  listxattr                       sys_listxattr
> > +245     common  llistxattr                      sys_llistxattr
> > +246     common  flistxattr                      sys_flistxattr
> > +247     common  removexattr                     sys_removexattr
> > +248     common  lremovexattr                    sys_lremovexattr
> > +249     common  fremovexattr                    sys_fremovexattr
> > +250     common  timer_create                    sys_timer_create                compat_sys_timer_create
> > +251     common  timer_settime                   sys_timer_settime               compat_sys_timer_settime
> > +252     common  timer_gettime                   sys_timer_gettime               compat_sys_timer_gettime
> > +253     common  timer_getoverrun                sys_timer_getoverrun
> > +254     common  timer_delete                    sys_timer_delete
> > +255     common  clock_settime                   sys_clock_settime               compat_sys_clock_settime
> > +256     common  clock_gettime                   sys_clock_gettime               compat_sys_clock_gettime
> > +257     common  clock_getres                    sys_clock_getres                compat_sys_clock_getres
> > +258     common  clock_nanosleep                 sys_clock_nanosleep             compat_sys_clock_nanosleep
> > +259     common  tgkill                          sys_tgkill
> > +260     common  mbind                           sys_mbind                       compat_sys_mbind
> > +261     common  get_mempolicy                   sys_get_mempolicy               compat_sys_get_mempolicy
> > +262     common  set_mempolicy                   sys_set_mempolicy               compat_sys_set_mempolicy

263 - vserver

> > +264     common  add_key                         sys_add_key
> > +265     common  request_key                     sys_request_key
> > +266     common  keyctl                          sys_keyctl                      compat_sys_keyctl
> > +267     common  ioprio_set                      sys_ioprio_set
> > +268     common  ioprio_get                      sys_ioprio_get
> > +269     common  inotify_init                    sys_inotify_init
> > +270     common  inotify_add_watch               sys_inotify_add_watch
> > +271     common  inotify_rm_watch                sys_inotify_rm_watch
> > +272     common  migrate_pages                   sys_migrate_pages
> > +273     common  pselect6                        sys_pselect6                    compat_sys_pselect6
> > +274     common  ppoll                           sys_ppoll                       compat_sys_ppoll
> > +275     common  openat                          sys_openat                      compat_sys_openat
> > +276     common  mkdirat                         sys_mkdirat
> > +277     common  mknodat                         sys_mknodat
> > +278     common  fchownat                        sys_fchownat
> > +279     common  futimesat                       sys_futimesat                   compat_sys_futimesat
> > +280     common  fstatat64                       sys_fstatat64
> > +281     common  unlinkat                        sys_unlinkat
> > +282     common  renameat                        sys_renameat
> > +283     common  linkat                          sys_linkat
> > +284     common  symlinkat                       sys_symlinkat
> > +285     common  readlinkat                      sys_readlinkat
> > +286     common  fchmodat                        sys_fchmodat
> > +287     common  faccessat                       sys_faccessat
> > +288     common  unshare                         sys_unshare
> > +289     common  set_robust_list                 sys_set_robust_list             compat_sys_set_robust_list
> > +290     common  get_robust_list                 sys_get_robust_list             compat_sys_get_robust_list
> > +291     common  splice                          sys_splice
> > +292     32      sync_file_range                 parisc_sync_file_range
> > +292     64      sync_file_range                 sys_sync_file_range             parisc_sync_file_range
> > +293     common  tee                             sys_tee
> > +294     common  vmsplice                        sys_vmsplice                    compat_sys_vmsplice
> > +295     common  move_pages                      sys_move_pages                  compat_sys_move_pages
> > +296     common  getcpu                          sys_getcpu
> > +297     common  epoll_pwait                     sys_epoll_pwait                 compat_sys_epoll_pwait
> > +298     common  statfs64                        sys_statfs64                    compat_sys_statfs64
> > +299     common  fstatfs64                       sys_fstatfs64                   compat_sys_fstatfs64
> > +300     common  kexec_load                      sys_kexec_load                  compat_sys_kexec_load
> > +301     common  utimensat                       sys_utimensat                   compat_sys_utimensat
> > +302     common  signalfd                        sys_signalfd                    compat_sys_signalfd

303 - timerfd

> > +304     common  eventfd                         sys_eventfd
> > +305     32      fallocate                       parisc_fallocate
> > +305     64      fallocate                       sys_fallocate                   parisc_fallocate
> > +306     common  timerfd_create                  sys_timerfd_create
> > +307     common  timerfd_settime                 sys_timerfd_settime             compat_sys_timerfd_settime
> > +308     common  timerfd_gettime                 sys_timerfd_gettime             compat_sys_timerfd_gettime
> > +309     common  signalfd4                       sys_signalfd4                   compat_sys_signalfd4
> > +310     common  eventfd2                        sys_eventfd2
> > +311     common  epoll_create1                   sys_epoll_create1
> > +312     common  dup3                            sys_dup3
> > +313     common  pipe2                           sys_pipe2
> > +314     common  inotify_init1                   sys_inotify_init1
> > +315     common  preadv                          sys_preadv                      compat_sys_preadv
> > +316     common  pwritev                         sys_pwritev                     compat_sys_pwritev
> > +317     common  rt_tgsigqueueinfo               sys_rt_tgsigqueueinfo           compat_sys_rt_tgsigqueueinfo
> > +318     common  perf_event_open                 sys_perf_event_open
> > +319     common  recvmmsg                        sys_recvmmsg                    compat_sys_recvmmsg
> > +320     common  accept4                         sys_accept4
> > +321     common  prlimit64                       sys_prlimit64
> > +322     common  fanotify_init                   sys_fanotify_init
> > +323     common  fanotify_mark                   sys_fanotify_mark               sys32_fanotify_mark
> > +324     common  clock_adjtime                   sys_clock_adjtime               compat_sys_clock_adjtime
> > +325     common  name_to_handle_at               sys_name_to_handle_at
> > +326     common  open_by_handle_at               sys_open_by_handle_at           compat_sys_open_by_handle_at
> > +327     common  syncfs                          sys_syncfs
> > +328     common  setns                           sys_setns
> > +329     common  sendmmsg                        sys_sendmmsg                    compat_sys_sendmmsg
> > +330     common  process_vm_readv                sys_process_vm_readv            compat_sys_process_vm_readv
> > +331     common  process_vm_writev               sys_process_vm_writev           compat_sys_process_vm_writev
> > +332     common  kcmp                            sys_kcmp
> > +333     common  finit_module                    sys_finit_module
> > +334     common  sched_setattr                   sys_sched_setattr
> > +335     common  sched_getattr                   sys_sched_getattr
> > +336     common  utimes                          sys_utimes                      compat_sys_utimes
> > +337     common  renameat2                       sys_renameat2
> > +338     common  seccomp                         sys_seccomp
> > +339     common  getrandom                       sys_getrandom
> > +340     common  memfd_create                    sys_memfd_create
> > +341     common  bpf                             sys_bpf
> > +342     common  execveat                        sys_execveat                    compat_sys_execveat
> > +343     common  membarrier                      sys_membarrier
> > +344     common  userfaultfd                     sys_userfaultfd
> > +345     common  mlock2                          sys_mlock2
> > +346     common  copy_file_range                 sys_copy_file_range
> > +347     common  preadv2                         sys_preadv2                     compat_sys_preadv2
> > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > +349     common  statx                           sys_statx
> > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > \ No newline at end of file

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08 13:03     ` Eugene Syromiatnikov
  2018-10-08 13:03       ` Eugene Syromiatnikov
@ 2018-10-08 13:56       ` Arnd Bergmann
  2018-10-08 13:56         ` Arnd Bergmann
  2018-10-09  5:35         ` Firoz Khan
  1 sibling, 2 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-08 13:56 UTC (permalink / raw)
  To: Eugene Syromiatnikov
  Cc: Firoz Khan, Parisc List, James E.J. Bottomley, Helge Deller,
	Thomas Gleixner, gregkh, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, linux-arch,
	Deepa Dinamani, Marcin Juszkiewicz

On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
>
> > > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > > +85      common  readlink                        sys_readlink
> > > +86      common  uselib                          sys_ni_syscall
>
> Why uselib is declared, contrary to all the skipped syscalls below,
> that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
> undefined in arch/parisc/include/uapi/asm/unistd.h.

Good catch, I didn't see that in my earlier review. I agree we want the
files to be identical to the version they replace, so the macros need to
be there for now.

We may later decide to clean this up and remove all __NR_* that have
no entry point, but the conversion to the new table format needs to
otherwise be a nop.

> > > +87      common  swapon                          sys_swapon
> > > +88      common  reboot                          sys_reboot
> > > +89      common  mmap2                           sys_mmap2
> > > +90      common  mmap                            sys_mmap
> > > +91      common  munmap                          sys_munmap
> > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > +94      common  fchmod                          sys_fchmod
> > > +95      common  fchown                          sys_fchown
> > > +96      common  getpriority                     sys_getpriority
> > > +97      common  setpriority                     sys_setpriority
> > > +98      common  recv                            sys_recv
> > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > +101     common  stat64                          sys_stat64
>
> It is probably worth adding a comment here that syscall 102 was
> socketcall, in order to make reason for this jump in syscall numeration
> self-evident.

+1

In general, I'd argue we want to keep all the nontrivial comments that
were present in either unistd.h or syscall_table.S.

> > > +103     common  syslog                          sys_syslog
> > > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > > +106     common  capget                          sys_capget
> > > +107     common  capset                          sys_capset
>
> > > +108     32      pread64                         parisc_pread64
> > > +108     64      pread64                         sys_pread64                     parisc_pread64
>
> It would be probably nice to have some syntax that would allow avoid
> this duplication (as compat handler on 64 bit and native on 32 bit are
> the same).

I think I would prefer to have the compat table be generated with the '32'
abi rather than the '64' abi, so we end up with

108     32      pread64                         parisc_pread64
   parisc_pread64
108     64      pread64                         sys_pread64

I think this makes more sense, in particular on the other architectures
that have different macro names in some cases. When we do this,
the entries could get compressed to

108     32      pread64                         parisc_pread64
108     64      pread64                         sys_pread64

> > > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > +349     common  statx                           sys_statx
> > > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > \ No newline at end of file

As others have commented several times, Firoz still needs to fix
the missing newline.

Firoz, please fix all the newlines before you repost any further
patches.

      Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08 13:56       ` Arnd Bergmann
@ 2018-10-08 13:56         ` Arnd Bergmann
  2018-10-09  5:35         ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-08 13:56 UTC (permalink / raw)
  To: Eugene Syromiatnikov
  Cc: Firoz Khan, Parisc List, James E.J. Bottomley, Helge Deller,
	Thomas Gleixner, gregkh, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, linux-arch,
	Deepa Dinamani, Marcin Juszkiewicz

On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
>
> > > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > > +85      common  readlink                        sys_readlink
> > > +86      common  uselib                          sys_ni_syscall
>
> Why uselib is declared, contrary to all the skipped syscalls below,
> that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
> undefined in arch/parisc/include/uapi/asm/unistd.h.

Good catch, I didn't see that in my earlier review. I agree we want the
files to be identical to the version they replace, so the macros need to
be there for now.

We may later decide to clean this up and remove all __NR_* that have
no entry point, but the conversion to the new table format needs to
otherwise be a nop.

> > > +87      common  swapon                          sys_swapon
> > > +88      common  reboot                          sys_reboot
> > > +89      common  mmap2                           sys_mmap2
> > > +90      common  mmap                            sys_mmap
> > > +91      common  munmap                          sys_munmap
> > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > +94      common  fchmod                          sys_fchmod
> > > +95      common  fchown                          sys_fchown
> > > +96      common  getpriority                     sys_getpriority
> > > +97      common  setpriority                     sys_setpriority
> > > +98      common  recv                            sys_recv
> > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > +101     common  stat64                          sys_stat64
>
> It is probably worth adding a comment here that syscall 102 was
> socketcall, in order to make reason for this jump in syscall numeration
> self-evident.

+1

In general, I'd argue we want to keep all the nontrivial comments that
were present in either unistd.h or syscall_table.S.

> > > +103     common  syslog                          sys_syslog
> > > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > > +106     common  capget                          sys_capget
> > > +107     common  capset                          sys_capset
>
> > > +108     32      pread64                         parisc_pread64
> > > +108     64      pread64                         sys_pread64                     parisc_pread64
>
> It would be probably nice to have some syntax that would allow avoid
> this duplication (as compat handler on 64 bit and native on 32 bit are
> the same).

I think I would prefer to have the compat table be generated with the '32'
abi rather than the '64' abi, so we end up with

108     32      pread64                         parisc_pread64
   parisc_pread64
108     64      pread64                         sys_pread64

I think this makes more sense, in particular on the other architectures
that have different macro names in some cases. When we do this,
the entries could get compressed to

108     32      pread64                         parisc_pread64
108     64      pread64                         sys_pread64

> > > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > +349     common  statx                           sys_statx
> > > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > \ No newline at end of file

As others have commented several times, Firoz still needs to fix
the missing newline.

Firoz, please fix all the newlines before you repost any further
patches.

      Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-08  5:16 ` [PATCH v3 4/6] parisc: uapi header and system call table file generation Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
@ 2018-10-08 19:43   ` Helge Deller
  2018-10-08 19:43     ` Helge Deller
  2018-10-09  4:56     ` Firoz Khan
  2018-10-09 20:13   ` Helge Deller
  2 siblings, 2 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-08 19:43 UTC (permalink / raw)
  To: Firoz Khan, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel, marcin.juszkiewicz

On 08.10.2018 07:16, Firoz Khan wrote:
> System call table generation script must be run to generate
> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> will have changes which will invokes the script.
> 
> This patch will generate unistd_32/64.h and syscall_table_
> 32/64/c32.h files by the syscall table generation script
> invoked by arch/parisc/Makefile and the generated files against
> the removed files will be identical.
> 
> The generated uapi header file will be included in uapi/asm/
> unistd_32/64.h and generated system call table support file will
> be included by arch/sparc/kernel/syscall_table_32/64.S file.
> 
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
...
> diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
> index f10d065..76e3a3b 100644
> --- a/arch/parisc/include/uapi/asm/unistd.h
> +++ b/arch/parisc/include/uapi/asm/unistd.h
> @@ -2,374 +2,13 @@
>  #ifndef _UAPI_ASM_PARISC_UNISTD_H_
>  #define _UAPI_ASM_PARISC_UNISTD_H_
>  
...
> -
> -#ifdef __KERNEL__
> -#define __NR_syscalls           351
> +#define __NR_Linux           0
> +#ifdef CONFIG_64BIT

You can't use CONFIG_64BIT in an uapi header file.
It's only defined inside the kernel when building the kernel.
Please use
	#ifdef __LP64__
instead here.

> +#include <asm/unistd_64.h>
> +#else
> +#include <asm/unistd_32.h>
>  #endif

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-08 19:43   ` Helge Deller
@ 2018-10-08 19:43     ` Helge Deller
  2018-10-09  4:56     ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-08 19:43 UTC (permalink / raw)
  To: Firoz Khan, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart
  Cc: y2038, linux-kernel, linux-arch, arnd, deepa.kernel, marcin.juszkiewicz

On 08.10.2018 07:16, Firoz Khan wrote:
> System call table generation script must be run to generate
> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> will have changes which will invokes the script.
> 
> This patch will generate unistd_32/64.h and syscall_table_
> 32/64/c32.h files by the syscall table generation script
> invoked by arch/parisc/Makefile and the generated files against
> the removed files will be identical.
> 
> The generated uapi header file will be included in uapi/asm/
> unistd_32/64.h and generated system call table support file will
> be included by arch/sparc/kernel/syscall_table_32/64.S file.
> 
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
...
> diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
> index f10d065..76e3a3b 100644
> --- a/arch/parisc/include/uapi/asm/unistd.h
> +++ b/arch/parisc/include/uapi/asm/unistd.h
> @@ -2,374 +2,13 @@
>  #ifndef _UAPI_ASM_PARISC_UNISTD_H_
>  #define _UAPI_ASM_PARISC_UNISTD_H_
>  
...
> -
> -#ifdef __KERNEL__
> -#define __NR_syscalls           351
> +#define __NR_Linux           0
> +#ifdef CONFIG_64BIT

You can't use CONFIG_64BIT in an uapi header file.
It's only defined inside the kernel when building the kernel.
Please use
	#ifdef __LP64__
instead here.

> +#include <asm/unistd_64.h>
> +#else
> +#include <asm/unistd_32.h>
>  #endif

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-08 19:43   ` Helge Deller
  2018-10-08 19:43     ` Helge Deller
@ 2018-10-09  4:56     ` Firoz Khan
  2018-10-09  4:56       ` Firoz Khan
  1 sibling, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  4:56 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Tue, 9 Oct 2018 at 01:13, Helge Deller <deller@gmx.de> wrote:
>
> On 08.10.2018 07:16, Firoz Khan wrote:
> > System call table generation script must be run to generate
> > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > will have changes which will invokes the script.
> >
> > This patch will generate unistd_32/64.h and syscall_table_
> > 32/64/c32.h files by the syscall table generation script
> > invoked by arch/parisc/Makefile and the generated files against
> > the removed files will be identical.
> >
> > The generated uapi header file will be included in uapi/asm/
> > unistd_32/64.h and generated system call table support file will
> > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> >
> > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ...
> > diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
> > index f10d065..76e3a3b 100644
> > --- a/arch/parisc/include/uapi/asm/unistd.h
> > +++ b/arch/parisc/include/uapi/asm/unistd.h
> > @@ -2,374 +2,13 @@
> >  #ifndef _UAPI_ASM_PARISC_UNISTD_H_
> >  #define _UAPI_ASM_PARISC_UNISTD_H_
> >
> ...
> > -
> > -#ifdef __KERNEL__
> > -#define __NR_syscalls           351
> > +#define __NR_Linux           0
> > +#ifdef CONFIG_64BIT
>
> You can't use CONFIG_64BIT in an uapi header file.
> It's only defined inside the kernel when building the kernel.
> Please use
>         #ifdef __LP64__
> instead here.

Sure.  Thanks!
Firoz

>
> > +#include <asm/unistd_64.h>
> > +#else
> > +#include <asm/unistd_32.h>
> >  #endif

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-09  4:56     ` Firoz Khan
@ 2018-10-09  4:56       ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  4:56 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Tue, 9 Oct 2018 at 01:13, Helge Deller <deller@gmx.de> wrote:
>
> On 08.10.2018 07:16, Firoz Khan wrote:
> > System call table generation script must be run to generate
> > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > will have changes which will invokes the script.
> >
> > This patch will generate unistd_32/64.h and syscall_table_
> > 32/64/c32.h files by the syscall table generation script
> > invoked by arch/parisc/Makefile and the generated files against
> > the removed files will be identical.
> >
> > The generated uapi header file will be included in uapi/asm/
> > unistd_32/64.h and generated system call table support file will
> > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> >
> > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ...
> > diff --git a/arch/parisc/include/uapi/asm/unistd.h b/arch/parisc/include/uapi/asm/unistd.h
> > index f10d065..76e3a3b 100644
> > --- a/arch/parisc/include/uapi/asm/unistd.h
> > +++ b/arch/parisc/include/uapi/asm/unistd.h
> > @@ -2,374 +2,13 @@
> >  #ifndef _UAPI_ASM_PARISC_UNISTD_H_
> >  #define _UAPI_ASM_PARISC_UNISTD_H_
> >
> ...
> > -
> > -#ifdef __KERNEL__
> > -#define __NR_syscalls           351
> > +#define __NR_Linux           0
> > +#ifdef CONFIG_64BIT
>
> You can't use CONFIG_64BIT in an uapi header file.
> It's only defined inside the kernel when building the kernel.
> Please use
>         #ifdef __LP64__
> instead here.

Sure.  Thanks!
Firoz

>
> > +#include <asm/unistd_64.h>
> > +#else
> > +#include <asm/unistd_32.h>
> >  #endif

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-08 13:56       ` Arnd Bergmann
  2018-10-08 13:56         ` Arnd Bergmann
@ 2018-10-09  5:35         ` Firoz Khan
  2018-10-09  5:35           ` Firoz Khan
                             ` (2 more replies)
  1 sibling, 3 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  5:35 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Eugene, Arnd,

On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > > > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> >
> > > > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > > > +85      common  readlink                        sys_readlink
> > > > +86      common  uselib                          sys_ni_syscall
> >
> > Why uselib is declared, contrary to all the skipped syscalls below,
> > that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
> > undefined in arch/parisc/include/uapi/asm/unistd.h.
>
> Good catch, I didn't see that in my earlier review. I agree we want the
> files to be identical to the version they replace, so the macros need to
> be there for now.
>
> We may later decide to clean this up and remove all __NR_* that have
> no entry point, but the conversion to the new table format needs to
> otherwise be a nop.
>
> > > > +87      common  swapon                          sys_swapon
> > > > +88      common  reboot                          sys_reboot
> > > > +89      common  mmap2                           sys_mmap2
> > > > +90      common  mmap                            sys_mmap
> > > > +91      common  munmap                          sys_munmap
> > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > +94      common  fchmod                          sys_fchmod
> > > > +95      common  fchown                          sys_fchown
> > > > +96      common  getpriority                     sys_getpriority
> > > > +97      common  setpriority                     sys_setpriority
> > > > +98      common  recv                            sys_recv
> > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > +101     common  stat64                          sys_stat64
> >
> > It is probably worth adding a comment here that syscall 102 was
> > socketcall, in order to make reason for this jump in syscall numeration
> > self-evident.
>
> +1
>
> In general, I'd argue we want to keep all the nontrivial comments that
> were present in either unistd.h or syscall_table.S.

unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
syscall_table_c32.h
are generated files. unistd.h and syscall_table.S file include
generated files. I had the
support to keep the comments in the generated files.

Eg:- from github
https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105

But I got to know the generated file don't carry any license info and
comment section. That's
why I removed it from all architecture.

I'm ok to keep this support for all architecture. Please feel free to
comment here.

>
> > > > +103     common  syslog                          sys_syslog
> > > > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > > > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > > > +106     common  capget                          sys_capget
> > > > +107     common  capset                          sys_capset
> >
> > > > +108     32      pread64                         parisc_pread64
> > > > +108     64      pread64                         sys_pread64                     parisc_pread64
> >
> > It would be probably nice to have some syntax that would allow avoid
> > this duplication (as compat handler on 64 bit and native on 32 bit are
> > the same).
>
> I think I would prefer to have the compat table be generated with the '32'
> abi rather than the '64' abi, so we end up with
>
> 108     32      pread64                         parisc_pread64
>    parisc_pread64
> 108     64      pread64                         sys_pread64
>
> I think this makes more sense, in particular on the other architectures
> that have different macro names in some cases. When we do this,
> the entries could get compressed to
>
> 108     32      pread64                         parisc_pread64
> 108     64      pread64                         sys_pread64
>

Sure. I can do this thing. The above one may be applicable for parisc not other
architecture. So the scripts might be slightly different. If we keep a
standard way,
the script will be unique. So the only difference will be Makefile and
.tbl files for all
architecture; I think that is our one of the goal.

> > > > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > > +349     common  statx                           sys_statx
> > > > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > > \ No newline at end of file
>
> As others have commented several times, Firoz still needs to fix
> the missing newline.

Sure. I was wondering why the checkpatch script is not catching this one.
Where ever I came across I fixed it.

Thanks
Firoz

>
> Firoz, please fix all the newlines before you repost any further
> patches.
>
>       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  5:35         ` Firoz Khan
@ 2018-10-09  5:35           ` Firoz Khan
  2018-10-09  5:40           ` Firoz Khan
  2018-10-09  7:47           ` Arnd Bergmann
  2 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  5:35 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Eugene, Arnd,

On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > > > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> >
> > > > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > > > +85      common  readlink                        sys_readlink
> > > > +86      common  uselib                          sys_ni_syscall
> >
> > Why uselib is declared, contrary to all the skipped syscalls below,
> > that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
> > undefined in arch/parisc/include/uapi/asm/unistd.h.
>
> Good catch, I didn't see that in my earlier review. I agree we want the
> files to be identical to the version they replace, so the macros need to
> be there for now.
>
> We may later decide to clean this up and remove all __NR_* that have
> no entry point, but the conversion to the new table format needs to
> otherwise be a nop.
>
> > > > +87      common  swapon                          sys_swapon
> > > > +88      common  reboot                          sys_reboot
> > > > +89      common  mmap2                           sys_mmap2
> > > > +90      common  mmap                            sys_mmap
> > > > +91      common  munmap                          sys_munmap
> > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > +94      common  fchmod                          sys_fchmod
> > > > +95      common  fchown                          sys_fchown
> > > > +96      common  getpriority                     sys_getpriority
> > > > +97      common  setpriority                     sys_setpriority
> > > > +98      common  recv                            sys_recv
> > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > +101     common  stat64                          sys_stat64
> >
> > It is probably worth adding a comment here that syscall 102 was
> > socketcall, in order to make reason for this jump in syscall numeration
> > self-evident.
>
> +1
>
> In general, I'd argue we want to keep all the nontrivial comments that
> were present in either unistd.h or syscall_table.S.

unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
syscall_table_c32.h
are generated files. unistd.h and syscall_table.S file include
generated files. I had the
support to keep the comments in the generated files.

Eg:- from github
https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105

But I got to know the generated file don't carry any license info and
comment section. That's
why I removed it from all architecture.

I'm ok to keep this support for all architecture. Please feel free to
comment here.

>
> > > > +103     common  syslog                          sys_syslog
> > > > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > > > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > > > +106     common  capget                          sys_capget
> > > > +107     common  capset                          sys_capset
> >
> > > > +108     32      pread64                         parisc_pread64
> > > > +108     64      pread64                         sys_pread64                     parisc_pread64
> >
> > It would be probably nice to have some syntax that would allow avoid
> > this duplication (as compat handler on 64 bit and native on 32 bit are
> > the same).
>
> I think I would prefer to have the compat table be generated with the '32'
> abi rather than the '64' abi, so we end up with
>
> 108     32      pread64                         parisc_pread64
>    parisc_pread64
> 108     64      pread64                         sys_pread64
>
> I think this makes more sense, in particular on the other architectures
> that have different macro names in some cases. When we do this,
> the entries could get compressed to
>
> 108     32      pread64                         parisc_pread64
> 108     64      pread64                         sys_pread64
>

Sure. I can do this thing. The above one may be applicable for parisc not other
architecture. So the scripts might be slightly different. If we keep a
standard way,
the script will be unique. So the only difference will be Makefile and
.tbl files for all
architecture; I think that is our one of the goal.

> > > > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > > +349     common  statx                           sys_statx
> > > > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > > \ No newline at end of file
>
> As others have commented several times, Firoz still needs to fix
> the missing newline.

Sure. I was wondering why the checkpatch script is not catching this one.
Where ever I came across I fixed it.

Thanks
Firoz

>
> Firoz, please fix all the newlines before you repost any further
> patches.
>
>       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  5:35         ` Firoz Khan
  2018-10-09  5:35           ` Firoz Khan
@ 2018-10-09  5:40           ` Firoz Khan
  2018-10-09  5:40             ` Firoz Khan
  2018-10-09  7:47           ` Arnd Bergmann
  2 siblings, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  5:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

On Tue, 9 Oct 2018 at 11:05, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> Hi Eugene, Arnd,
>
> On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > > On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > > > > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > >
> > > > > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > > > > +85      common  readlink                        sys_readlink
> > > > > +86      common  uselib                          sys_ni_syscall
> > >
> > > Why uselib is declared, contrary to all the skipped syscalls below,
> > > that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
> > > undefined in arch/parisc/include/uapi/asm/unistd.h.
> >
> > Good catch, I didn't see that in my earlier review. I agree we want the
> > files to be identical to the version they replace, so the macros need to
> > be there for now.
> >
> > We may later decide to clean this up and remove all __NR_* that have
> > no entry point, but the conversion to the new table format needs to
> > otherwise be a nop.
> >
> > > > > +87      common  swapon                          sys_swapon
> > > > > +88      common  reboot                          sys_reboot
> > > > > +89      common  mmap2                           sys_mmap2
> > > > > +90      common  mmap                            sys_mmap
> > > > > +91      common  munmap                          sys_munmap
> > > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > > +94      common  fchmod                          sys_fchmod
> > > > > +95      common  fchown                          sys_fchown
> > > > > +96      common  getpriority                     sys_getpriority
> > > > > +97      common  setpriority                     sys_setpriority
> > > > > +98      common  recv                            sys_recv
> > > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > > +101     common  stat64                          sys_stat64
> > >
> > > It is probably worth adding a comment here that syscall 102 was
> > > socketcall, in order to make reason for this jump in syscall numeration
> > > self-evident.
> >
> > +1
> >
> > In general, I'd argue we want to keep all the nontrivial comments that
> > were present in either unistd.h or syscall_table.S.
>
> unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
> syscall_table_c32.h
> are generated files. unistd.h and syscall_table.S file include
> generated files. I had the
> support to keep the comments in the generated files.
>
> Eg:- from github
> https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105
>
> But I got to know the generated file don't carry any license info and
> comment section. That's
> why I removed it from all architecture.
>
> I'm ok to keep this support for all architecture. Please feel free to
> comment here.

My suggestion is to leave the non trivial comments only in the .tbl file.

Thanks
Firoz

>
> >
> > > > > +103     common  syslog                          sys_syslog
> > > > > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > > > > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > > > > +106     common  capget                          sys_capget
> > > > > +107     common  capset                          sys_capset
> > >
> > > > > +108     32      pread64                         parisc_pread64
> > > > > +108     64      pread64                         sys_pread64                     parisc_pread64
> > >
> > > It would be probably nice to have some syntax that would allow avoid
> > > this duplication (as compat handler on 64 bit and native on 32 bit are
> > > the same).
> >
> > I think I would prefer to have the compat table be generated with the '32'
> > abi rather than the '64' abi, so we end up with
> >
> > 108     32      pread64                         parisc_pread64
> >    parisc_pread64
> > 108     64      pread64                         sys_pread64
> >
> > I think this makes more sense, in particular on the other architectures
> > that have different macro names in some cases. When we do this,
> > the entries could get compressed to
> >
> > 108     32      pread64                         parisc_pread64
> > 108     64      pread64                         sys_pread64
> >
>
> Sure. I can do this thing. The above one may be applicable for parisc not other
> architecture. So the scripts might be slightly different. If we keep a
> standard way,
> the script will be unique. So the only difference will be Makefile and
> .tbl files for all
> architecture; I think that is our one of the goal.
>
> > > > > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > > > +349     common  statx                           sys_statx
> > > > > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > > > \ No newline at end of file
> >
> > As others have commented several times, Firoz still needs to fix
> > the missing newline.
>
> Sure. I was wondering why the checkpatch script is not catching this one.
> Where ever I came across I fixed it.
>
> Thanks
> Firoz
>
> >
> > Firoz, please fix all the newlines before you repost any further
> > patches.
> >
> >       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  5:40           ` Firoz Khan
@ 2018-10-09  5:40             ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  5:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

On Tue, 9 Oct 2018 at 11:05, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> Hi Eugene, Arnd,
>
> On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > > On Mon, 8 Oct 2018 at 10:47, Firoz Khan <firoz.khan@linaro.org> wrote:
> > > > > diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
> > >
> > > > > +84      common  lstat                           sys_newlstat                    compat_sys_newlstat
> > > > > +85      common  readlink                        sys_readlink
> > > > > +86      common  uselib                          sys_ni_syscall
> > >
> > > Why uselib is declared, contrary to all the skipped syscalls below,
> > > that were sys_ni_syscall previously? Only __NR_socketcall was explicitly
> > > undefined in arch/parisc/include/uapi/asm/unistd.h.
> >
> > Good catch, I didn't see that in my earlier review. I agree we want the
> > files to be identical to the version they replace, so the macros need to
> > be there for now.
> >
> > We may later decide to clean this up and remove all __NR_* that have
> > no entry point, but the conversion to the new table format needs to
> > otherwise be a nop.
> >
> > > > > +87      common  swapon                          sys_swapon
> > > > > +88      common  reboot                          sys_reboot
> > > > > +89      common  mmap2                           sys_mmap2
> > > > > +90      common  mmap                            sys_mmap
> > > > > +91      common  munmap                          sys_munmap
> > > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > > +94      common  fchmod                          sys_fchmod
> > > > > +95      common  fchown                          sys_fchown
> > > > > +96      common  getpriority                     sys_getpriority
> > > > > +97      common  setpriority                     sys_setpriority
> > > > > +98      common  recv                            sys_recv
> > > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > > +101     common  stat64                          sys_stat64
> > >
> > > It is probably worth adding a comment here that syscall 102 was
> > > socketcall, in order to make reason for this jump in syscall numeration
> > > self-evident.
> >
> > +1
> >
> > In general, I'd argue we want to keep all the nontrivial comments that
> > were present in either unistd.h or syscall_table.S.
>
> unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
> syscall_table_c32.h
> are generated files. unistd.h and syscall_table.S file include
> generated files. I had the
> support to keep the comments in the generated files.
>
> Eg:- from github
> https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105
>
> But I got to know the generated file don't carry any license info and
> comment section. That's
> why I removed it from all architecture.
>
> I'm ok to keep this support for all architecture. Please feel free to
> comment here.

My suggestion is to leave the non trivial comments only in the .tbl file.

Thanks
Firoz

>
> >
> > > > > +103     common  syslog                          sys_syslog
> > > > > +104     common  setitimer                       sys_setitimer                   compat_sys_setitimer
> > > > > +105     common  getitimer                       sys_getitimer                   compat_sys_getitimer
> > > > > +106     common  capget                          sys_capget
> > > > > +107     common  capset                          sys_capset
> > >
> > > > > +108     32      pread64                         parisc_pread64
> > > > > +108     64      pread64                         sys_pread64                     parisc_pread64
> > >
> > > It would be probably nice to have some syntax that would allow avoid
> > > this duplication (as compat handler on 64 bit and native on 32 bit are
> > > the same).
> >
> > I think I would prefer to have the compat table be generated with the '32'
> > abi rather than the '64' abi, so we end up with
> >
> > 108     32      pread64                         parisc_pread64
> >    parisc_pread64
> > 108     64      pread64                         sys_pread64
> >
> > I think this makes more sense, in particular on the other architectures
> > that have different macro names in some cases. When we do this,
> > the entries could get compressed to
> >
> > 108     32      pread64                         parisc_pread64
> > 108     64      pread64                         sys_pread64
> >
>
> Sure. I can do this thing. The above one may be applicable for parisc not other
> architecture. So the scripts might be slightly different. If we keep a
> standard way,
> the script will be unique. So the only difference will be Makefile and
> .tbl files for all
> architecture; I think that is our one of the goal.
>
> > > > > +348     common  pwritev2                        sys_pwritev2                    compat_sys_pwritev2
> > > > > +349     common  statx                           sys_statx
> > > > > +350    common  io_pgetevents                   sys_io_pgetevents               compat_sys_io_pgetevents
> > > > > \ No newline at end of file
> >
> > As others have commented several times, Firoz still needs to fix
> > the missing newline.
>
> Sure. I was wondering why the checkpatch script is not catching this one.
> Where ever I came across I fixed it.
>
> Thanks
> Firoz
>
> >
> > Firoz, please fix all the newlines before you repost any further
> > patches.
> >
> >       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  5:35         ` Firoz Khan
  2018-10-09  5:35           ` Firoz Khan
  2018-10-09  5:40           ` Firoz Khan
@ 2018-10-09  7:47           ` Arnd Bergmann
  2018-10-09  7:47             ` Arnd Bergmann
  2018-10-09  9:36             ` Firoz Khan
  2 siblings, 2 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-09  7:47 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Eugene Syromiatnikov, Parisc List, James E.J. Bottomley,
	Helge Deller, Thomas Gleixner, gregkh, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	linux-arch, Deepa Dinamani, Marcin Juszkiewicz

On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > > > +87      common  swapon                          sys_swapon
> > > > > +88      common  reboot                          sys_reboot
> > > > > +89      common  mmap2                           sys_mmap2
> > > > > +90      common  mmap                            sys_mmap
> > > > > +91      common  munmap                          sys_munmap
> > > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > > +94      common  fchmod                          sys_fchmod
> > > > > +95      common  fchown                          sys_fchown
> > > > > +96      common  getpriority                     sys_getpriority
> > > > > +97      common  setpriority                     sys_setpriority
> > > > > +98      common  recv                            sys_recv
> > > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > > +101     common  stat64                          sys_stat64
> > >
> > > It is probably worth adding a comment here that syscall 102 was
> > > socketcall, in order to make reason for this jump in syscall numeration
> > > self-evident.
> >
> > +1
> >
> > In general, I'd argue we want to keep all the nontrivial comments that
> > were present in either unistd.h or syscall_table.S.
>
> unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
> syscall_table_c32.h
> are generated files. unistd.h and syscall_table.S file include
> generated files. I had the
> support to keep the comments in the generated files.
>
> Eg:- from github
> https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105
>
> But I got to know the generated file don't carry any license info and
> comment section. That's
> why I removed it from all architecture.
>
> I'm ok to keep this support for all architecture. Please feel free to
> comment here.

I meant just have the comments in the .tbl file, but not act on them.
One way to do this would be to let the script ignore everything
past the first '#' character in a line by passing it through 'sed -e "s:#.*$::"'
or a similar step (there is probably a nicer way to do this with
shell built-ins).

> > I think this makes more sense, in particular on the other architectures
> > that have different macro names in some cases. When we do this,
> > the entries could get compressed to
> >
> > 108     32      pread64                         parisc_pread64
> > 108     64      pread64                         sys_pread64
> >
>
> Sure. I can do this thing. The above one may be applicable for parisc not other
> architecture. So the scripts might be slightly different. If we keep a
> standard way,
> the script will be unique. So the only difference will be Makefile and
> .tbl files for all
> architecture; I think that is our one of the goal.

I would expect the above to actually be more important on other
architectures. E.g. on powerpc:

291     32    fstatat64        sys_fstatat64      sys_fstatat64
291     64    newfstatat     newfstatat

or (simplified)

291     32    fstatat64        sys_fstatat64
291     64    newfstatat     newfstatat

makes much more sense than

291     32    fstatat64        sys_fstatat64
291     64    newfstatat     newfstatat           sys_fstatat64

        Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  7:47           ` Arnd Bergmann
@ 2018-10-09  7:47             ` Arnd Bergmann
  2018-10-09  9:36             ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-09  7:47 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Eugene Syromiatnikov, Parisc List, James E.J. Bottomley,
	Helge Deller, Thomas Gleixner, gregkh, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	linux-arch, Deepa Dinamani, Marcin Juszkiewicz

On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > > > +87      common  swapon                          sys_swapon
> > > > > +88      common  reboot                          sys_reboot
> > > > > +89      common  mmap2                           sys_mmap2
> > > > > +90      common  mmap                            sys_mmap
> > > > > +91      common  munmap                          sys_munmap
> > > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > > +94      common  fchmod                          sys_fchmod
> > > > > +95      common  fchown                          sys_fchown
> > > > > +96      common  getpriority                     sys_getpriority
> > > > > +97      common  setpriority                     sys_setpriority
> > > > > +98      common  recv                            sys_recv
> > > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > > +101     common  stat64                          sys_stat64
> > >
> > > It is probably worth adding a comment here that syscall 102 was
> > > socketcall, in order to make reason for this jump in syscall numeration
> > > self-evident.
> >
> > +1
> >
> > In general, I'd argue we want to keep all the nontrivial comments that
> > were present in either unistd.h or syscall_table.S.
>
> unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
> syscall_table_c32.h
> are generated files. unistd.h and syscall_table.S file include
> generated files. I had the
> support to keep the comments in the generated files.
>
> Eg:- from github
> https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105
>
> But I got to know the generated file don't carry any license info and
> comment section. That's
> why I removed it from all architecture.
>
> I'm ok to keep this support for all architecture. Please feel free to
> comment here.

I meant just have the comments in the .tbl file, but not act on them.
One way to do this would be to let the script ignore everything
past the first '#' character in a line by passing it through 'sed -e "s:#.*$::"'
or a similar step (there is probably a nicer way to do this with
shell built-ins).

> > I think this makes more sense, in particular on the other architectures
> > that have different macro names in some cases. When we do this,
> > the entries could get compressed to
> >
> > 108     32      pread64                         parisc_pread64
> > 108     64      pread64                         sys_pread64
> >
>
> Sure. I can do this thing. The above one may be applicable for parisc not other
> architecture. So the scripts might be slightly different. If we keep a
> standard way,
> the script will be unique. So the only difference will be Makefile and
> .tbl files for all
> architecture; I think that is our one of the goal.

I would expect the above to actually be more important on other
architectures. E.g. on powerpc:

291     32    fstatat64        sys_fstatat64      sys_fstatat64
291     64    newfstatat     newfstatat

or (simplified)

291     32    fstatat64        sys_fstatat64
291     64    newfstatat     newfstatat

makes much more sense than

291     32    fstatat64        sys_fstatat64
291     64    newfstatat     newfstatat           sys_fstatat64

        Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  7:47           ` Arnd Bergmann
  2018-10-09  7:47             ` Arnd Bergmann
@ 2018-10-09  9:36             ` Firoz Khan
  2018-10-09  9:36               ` Firoz Khan
  2018-10-09 11:28               ` Arnd Bergmann
  1 sibling, 2 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  9:36 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Arnd,

On Tue, 9 Oct 2018 at 13:18, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > > > > +87      common  swapon                          sys_swapon
> > > > > > +88      common  reboot                          sys_reboot
> > > > > > +89      common  mmap2                           sys_mmap2
> > > > > > +90      common  mmap                            sys_mmap
> > > > > > +91      common  munmap                          sys_munmap
> > > > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > > > +94      common  fchmod                          sys_fchmod
> > > > > > +95      common  fchown                          sys_fchown
> > > > > > +96      common  getpriority                     sys_getpriority
> > > > > > +97      common  setpriority                     sys_setpriority
> > > > > > +98      common  recv                            sys_recv
> > > > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > > > +101     common  stat64                          sys_stat64
> > > >
> > > > It is probably worth adding a comment here that syscall 102 was
> > > > socketcall, in order to make reason for this jump in syscall numeration
> > > > self-evident.
> > >
> > > +1
> > >
> > > In general, I'd argue we want to keep all the nontrivial comments that
> > > were present in either unistd.h or syscall_table.S.
> >
> > unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
> > syscall_table_c32.h
> > are generated files. unistd.h and syscall_table.S file include
> > generated files. I had the
> > support to keep the comments in the generated files.
> >
> > Eg:- from github
> > https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105
> >
> > But I got to know the generated file don't carry any license info and
> > comment section. That's
> > why I removed it from all architecture.
> >
> > I'm ok to keep this support for all architecture. Please feel free to
> > comment here.
>
> I meant just have the comments in the .tbl file, but not act on them.
> One way to do this would be to let the script ignore everything
> past the first '#' character in a line by passing it through 'sed -e "s:#.*$::"'
> or a similar step (there is probably a nicer way to do this with
> shell built-ins).

Sure, I can keep the comments in the .tbl file for all architecture. But
generated file doesn't have the comments.

>
> > > I think this makes more sense, in particular on the other architectures
> > > that have different macro names in some cases. When we do this,
> > > the entries could get compressed to
> > >
> > > 108     32      pread64                         parisc_pread64
> > > 108     64      pread64                         sys_pread64
> > >
> >
> > Sure. I can do this thing. The above one may be applicable for parisc not other
> > architecture. So the scripts might be slightly different. If we keep a
> > standard way,
> > the script will be unique. So the only difference will be Makefile and
> > .tbl files for all
> > architecture; I think that is our one of the goal.
>
> I would expect the above to actually be more important on other
> architectures. E.g. on powerpc:
>
> 291     32    fstatat64        sys_fstatat64      sys_fstatat64
> 291     64    newfstatat     newfstatat
>
> or (simplified)
>
> 291     32    fstatat64        sys_fstatat64
> 291     64    newfstatat     sys_newfstatat

In parisc, I'll go with the above model.

Let me bring another example from powerpc:

syscall_32.tbl,
136     common  personality                     sys_personality
         ppc64_personality   ---> 32-bit, compat (this is the current
model which I implemented)
syscall_64.tbl
136     common  personality                     ppc64_personality
                                       ---> 64-bit

I was wondering if the above table is right, how to arrange like parisc model?
FYI, there are some implement missing for SPU in powerpc

For your reference:
SYSX_SPU(sys_newfstatat,sys_fstatat64,sys_fstatat64)
SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)

Thanks
Firoz
>
> makes much more sense than
>
> 291     32    fstatat64        sys_fstatat64
> 291     64    newfstatat     newfstatat           sys_fstatat64
>
>         Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  9:36             ` Firoz Khan
@ 2018-10-09  9:36               ` Firoz Khan
  2018-10-09 11:28               ` Arnd Bergmann
  1 sibling, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-09  9:36 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Arnd,

On Tue, 9 Oct 2018 at 13:18, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Mon, Oct 8, 2018 at 3:02 PM Eugene Syromiatnikov <esyr@redhat.com> wrote:
> > > > > > +87      common  swapon                          sys_swapon
> > > > > > +88      common  reboot                          sys_reboot
> > > > > > +89      common  mmap2                           sys_mmap2
> > > > > > +90      common  mmap                            sys_mmap
> > > > > > +91      common  munmap                          sys_munmap
> > > > > > +92      common  truncate                        sys_truncate                    compat_sys_truncate
> > > > > > +93      common  ftruncate                       sys_ftruncate                   compat_sys_ftruncate
> > > > > > +94      common  fchmod                          sys_fchmod
> > > > > > +95      common  fchown                          sys_fchown
> > > > > > +96      common  getpriority                     sys_getpriority
> > > > > > +97      common  setpriority                     sys_setpriority
> > > > > > +98      common  recv                            sys_recv
> > > > > > +99      common  statfs                          sys_statfs                      compat_sys_statfs
> > > > > > +100     common  fstatfs                         sys_fstatfs                     compat_sys_fstatfs
> > > > > > +101     common  stat64                          sys_stat64
> > > >
> > > > It is probably worth adding a comment here that syscall 102 was
> > > > socketcall, in order to make reason for this jump in syscall numeration
> > > > self-evident.
> > >
> > > +1
> > >
> > > In general, I'd argue we want to keep all the nontrivial comments that
> > > were present in either unistd.h or syscall_table.S.
> >
> > unistd_32.h, unistd_64.h, syscall_table_32.h, syscall_table_64.h and
> > syscall_table_c32.h
> > are generated files. unistd.h and syscall_table.S file include
> > generated files. I had the
> > support to keep the comments in the generated files.
> >
> > Eg:- from github
> > https://github.com/frzkhn/system_call_table_generator/blob/5fe5fb5a3ad457b234e7600d8a4b61b2e3629acd/ia64/syscall.tbl#L105
> >
> > But I got to know the generated file don't carry any license info and
> > comment section. That's
> > why I removed it from all architecture.
> >
> > I'm ok to keep this support for all architecture. Please feel free to
> > comment here.
>
> I meant just have the comments in the .tbl file, but not act on them.
> One way to do this would be to let the script ignore everything
> past the first '#' character in a line by passing it through 'sed -e "s:#.*$::"'
> or a similar step (there is probably a nicer way to do this with
> shell built-ins).

Sure, I can keep the comments in the .tbl file for all architecture. But
generated file doesn't have the comments.

>
> > > I think this makes more sense, in particular on the other architectures
> > > that have different macro names in some cases. When we do this,
> > > the entries could get compressed to
> > >
> > > 108     32      pread64                         parisc_pread64
> > > 108     64      pread64                         sys_pread64
> > >
> >
> > Sure. I can do this thing. The above one may be applicable for parisc not other
> > architecture. So the scripts might be slightly different. If we keep a
> > standard way,
> > the script will be unique. So the only difference will be Makefile and
> > .tbl files for all
> > architecture; I think that is our one of the goal.
>
> I would expect the above to actually be more important on other
> architectures. E.g. on powerpc:
>
> 291     32    fstatat64        sys_fstatat64      sys_fstatat64
> 291     64    newfstatat     newfstatat
>
> or (simplified)
>
> 291     32    fstatat64        sys_fstatat64
> 291     64    newfstatat     sys_newfstatat

In parisc, I'll go with the above model.

Let me bring another example from powerpc:

syscall_32.tbl,
136     common  personality                     sys_personality
         ppc64_personality   ---> 32-bit, compat (this is the current
model which I implemented)
syscall_64.tbl
136     common  personality                     ppc64_personality
                                       ---> 64-bit

I was wondering if the above table is right, how to arrange like parisc model?
FYI, there are some implement missing for SPU in powerpc

For your reference:
SYSX_SPU(sys_newfstatat,sys_fstatat64,sys_fstatat64)
SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)

Thanks
Firoz
>
> makes much more sense than
>
> 291     32    fstatat64        sys_fstatat64
> 291     64    newfstatat     newfstatat           sys_fstatat64
>
>         Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09  9:36             ` Firoz Khan
  2018-10-09  9:36               ` Firoz Khan
@ 2018-10-09 11:28               ` Arnd Bergmann
  2018-10-09 11:28                 ` Arnd Bergmann
  2018-10-09 14:10                 ` Firoz Khan
  1 sibling, 2 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-09 11:28 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Eugene Syromiatnikov, Parisc List, James E.J. Bottomley,
	Helge Deller, Thomas Gleixner, gregkh, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	linux-arch, Deepa Dinamani, Marcin Juszkiewicz

On Tue, Oct 9, 2018 at 11:36 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Tue, 9 Oct 2018 at 13:18, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> Let me bring another example from powerpc:
>
> syscall_32.tbl,
> 136     common  personality                     sys_personality
>          ppc64_personality   ---> 32-bit, compat (this is the current
> model which I implemented)
> syscall_64.tbl
> 136     common  personality                     ppc64_personality
>                                        ---> 64-bit
>
> I was wondering if the above table is right, how to arrange like parisc model?

I think this should simply be

136    32 personality sys_personality      ppc64_personality
136    64 personality ppc64_personality

Keeping the contents exactly the same as you have them
in the separate .tbl files, just merging the two files, and
splitting out the differences as 32/64 ABI.

> FYI, there are some implement missing for SPU in powerpc
>
> For your reference:
> SYSX_SPU(sys_newfstatat,sys_fstatat64,sys_fstatat64)
> SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)

This is a good question. The only difference between SPU and
native 64-bit is that some syscalls are not part of the SPU table
because those syscalls are impossible to implement on SPU.

Maybe we can solve this by allowing multiple comma-separated
ABIs in the table. On powerpc, 'common' would then mean
'32-bit, 64-bit and spu', while you could have various other
combinations:

/* always:32, 64 and SPU */
1 common exit sys_exit

/* 32-bit only call */
76  32    getrlimit      sys_old_getrlimit     compat_sys_old_getrlimit

/* 64-bit only, no SPU */
363 64 switch_endian  sys_switch_endian

/* 32-bit and 64-bit, no SPU */
198 32,64 pciconfig_read  sys_pciconfig_read

/* different pointers */
136    32 personality sys_personality      ppc64_personality
136    64,spu personality ppc64_personality

Would that work for you?

       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09 11:28               ` Arnd Bergmann
@ 2018-10-09 11:28                 ` Arnd Bergmann
  2018-10-09 14:10                 ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-09 11:28 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Eugene Syromiatnikov, Parisc List, James E.J. Bottomley,
	Helge Deller, Thomas Gleixner, gregkh, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	linux-arch, Deepa Dinamani, Marcin Juszkiewicz

On Tue, Oct 9, 2018 at 11:36 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Tue, 9 Oct 2018 at 13:18, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> Let me bring another example from powerpc:
>
> syscall_32.tbl,
> 136     common  personality                     sys_personality
>          ppc64_personality   ---> 32-bit, compat (this is the current
> model which I implemented)
> syscall_64.tbl
> 136     common  personality                     ppc64_personality
>                                        ---> 64-bit
>
> I was wondering if the above table is right, how to arrange like parisc model?

I think this should simply be

136    32 personality sys_personality      ppc64_personality
136    64 personality ppc64_personality

Keeping the contents exactly the same as you have them
in the separate .tbl files, just merging the two files, and
splitting out the differences as 32/64 ABI.

> FYI, there are some implement missing for SPU in powerpc
>
> For your reference:
> SYSX_SPU(sys_newfstatat,sys_fstatat64,sys_fstatat64)
> SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)

This is a good question. The only difference between SPU and
native 64-bit is that some syscalls are not part of the SPU table
because those syscalls are impossible to implement on SPU.

Maybe we can solve this by allowing multiple comma-separated
ABIs in the table. On powerpc, 'common' would then mean
'32-bit, 64-bit and spu', while you could have various other
combinations:

/* always:32, 64 and SPU */
1 common exit sys_exit

/* 32-bit only call */
76  32    getrlimit      sys_old_getrlimit     compat_sys_old_getrlimit

/* 64-bit only, no SPU */
363 64 switch_endian  sys_switch_endian

/* 32-bit and 64-bit, no SPU */
198 32,64 pciconfig_read  sys_pciconfig_read

/* different pointers */
136    32 personality sys_personality      ppc64_personality
136    64,spu personality ppc64_personality

Would that work for you?

       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09 11:28               ` Arnd Bergmann
  2018-10-09 11:28                 ` Arnd Bergmann
@ 2018-10-09 14:10                 ` Firoz Khan
  2018-10-09 14:10                   ` Firoz Khan
  1 sibling, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-09 14:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Arnd,

On Tue, 9 Oct 2018 at 16:58, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Oct 9, 2018 at 11:36 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Tue, 9 Oct 2018 at 13:18, Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > > On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> > Let me bring another example from powerpc:
> >
> > syscall_32.tbl,
> > 136     common  personality                     sys_personality
> >          ppc64_personality   ---> 32-bit, compat (this is the current
> > model which I implemented)
> > syscall_64.tbl
> > 136     common  personality                     ppc64_personality
> >                                        ---> 64-bit
> >
> > I was wondering if the above table is right, how to arrange like parisc model?
>
> I think this should simply be
>
> 136    32 personality sys_personality      ppc64_personality
> 136    64 personality ppc64_personality
>
> Keeping the contents exactly the same as you have them
> in the separate .tbl files, just merging the two files, and
> splitting out the differences as 32/64 ABI.
>
> > FYI, there are some implement missing for SPU in powerpc
> >
> > For your reference:
> > SYSX_SPU(sys_newfstatat,sys_fstatat64,sys_fstatat64)
> > SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)
>
> This is a good question. The only difference between SPU and
> native 64-bit is that some syscalls are not part of the SPU table
> because those syscalls are impossible to implement on SPU.
>
> Maybe we can solve this by allowing multiple comma-separated
> ABIs in the table. On powerpc, 'common' would then mean
> '32-bit, 64-bit and spu', while you could have various other
> combinations:
>
> /* always:32, 64 and SPU */
> 1 common exit sys_exit
>
> /* 32-bit only call */
> 76  32    getrlimit      sys_old_getrlimit     compat_sys_old_getrlimit
>
> /* 64-bit only, no SPU */
> 363 64 switch_endian  sys_switch_endian
>
> /* 32-bit and 64-bit, no SPU */
> 198 32,64 pciconfig_read  sys_pciconfig_read
>
> /* different pointers */
> 136    32 personality sys_personality      ppc64_personality
> 136    64,spu personality ppc64_personality
>
> Would that work for you?

At this point, yes. V2 patches for powerpc on my pipeline. I can bring
the above points when I start creating those patches.

Thanks
Firoz
>
>        Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 3/6] parisc: add system call table generation support
  2018-10-09 14:10                 ` Firoz Khan
@ 2018-10-09 14:10                   ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-09 14:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: esyr, linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Arnd,

On Tue, 9 Oct 2018 at 16:58, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Oct 9, 2018 at 11:36 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Tue, 9 Oct 2018 at 13:18, Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Tue, Oct 9, 2018 at 7:35 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > > > On Mon, 8 Oct 2018 at 19:27, Arnd Bergmann <arnd@arndb.de> wrote:
> > Let me bring another example from powerpc:
> >
> > syscall_32.tbl,
> > 136     common  personality                     sys_personality
> >          ppc64_personality   ---> 32-bit, compat (this is the current
> > model which I implemented)
> > syscall_64.tbl
> > 136     common  personality                     ppc64_personality
> >                                        ---> 64-bit
> >
> > I was wondering if the above table is right, how to arrange like parisc model?
>
> I think this should simply be
>
> 136    32 personality sys_personality      ppc64_personality
> 136    64 personality ppc64_personality
>
> Keeping the contents exactly the same as you have them
> in the separate .tbl files, just merging the two files, and
> splitting out the differences as 32/64 ABI.
>
> > FYI, there are some implement missing for SPU in powerpc
> >
> > For your reference:
> > SYSX_SPU(sys_newfstatat,sys_fstatat64,sys_fstatat64)
> > SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)
>
> This is a good question. The only difference between SPU and
> native 64-bit is that some syscalls are not part of the SPU table
> because those syscalls are impossible to implement on SPU.
>
> Maybe we can solve this by allowing multiple comma-separated
> ABIs in the table. On powerpc, 'common' would then mean
> '32-bit, 64-bit and spu', while you could have various other
> combinations:
>
> /* always:32, 64 and SPU */
> 1 common exit sys_exit
>
> /* 32-bit only call */
> 76  32    getrlimit      sys_old_getrlimit     compat_sys_old_getrlimit
>
> /* 64-bit only, no SPU */
> 363 64 switch_endian  sys_switch_endian
>
> /* 32-bit and 64-bit, no SPU */
> 198 32,64 pciconfig_read  sys_pciconfig_read
>
> /* different pointers */
> 136    32 personality sys_personality      ppc64_personality
> 136    64,spu personality ppc64_personality
>
> Would that work for you?

At this point, yes. V2 patches for powerpc on my pipeline. I can bring
the above points when I start creating those patches.

Thanks
Firoz
>
>        Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-08  5:16 ` [PATCH v3 4/6] parisc: uapi header and system call table file generation Firoz Khan
  2018-10-08  5:16   ` Firoz Khan
  2018-10-08 19:43   ` Helge Deller
@ 2018-10-09 20:13   ` Helge Deller
  2018-10-09 20:13     ` Helge Deller
  2018-10-11  6:10     ` Firoz Khan
  2 siblings, 2 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-09 20:13 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038, linux-kernel, linux-arch, arnd,
	deepa.kernel, marcin.juszkiewicz

* Firoz Khan <firoz.khan@linaro.org>:
> System call table generation script must be run to generate
> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> will have changes which will invokes the script.
> 
> This patch will generate unistd_32/64.h and syscall_table_
> 32/64/c32.h files by the syscall table generation script
> invoked by arch/parisc/Makefile and the generated files against
> the removed files will be identical.
> 
> The generated uapi header file will be included in uapi/asm/
> unistd_32/64.h and generated system call table support file will
> be included by arch/sparc/kernel/syscall_table_32/64.S file.
> 
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ---
>  arch/parisc/Makefile                  |   4 +
>  arch/parisc/include/asm/Kbuild        |   3 +
>  arch/parisc/include/uapi/asm/Kbuild   |   2 +
>  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
>  arch/parisc/kernel/syscall.S          |  12 +-
>  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------


Can we please get rid of those two new files: 

>  arch/parisc/kernel/syscall_table_32.S |  13 +
>  arch/parisc/kernel/syscall_table_64.S |  20 ++

Both are not needed (at least on parisc) if you apply the following
patch on top of your patch series.
This patch finally fixes the 64-bit kernel on parisc (tested on real
hardware).

Helge

diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 2523b83b88d8..45cddeeb968f 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -923,10 +923,20 @@ ENTRY(lws_table)
 END(lws_table)
 	/* End of lws table */
 
-#include "syscall_table_32.S"
+#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
+
+ENTRY(sys_call_table)
+#if defined(CONFIG_64BIT)
+#include <asm/syscall_table_c32.h>	/* compat syscalls */
+#else
+#include <asm/syscall_table_32.h>	/* 32-bit native syscalls */
+#endif
+END(sys_call_table)
+
 #ifdef CONFIG_64BIT
-#define SYSCALL_TABLE_64BIT
-#include "syscall_table_64.S"
+ENTRY(sys_call_table64)
+#include <asm/syscall_table_64.h>	/* 64-bit native syscalls */
+END(sys_call_table64)
 #endif
 
 	/*

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-09 20:13   ` Helge Deller
@ 2018-10-09 20:13     ` Helge Deller
  2018-10-11  6:10     ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-09 20:13 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Helge Deller,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038, linux-kernel, linux-arch, arnd,
	deepa.kernel, marcin.juszkiewicz

* Firoz Khan <firoz.khan@linaro.org>:
> System call table generation script must be run to generate
> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> will have changes which will invokes the script.
> 
> This patch will generate unistd_32/64.h and syscall_table_
> 32/64/c32.h files by the syscall table generation script
> invoked by arch/parisc/Makefile and the generated files against
> the removed files will be identical.
> 
> The generated uapi header file will be included in uapi/asm/
> unistd_32/64.h and generated system call table support file will
> be included by arch/sparc/kernel/syscall_table_32/64.S file.
> 
> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> ---
>  arch/parisc/Makefile                  |   4 +
>  arch/parisc/include/asm/Kbuild        |   3 +
>  arch/parisc/include/uapi/asm/Kbuild   |   2 +
>  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
>  arch/parisc/kernel/syscall.S          |  12 +-
>  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------


Can we please get rid of those two new files: 

>  arch/parisc/kernel/syscall_table_32.S |  13 +
>  arch/parisc/kernel/syscall_table_64.S |  20 ++

Both are not needed (at least on parisc) if you apply the following
patch on top of your patch series.
This patch finally fixes the 64-bit kernel on parisc (tested on real
hardware).

Helge

diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 2523b83b88d8..45cddeeb968f 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -923,10 +923,20 @@ ENTRY(lws_table)
 END(lws_table)
 	/* End of lws table */
 
-#include "syscall_table_32.S"
+#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
+
+ENTRY(sys_call_table)
+#if defined(CONFIG_64BIT)
+#include <asm/syscall_table_c32.h>	/* compat syscalls */
+#else
+#include <asm/syscall_table_32.h>	/* 32-bit native syscalls */
+#endif
+END(sys_call_table)
+
 #ifdef CONFIG_64BIT
-#define SYSCALL_TABLE_64BIT
-#include "syscall_table_64.S"
+ENTRY(sys_call_table64)
+#include <asm/syscall_table_64.h>	/* 64-bit native syscalls */
+END(sys_call_table64)
 #endif
 
 	/*

^ permalink raw reply related	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-09 20:13   ` Helge Deller
  2018-10-09 20:13     ` Helge Deller
@ 2018-10-11  6:10     ` Firoz Khan
  2018-10-11  6:10       ` Firoz Khan
                         ` (3 more replies)
  1 sibling, 4 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  6:10 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
>
> * Firoz Khan <firoz.khan@linaro.org>:
> > System call table generation script must be run to generate
> > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > will have changes which will invokes the script.
> >
> > This patch will generate unistd_32/64.h and syscall_table_
> > 32/64/c32.h files by the syscall table generation script
> > invoked by arch/parisc/Makefile and the generated files against
> > the removed files will be identical.
> >
> > The generated uapi header file will be included in uapi/asm/
> > unistd_32/64.h and generated system call table support file will
> > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> >
> > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > ---
> >  arch/parisc/Makefile                  |   4 +
> >  arch/parisc/include/asm/Kbuild        |   3 +
> >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> >  arch/parisc/kernel/syscall.S          |  12 +-
> >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
>
>
> Can we please get rid of those two new files:

Yes, we don't need those files some of the architecture and other
architecture does have same/similar files. That's why I added below
files, so every architecture implementation looks same.

I feel it is better to remove these files.
Arnd, Do u have any comment on this?

Thanks
Firoz

>
> >  arch/parisc/kernel/syscall_table_32.S |  13 +
> >  arch/parisc/kernel/syscall_table_64.S |  20 ++
>
> Both are not needed (at least on parisc) if you apply the following
> patch on top of your patch series.
> This patch finally fixes the 64-bit kernel on parisc (tested on real
> hardware).
>
> Helge
>
> diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> index 2523b83b88d8..45cddeeb968f 100644
> --- a/arch/parisc/kernel/syscall.S
> +++ b/arch/parisc/kernel/syscall.S
> @@ -923,10 +923,20 @@ ENTRY(lws_table)
>  END(lws_table)
>         /* End of lws table */
>
> -#include "syscall_table_32.S"
> +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> +
> +ENTRY(sys_call_table)
> +#if defined(CONFIG_64BIT)
> +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> +#else
> +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> +#endif
> +END(sys_call_table)
> +
>  #ifdef CONFIG_64BIT
> -#define SYSCALL_TABLE_64BIT
> -#include "syscall_table_64.S"
> +ENTRY(sys_call_table64)
> +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> +END(sys_call_table64)
>  #endif
>
>         /*

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:10     ` Firoz Khan
@ 2018-10-11  6:10       ` Firoz Khan
  2018-10-11  6:14       ` Firoz Khan
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  6:10 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
>
> * Firoz Khan <firoz.khan@linaro.org>:
> > System call table generation script must be run to generate
> > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > will have changes which will invokes the script.
> >
> > This patch will generate unistd_32/64.h and syscall_table_
> > 32/64/c32.h files by the syscall table generation script
> > invoked by arch/parisc/Makefile and the generated files against
> > the removed files will be identical.
> >
> > The generated uapi header file will be included in uapi/asm/
> > unistd_32/64.h and generated system call table support file will
> > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> >
> > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > ---
> >  arch/parisc/Makefile                  |   4 +
> >  arch/parisc/include/asm/Kbuild        |   3 +
> >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> >  arch/parisc/kernel/syscall.S          |  12 +-
> >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
>
>
> Can we please get rid of those two new files:

Yes, we don't need those files some of the architecture and other
architecture does have same/similar files. That's why I added below
files, so every architecture implementation looks same.

I feel it is better to remove these files.
Arnd, Do u have any comment on this?

Thanks
Firoz

>
> >  arch/parisc/kernel/syscall_table_32.S |  13 +
> >  arch/parisc/kernel/syscall_table_64.S |  20 ++
>
> Both are not needed (at least on parisc) if you apply the following
> patch on top of your patch series.
> This patch finally fixes the 64-bit kernel on parisc (tested on real
> hardware).
>
> Helge
>
> diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> index 2523b83b88d8..45cddeeb968f 100644
> --- a/arch/parisc/kernel/syscall.S
> +++ b/arch/parisc/kernel/syscall.S
> @@ -923,10 +923,20 @@ ENTRY(lws_table)
>  END(lws_table)
>         /* End of lws table */
>
> -#include "syscall_table_32.S"
> +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> +
> +ENTRY(sys_call_table)
> +#if defined(CONFIG_64BIT)
> +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> +#else
> +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> +#endif
> +END(sys_call_table)
> +
>  #ifdef CONFIG_64BIT
> -#define SYSCALL_TABLE_64BIT
> -#include "syscall_table_64.S"
> +ENTRY(sys_call_table64)
> +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> +END(sys_call_table64)
>  #endif
>
>         /*

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:10     ` Firoz Khan
  2018-10-11  6:10       ` Firoz Khan
@ 2018-10-11  6:14       ` Firoz Khan
  2018-10-11  6:14         ` Firoz Khan
  2018-10-11  6:48       ` Firoz Khan
  2018-10-11  7:07       ` Arnd Bergmann
  3 siblings, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  6:14 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Typo fixed!

On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> Hi Helge,
>
> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >
> > * Firoz Khan <firoz.khan@linaro.org>:
> > > System call table generation script must be run to generate
> > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > will have changes which will invokes the script.
> > >
> > > This patch will generate unistd_32/64.h and syscall_table_
> > > 32/64/c32.h files by the syscall table generation script
> > > invoked by arch/parisc/Makefile and the generated files against
> > > the removed files will be identical.
> > >
> > > The generated uapi header file will be included in uapi/asm/
> > > unistd_32/64.h and generated system call table support file will
> > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > >
> > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > ---
> > >  arch/parisc/Makefile                  |   4 +
> > >  arch/parisc/include/asm/Kbuild        |   3 +
> > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > >  arch/parisc/kernel/syscall.S          |  12 +-
> > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >
> >
> > Can we please get rid of those two new files:
>
> Yes, we don't need those files some of the architecture and other
> architecture does have same/similar files. That's why I added below
Yes, we don't need those files some of the architecture does have ...

> files, so every architecture implementation looks same.
>
> I feel it is better to remove these files.
> Arnd, Do u have any comment on this?
>
> Thanks
> Firoz
>
> >
> > >  arch/parisc/kernel/syscall_table_32.S |  13 +
> > >  arch/parisc/kernel/syscall_table_64.S |  20 ++
> >
> > Both are not needed (at least on parisc) if you apply the following
> > patch on top of your patch series.
> > This patch finally fixes the 64-bit kernel on parisc (tested on real
> > hardware).
> >
> > Helge
> >
> > diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> > index 2523b83b88d8..45cddeeb968f 100644
> > --- a/arch/parisc/kernel/syscall.S
> > +++ b/arch/parisc/kernel/syscall.S
> > @@ -923,10 +923,20 @@ ENTRY(lws_table)
> >  END(lws_table)
> >         /* End of lws table */
> >
> > -#include "syscall_table_32.S"
> > +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> > +
> > +ENTRY(sys_call_table)
> > +#if defined(CONFIG_64BIT)
> > +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> > +#else
> > +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> > +#endif
> > +END(sys_call_table)
> > +
> >  #ifdef CONFIG_64BIT
> > -#define SYSCALL_TABLE_64BIT
> > -#include "syscall_table_64.S"
> > +ENTRY(sys_call_table64)
> > +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> > +END(sys_call_table64)
> >  #endif
> >
> >         /*

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:14       ` Firoz Khan
@ 2018-10-11  6:14         ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  6:14 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Typo fixed!

On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> Hi Helge,
>
> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >
> > * Firoz Khan <firoz.khan@linaro.org>:
> > > System call table generation script must be run to generate
> > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > will have changes which will invokes the script.
> > >
> > > This patch will generate unistd_32/64.h and syscall_table_
> > > 32/64/c32.h files by the syscall table generation script
> > > invoked by arch/parisc/Makefile and the generated files against
> > > the removed files will be identical.
> > >
> > > The generated uapi header file will be included in uapi/asm/
> > > unistd_32/64.h and generated system call table support file will
> > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > >
> > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > ---
> > >  arch/parisc/Makefile                  |   4 +
> > >  arch/parisc/include/asm/Kbuild        |   3 +
> > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > >  arch/parisc/kernel/syscall.S          |  12 +-
> > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >
> >
> > Can we please get rid of those two new files:
>
> Yes, we don't need those files some of the architecture and other
> architecture does have same/similar files. That's why I added below
Yes, we don't need those files some of the architecture does have ...

> files, so every architecture implementation looks same.
>
> I feel it is better to remove these files.
> Arnd, Do u have any comment on this?
>
> Thanks
> Firoz
>
> >
> > >  arch/parisc/kernel/syscall_table_32.S |  13 +
> > >  arch/parisc/kernel/syscall_table_64.S |  20 ++
> >
> > Both are not needed (at least on parisc) if you apply the following
> > patch on top of your patch series.
> > This patch finally fixes the 64-bit kernel on parisc (tested on real
> > hardware).
> >
> > Helge
> >
> > diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> > index 2523b83b88d8..45cddeeb968f 100644
> > --- a/arch/parisc/kernel/syscall.S
> > +++ b/arch/parisc/kernel/syscall.S
> > @@ -923,10 +923,20 @@ ENTRY(lws_table)
> >  END(lws_table)
> >         /* End of lws table */
> >
> > -#include "syscall_table_32.S"
> > +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> > +
> > +ENTRY(sys_call_table)
> > +#if defined(CONFIG_64BIT)
> > +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> > +#else
> > +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> > +#endif
> > +END(sys_call_table)
> > +
> >  #ifdef CONFIG_64BIT
> > -#define SYSCALL_TABLE_64BIT
> > -#include "syscall_table_64.S"
> > +ENTRY(sys_call_table64)
> > +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> > +END(sys_call_table64)
> >  #endif
> >
> >         /*

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:10     ` Firoz Khan
  2018-10-11  6:10       ` Firoz Khan
  2018-10-11  6:14       ` Firoz Khan
@ 2018-10-11  6:48       ` Firoz Khan
  2018-10-11  6:48         ` Firoz Khan
                           ` (2 more replies)
  2018-10-11  7:07       ` Arnd Bergmann
  3 siblings, 3 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  6:48 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> Hi Helge,
>
> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >
> > * Firoz Khan <firoz.khan@linaro.org>:
> > > System call table generation script must be run to generate
> > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > will have changes which will invokes the script.
> > >
> > > This patch will generate unistd_32/64.h and syscall_table_
> > > 32/64/c32.h files by the syscall table generation script
> > > invoked by arch/parisc/Makefile and the generated files against
> > > the removed files will be identical.
> > >
> > > The generated uapi header file will be included in uapi/asm/
> > > unistd_32/64.h and generated system call table support file will
> > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > >
> > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > ---
> > >  arch/parisc/Makefile                  |   4 +
> > >  arch/parisc/include/asm/Kbuild        |   3 +
> > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > >  arch/parisc/kernel/syscall.S          |  12 +-
> > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >
> >
> > Can we please get rid of those two new files:
>
> Yes, we don't need those files some of the architecture and other
> architecture does have same/similar files. That's why I added below
> files, so every architecture implementation looks same.
>
> I feel it is better to remove these files.
> Arnd, Do u have any comment on this?
>
> Thanks
> Firoz
>
> >
> > >  arch/parisc/kernel/syscall_table_32.S |  13 +
> > >  arch/parisc/kernel/syscall_table_64.S |  20 ++
> >
> > Both are not needed (at least on parisc) if you apply the following
> > patch on top of your patch series.
> > This patch finally fixes the 64-bit kernel on parisc (tested on real
> > hardware).
> >
> > Helge
> >
> > diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> > index 2523b83b88d8..45cddeeb968f 100644
> > --- a/arch/parisc/kernel/syscall.S
> > +++ b/arch/parisc/kernel/syscall.S
> > @@ -923,10 +923,20 @@ ENTRY(lws_table)
> >  END(lws_table)
> >         /* End of lws table */
> >
> > -#include "syscall_table_32.S"
> > +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> > +
> > +ENTRY(sys_call_table)
> > +#if defined(CONFIG_64BIT)
> > +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> > +#else
> > +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> > +#endif
> > +END(sys_call_table)
> > +
> >  #ifdef CONFIG_64BIT
> > -#define SYSCALL_TABLE_64BIT
> > -#include "syscall_table_64.S"
> > +ENTRY(sys_call_table64)
> > +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> > +END(sys_call_table64)
> >  #endif
> >
> >         /*

I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
which will perform a compile-check when adding a new syscall. My patches
will remove this feature. Is that fine?

Firoz

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:48       ` Firoz Khan
@ 2018-10-11  6:48         ` Firoz Khan
  2018-10-11  7:03         ` Arnd Bergmann
  2018-10-11 10:27         ` Helge Deller
  2 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  6:48 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
>
> Hi Helge,
>
> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >
> > * Firoz Khan <firoz.khan@linaro.org>:
> > > System call table generation script must be run to generate
> > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > will have changes which will invokes the script.
> > >
> > > This patch will generate unistd_32/64.h and syscall_table_
> > > 32/64/c32.h files by the syscall table generation script
> > > invoked by arch/parisc/Makefile and the generated files against
> > > the removed files will be identical.
> > >
> > > The generated uapi header file will be included in uapi/asm/
> > > unistd_32/64.h and generated system call table support file will
> > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > >
> > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > ---
> > >  arch/parisc/Makefile                  |   4 +
> > >  arch/parisc/include/asm/Kbuild        |   3 +
> > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > >  arch/parisc/kernel/syscall.S          |  12 +-
> > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >
> >
> > Can we please get rid of those two new files:
>
> Yes, we don't need those files some of the architecture and other
> architecture does have same/similar files. That's why I added below
> files, so every architecture implementation looks same.
>
> I feel it is better to remove these files.
> Arnd, Do u have any comment on this?
>
> Thanks
> Firoz
>
> >
> > >  arch/parisc/kernel/syscall_table_32.S |  13 +
> > >  arch/parisc/kernel/syscall_table_64.S |  20 ++
> >
> > Both are not needed (at least on parisc) if you apply the following
> > patch on top of your patch series.
> > This patch finally fixes the 64-bit kernel on parisc (tested on real
> > hardware).
> >
> > Helge
> >
> > diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> > index 2523b83b88d8..45cddeeb968f 100644
> > --- a/arch/parisc/kernel/syscall.S
> > +++ b/arch/parisc/kernel/syscall.S
> > @@ -923,10 +923,20 @@ ENTRY(lws_table)
> >  END(lws_table)
> >         /* End of lws table */
> >
> > -#include "syscall_table_32.S"
> > +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> > +
> > +ENTRY(sys_call_table)
> > +#if defined(CONFIG_64BIT)
> > +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> > +#else
> > +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> > +#endif
> > +END(sys_call_table)
> > +
> >  #ifdef CONFIG_64BIT
> > -#define SYSCALL_TABLE_64BIT
> > -#include "syscall_table_64.S"
> > +ENTRY(sys_call_table64)
> > +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> > +END(sys_call_table64)
> >  #endif
> >
> >         /*

I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
which will perform a compile-check when adding a new syscall. My patches
will remove this feature. Is that fine?

Firoz

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:48       ` Firoz Khan
  2018-10-11  6:48         ` Firoz Khan
@ 2018-10-11  7:03         ` Arnd Bergmann
  2018-10-11  7:03           ` Arnd Bergmann
  2018-10-11 10:27         ` Helge Deller
  2 siblings, 1 reply; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-11  7:03 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	gregkh, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, linux-arch, Deepa Dinamani,
	Marcin Juszkiewicz

On Thu, Oct 11, 2018 at 8:48 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:

> > > +
> > > +ENTRY(sys_call_table)
> > > +#if defined(CONFIG_64BIT)
> > > +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> > > +#else
> > > +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> > > +#endif
> > > +END(sys_call_table)
> > > +
> > >  #ifdef CONFIG_64BIT
> > > -#define SYSCALL_TABLE_64BIT
> > > -#include "syscall_table_64.S"
> > > +ENTRY(sys_call_table64)
> > > +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> > > +END(sys_call_table64)
> > >  #endif
> > >
> > >         /*
>
> I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
> which will perform a compile-check when adding a new syscall. My patches
> will remove this feature. Is that fine?

I think it's ok: You are automating it so the bug can no longer happen,
which is better than adding checks to prevent human errors.

        Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  7:03         ` Arnd Bergmann
@ 2018-10-11  7:03           ` Arnd Bergmann
  0 siblings, 0 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-11  7:03 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	gregkh, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, linux-arch, Deepa Dinamani,
	Marcin Juszkiewicz

On Thu, Oct 11, 2018 at 8:48 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:

> > > +
> > > +ENTRY(sys_call_table)
> > > +#if defined(CONFIG_64BIT)
> > > +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> > > +#else
> > > +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> > > +#endif
> > > +END(sys_call_table)
> > > +
> > >  #ifdef CONFIG_64BIT
> > > -#define SYSCALL_TABLE_64BIT
> > > -#include "syscall_table_64.S"
> > > +ENTRY(sys_call_table64)
> > > +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> > > +END(sys_call_table64)
> > >  #endif
> > >
> > >         /*
>
> I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
> which will perform a compile-check when adding a new syscall. My patches
> will remove this feature. Is that fine?

I think it's ok: You are automating it so the bug can no longer happen,
which is better than adding checks to prevent human errors.

        Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:10     ` Firoz Khan
                         ` (2 preceding siblings ...)
  2018-10-11  6:48       ` Firoz Khan
@ 2018-10-11  7:07       ` Arnd Bergmann
  2018-10-11  7:07         ` Arnd Bergmann
  2018-10-11  8:30         ` Firoz Khan
  3 siblings, 2 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-11  7:07 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	gregkh, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, linux-arch, Deepa Dinamani,
	Marcin Juszkiewicz

On Thu, Oct 11, 2018 at 8:10 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >
> > * Firoz Khan <firoz.khan@linaro.org>:
> > > System call table generation script must be run to generate
> > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > will have changes which will invokes the script.
> > >
> > > This patch will generate unistd_32/64.h and syscall_table_
> > > 32/64/c32.h files by the syscall table generation script
> > > invoked by arch/parisc/Makefile and the generated files against
> > > the removed files will be identical.
> > >
> > > The generated uapi header file will be included in uapi/asm/
> > > unistd_32/64.h and generated system call table support file will
> > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > >
> > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > ---
> > >  arch/parisc/Makefile                  |   4 +
> > >  arch/parisc/include/asm/Kbuild        |   3 +
> > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > >  arch/parisc/kernel/syscall.S          |  12 +-
> > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >
> >
> > Can we please get rid of those two new files:
>
> Yes, we don't need those files some of the architecture and other
> architecture does have same/similar files. That's why I added below
> files, so every architecture implementation looks same.
>
> I feel it is better to remove these files.
> Arnd, Do u have any comment on this?

I agree with Helge. This was a big different in a previous version where
you generated the syscall_table.S file from syscalls.tbl, but now that
you generade the syscall_table.h file instead, we no longer need to
keep the .S file synchronized across architectures.

Having a separate .S file would make it easier to replace that with
a .c file later, but it's also easier to split it out after your series than
as part of it.

      Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  7:07       ` Arnd Bergmann
@ 2018-10-11  7:07         ` Arnd Bergmann
  2018-10-11  8:30         ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Arnd Bergmann @ 2018-10-11  7:07 UTC (permalink / raw)
  To: Firoz Khan
  Cc: Helge Deller, Parisc List, James E.J. Bottomley, Thomas Gleixner,
	gregkh, Philippe Ombredanne, Kate Stewart, y2038 Mailman List,
	Linux Kernel Mailing List, linux-arch, Deepa Dinamani,
	Marcin Juszkiewicz

On Thu, Oct 11, 2018 at 8:10 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >
> > * Firoz Khan <firoz.khan@linaro.org>:
> > > System call table generation script must be run to generate
> > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > will have changes which will invokes the script.
> > >
> > > This patch will generate unistd_32/64.h and syscall_table_
> > > 32/64/c32.h files by the syscall table generation script
> > > invoked by arch/parisc/Makefile and the generated files against
> > > the removed files will be identical.
> > >
> > > The generated uapi header file will be included in uapi/asm/
> > > unistd_32/64.h and generated system call table support file will
> > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > >
> > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > ---
> > >  arch/parisc/Makefile                  |   4 +
> > >  arch/parisc/include/asm/Kbuild        |   3 +
> > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > >  arch/parisc/kernel/syscall.S          |  12 +-
> > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >
> >
> > Can we please get rid of those two new files:
>
> Yes, we don't need those files some of the architecture and other
> architecture does have same/similar files. That's why I added below
> files, so every architecture implementation looks same.
>
> I feel it is better to remove these files.
> Arnd, Do u have any comment on this?

I agree with Helge. This was a big different in a previous version where
you generated the syscall_table.S file from syscalls.tbl, but now that
you generade the syscall_table.h file instead, we no longer need to
keep the .S file synchronized across architectures.

Having a separate .S file would make it easier to replace that with
a .c file later, but it's also easier to split it out after your series than
as part of it.

      Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  7:07       ` Arnd Bergmann
  2018-10-11  7:07         ` Arnd Bergmann
@ 2018-10-11  8:30         ` Firoz Khan
  2018-10-11  8:30           ` Firoz Khan
  1 sibling, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  8:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Helge Deller, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Arnd,

On Thu, 11 Oct 2018 at 12:37, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Thu, Oct 11, 2018 at 8:10 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> > >
> > > * Firoz Khan <firoz.khan@linaro.org>:
> > > > System call table generation script must be run to generate
> > > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > > will have changes which will invokes the script.
> > > >
> > > > This patch will generate unistd_32/64.h and syscall_table_
> > > > 32/64/c32.h files by the syscall table generation script
> > > > invoked by arch/parisc/Makefile and the generated files against
> > > > the removed files will be identical.
> > > >
> > > > The generated uapi header file will be included in uapi/asm/
> > > > unistd_32/64.h and generated system call table support file will
> > > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > > >
> > > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > > ---
> > > >  arch/parisc/Makefile                  |   4 +
> > > >  arch/parisc/include/asm/Kbuild        |   3 +
> > > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > > >  arch/parisc/kernel/syscall.S          |  12 +-
> > > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> > >
> > >
> > > Can we please get rid of those two new files:
> >
> > Yes, we don't need those files some of the architecture and other
> > architecture does have same/similar files. That's why I added below
> > files, so every architecture implementation looks same.
> >
> > I feel it is better to remove these files.
> > Arnd, Do u have any comment on this?
>
> I agree with Helge. This was a big different in a previous version where
> you generated the syscall_table.S file from syscalls.tbl, but now that
> you generade the syscall_table.h file instead, we no longer need to
> keep the .S file synchronized across architectures.
>
> Having a separate .S file would make it easier to replace that with
> a .c file later, but it's also easier to split it out after your series than
> as part of it.

Sure. Thanks for your comments.

Firoz

>
>       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  8:30         ` Firoz Khan
@ 2018-10-11  8:30           ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-11  8:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Helge Deller, linux-parisc, James E . J . Bottomley,
	Thomas Gleixner, Greg Kroah-Hartman, Philippe Ombredanne,
	Kate Stewart, y2038 Mailman List, Linux Kernel Mailing List,
	Linux-Arch, Deepa Dinamani, Marcin Juszkiewicz

Hi Arnd,

On Thu, 11 Oct 2018 at 12:37, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Thu, Oct 11, 2018 at 8:10 AM Firoz Khan <firoz.khan@linaro.org> wrote:
> > On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> > >
> > > * Firoz Khan <firoz.khan@linaro.org>:
> > > > System call table generation script must be run to generate
> > > > unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> > > > will have changes which will invokes the script.
> > > >
> > > > This patch will generate unistd_32/64.h and syscall_table_
> > > > 32/64/c32.h files by the syscall table generation script
> > > > invoked by arch/parisc/Makefile and the generated files against
> > > > the removed files will be identical.
> > > >
> > > > The generated uapi header file will be included in uapi/asm/
> > > > unistd_32/64.h and generated system call table support file will
> > > > be included by arch/sparc/kernel/syscall_table_32/64.S file.
> > > >
> > > > Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> > > > ---
> > > >  arch/parisc/Makefile                  |   4 +
> > > >  arch/parisc/include/asm/Kbuild        |   3 +
> > > >  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> > > >  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> > > >  arch/parisc/kernel/syscall.S          |  12 +-
> > > >  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> > >
> > >
> > > Can we please get rid of those two new files:
> >
> > Yes, we don't need those files some of the architecture and other
> > architecture does have same/similar files. That's why I added below
> > files, so every architecture implementation looks same.
> >
> > I feel it is better to remove these files.
> > Arnd, Do u have any comment on this?
>
> I agree with Helge. This was a big different in a previous version where
> you generated the syscall_table.S file from syscalls.tbl, but now that
> you generade the syscall_table.h file instead, we no longer need to
> keep the .S file synchronized across architectures.
>
> Having a separate .S file would make it easier to replace that with
> a .c file later, but it's also easier to split it out after your series than
> as part of it.

Sure. Thanks for your comments.

Firoz

>
>       Arnd

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11  6:48       ` Firoz Khan
  2018-10-11  6:48         ` Firoz Khan
  2018-10-11  7:03         ` Arnd Bergmann
@ 2018-10-11 10:27         ` Helge Deller
  2018-10-11 10:27           ` Helge Deller
  2018-10-11 15:01           ` Firoz Khan
  2 siblings, 2 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-11 10:27 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

On 11.10.2018 08:48, Firoz Khan wrote:
> Hi Helge,
> 
> On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
>>
>> Hi Helge,
>>
>> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
>>>
>>> * Firoz Khan <firoz.khan@linaro.org>:
>>>> System call table generation script must be run to generate
>>>> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
>>>> will have changes which will invokes the script.
>>>>
>>>> This patch will generate unistd_32/64.h and syscall_table_
>>>> 32/64/c32.h files by the syscall table generation script
>>>> invoked by arch/parisc/Makefile and the generated files against
>>>> the removed files will be identical.
>>>>
>>>> The generated uapi header file will be included in uapi/asm/
>>>> unistd_32/64.h and generated system call table support file will
>>>> be included by arch/sparc/kernel/syscall_table_32/64.S file.
>>>>
>>>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
>>>> ---
>>>>  arch/parisc/Makefile                  |   4 +
>>>>  arch/parisc/include/asm/Kbuild        |   3 +
>>>>  arch/parisc/include/uapi/asm/Kbuild   |   2 +
>>>>  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
>>>>  arch/parisc/kernel/syscall.S          |  12 +-
>>>>  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
>>>
>>>
>>> Can we please get rid of those two new files:
>>
>> Yes, we don't need those files some of the architecture and other
>> architecture does have same/similar files. That's why I added below
>> files, so every architecture implementation looks same.
>>
>> I feel it is better to remove these files.
>> Arnd, Do u have any comment on this?
>>
>> Thanks
>> Firoz
>>
>>>
>>>>  arch/parisc/kernel/syscall_table_32.S |  13 +
>>>>  arch/parisc/kernel/syscall_table_64.S |  20 ++
>>>
>>> Both are not needed (at least on parisc) if you apply the following
>>> patch on top of your patch series.
>>> This patch finally fixes the 64-bit kernel on parisc (tested on real
>>> hardware).
>>>
>>> Helge
>>>
>>> diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
>>> index 2523b83b88d8..45cddeeb968f 100644
>>> --- a/arch/parisc/kernel/syscall.S
>>> +++ b/arch/parisc/kernel/syscall.S
>>> @@ -923,10 +923,20 @@ ENTRY(lws_table)
>>>  END(lws_table)
>>>         /* End of lws table */
>>>
>>> -#include "syscall_table_32.S"
>>> +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
>>> +
>>> +ENTRY(sys_call_table)
>>> +#if defined(CONFIG_64BIT)
>>> +#include <asm/syscall_table_c32.h>     /* compat syscalls */
>>> +#else
>>> +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
>>> +#endif
>>> +END(sys_call_table)
>>> +
>>>  #ifdef CONFIG_64BIT
>>> -#define SYSCALL_TABLE_64BIT
>>> -#include "syscall_table_64.S"
>>> +ENTRY(sys_call_table64)
>>> +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
>>> +END(sys_call_table64)
>>>  #endif
>>>
>>>         /*
> 
> I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
> which will perform a compile-check when adding a new syscall. My patches
> will remove this feature. Is that fine?

Yes, removing that feature is OK.
Since everything is then autogenerated I don't expect such bugs.

Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11 10:27         ` Helge Deller
@ 2018-10-11 10:27           ` Helge Deller
  2018-10-11 15:01           ` Firoz Khan
  1 sibling, 0 replies; 70+ messages in thread
From: Helge Deller @ 2018-10-11 10:27 UTC (permalink / raw)
  To: Firoz Khan
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

On 11.10.2018 08:48, Firoz Khan wrote:
> Hi Helge,
> 
> On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
>>
>> Hi Helge,
>>
>> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
>>>
>>> * Firoz Khan <firoz.khan@linaro.org>:
>>>> System call table generation script must be run to generate
>>>> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
>>>> will have changes which will invokes the script.
>>>>
>>>> This patch will generate unistd_32/64.h and syscall_table_
>>>> 32/64/c32.h files by the syscall table generation script
>>>> invoked by arch/parisc/Makefile and the generated files against
>>>> the removed files will be identical.
>>>>
>>>> The generated uapi header file will be included in uapi/asm/
>>>> unistd_32/64.h and generated system call table support file will
>>>> be included by arch/sparc/kernel/syscall_table_32/64.S file.
>>>>
>>>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
>>>> ---
>>>>  arch/parisc/Makefile                  |   4 +
>>>>  arch/parisc/include/asm/Kbuild        |   3 +
>>>>  arch/parisc/include/uapi/asm/Kbuild   |   2 +
>>>>  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
>>>>  arch/parisc/kernel/syscall.S          |  12 +-
>>>>  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
>>>
>>>
>>> Can we please get rid of those two new files:
>>
>> Yes, we don't need those files some of the architecture and other
>> architecture does have same/similar files. That's why I added below
>> files, so every architecture implementation looks same.
>>
>> I feel it is better to remove these files.
>> Arnd, Do u have any comment on this?
>>
>> Thanks
>> Firoz
>>
>>>
>>>>  arch/parisc/kernel/syscall_table_32.S |  13 +
>>>>  arch/parisc/kernel/syscall_table_64.S |  20 ++
>>>
>>> Both are not needed (at least on parisc) if you apply the following
>>> patch on top of your patch series.
>>> This patch finally fixes the 64-bit kernel on parisc (tested on real
>>> hardware).
>>>
>>> Helge
>>>
>>> diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
>>> index 2523b83b88d8..45cddeeb968f 100644
>>> --- a/arch/parisc/kernel/syscall.S
>>> +++ b/arch/parisc/kernel/syscall.S
>>> @@ -923,10 +923,20 @@ ENTRY(lws_table)
>>>  END(lws_table)
>>>         /* End of lws table */
>>>
>>> -#include "syscall_table_32.S"
>>> +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
>>> +
>>> +ENTRY(sys_call_table)
>>> +#if defined(CONFIG_64BIT)
>>> +#include <asm/syscall_table_c32.h>     /* compat syscalls */
>>> +#else
>>> +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
>>> +#endif
>>> +END(sys_call_table)
>>> +
>>>  #ifdef CONFIG_64BIT
>>> -#define SYSCALL_TABLE_64BIT
>>> -#include "syscall_table_64.S"
>>> +ENTRY(sys_call_table64)
>>> +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
>>> +END(sys_call_table64)
>>>  #endif
>>>
>>>         /*
> 
> I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
> which will perform a compile-check when adding a new syscall. My patches
> will remove this feature. Is that fine?

Yes, removing that feature is OK.
Since everything is then autogenerated I don't expect such bugs.

Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11 10:27         ` Helge Deller
  2018-10-11 10:27           ` Helge Deller
@ 2018-10-11 15:01           ` Firoz Khan
  2018-10-11 15:01             ` Firoz Khan
  1 sibling, 1 reply; 70+ messages in thread
From: Firoz Khan @ 2018-10-11 15:01 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Thu, 11 Oct 2018 at 15:57, Helge Deller <deller@gmx.de> wrote:
>
> On 11.10.2018 08:48, Firoz Khan wrote:
> > Hi Helge,
> >
> > On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
> >>
> >> Hi Helge,
> >>
> >> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >>>
> >>> * Firoz Khan <firoz.khan@linaro.org>:
> >>>> System call table generation script must be run to generate
> >>>> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> >>>> will have changes which will invokes the script.
> >>>>
> >>>> This patch will generate unistd_32/64.h and syscall_table_
> >>>> 32/64/c32.h files by the syscall table generation script
> >>>> invoked by arch/parisc/Makefile and the generated files against
> >>>> the removed files will be identical.
> >>>>
> >>>> The generated uapi header file will be included in uapi/asm/
> >>>> unistd_32/64.h and generated system call table support file will
> >>>> be included by arch/sparc/kernel/syscall_table_32/64.S file.
> >>>>
> >>>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> >>>> ---
> >>>>  arch/parisc/Makefile                  |   4 +
> >>>>  arch/parisc/include/asm/Kbuild        |   3 +
> >>>>  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> >>>>  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> >>>>  arch/parisc/kernel/syscall.S          |  12 +-
> >>>>  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >>>
> >>>
> >>> Can we please get rid of those two new files:
> >>
> >> Yes, we don't need those files some of the architecture and other
> >> architecture does have same/similar files. That's why I added below
> >> files, so every architecture implementation looks same.
> >>
> >> I feel it is better to remove these files.
> >> Arnd, Do u have any comment on this?
> >>
> >> Thanks
> >> Firoz
> >>
> >>>
> >>>>  arch/parisc/kernel/syscall_table_32.S |  13 +
> >>>>  arch/parisc/kernel/syscall_table_64.S |  20 ++
> >>>
> >>> Both are not needed (at least on parisc) if you apply the following
> >>> patch on top of your patch series.
> >>> This patch finally fixes the 64-bit kernel on parisc (tested on real
> >>> hardware).
> >>>
> >>> Helge
> >>>
> >>> diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> >>> index 2523b83b88d8..45cddeeb968f 100644
> >>> --- a/arch/parisc/kernel/syscall.S
> >>> +++ b/arch/parisc/kernel/syscall.S
> >>> @@ -923,10 +923,20 @@ ENTRY(lws_table)
> >>>  END(lws_table)
> >>>         /* End of lws table */
> >>>
> >>> -#include "syscall_table_32.S"
> >>> +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> >>> +
> >>> +ENTRY(sys_call_table)
> >>> +#if defined(CONFIG_64BIT)
> >>> +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> >>> +#else
> >>> +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> >>> +#endif
> >>> +END(sys_call_table)
> >>> +
> >>>  #ifdef CONFIG_64BIT
> >>> -#define SYSCALL_TABLE_64BIT
> >>> -#include "syscall_table_64.S"
> >>> +ENTRY(sys_call_table64)
> >>> +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> >>> +END(sys_call_table64)
> >>>  #endif
> >>>
> >>>         /*
> >
> > I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
> > which will perform a compile-check when adding a new syscall. My patches
> > will remove this feature. Is that fine?
>
> Yes, removing that feature is OK.
> Since everything is then autogenerated I don't expect such bugs.

Sure, thanks for your reply.

Firoz

>
> Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v3 4/6] parisc: uapi header and system call table file generation
  2018-10-11 15:01           ` Firoz Khan
@ 2018-10-11 15:01             ` Firoz Khan
  0 siblings, 0 replies; 70+ messages in thread
From: Firoz Khan @ 2018-10-11 15:01 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-parisc, James E . J . Bottomley, Thomas Gleixner,
	Greg Kroah-Hartman, Philippe Ombredanne, Kate Stewart,
	y2038 Mailman List, Linux Kernel Mailing List, Linux-Arch,
	Arnd Bergmann, Deepa Dinamani, Marcin Juszkiewicz

Hi Helge,

On Thu, 11 Oct 2018 at 15:57, Helge Deller <deller@gmx.de> wrote:
>
> On 11.10.2018 08:48, Firoz Khan wrote:
> > Hi Helge,
> >
> > On Thu, 11 Oct 2018 at 11:40, Firoz Khan <firoz.khan@linaro.org> wrote:
> >>
> >> Hi Helge,
> >>
> >> On Wed, 10 Oct 2018 at 01:48, Helge Deller <deller@gmx.de> wrote:
> >>>
> >>> * Firoz Khan <firoz.khan@linaro.org>:
> >>>> System call table generation script must be run to generate
> >>>> unistd_32/64.h and syscall_table_32/64/c32.h files. This patch
> >>>> will have changes which will invokes the script.
> >>>>
> >>>> This patch will generate unistd_32/64.h and syscall_table_
> >>>> 32/64/c32.h files by the syscall table generation script
> >>>> invoked by arch/parisc/Makefile and the generated files against
> >>>> the removed files will be identical.
> >>>>
> >>>> The generated uapi header file will be included in uapi/asm/
> >>>> unistd_32/64.h and generated system call table support file will
> >>>> be included by arch/sparc/kernel/syscall_table_32/64.S file.
> >>>>
> >>>> Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
> >>>> ---
> >>>>  arch/parisc/Makefile                  |   4 +
> >>>>  arch/parisc/include/asm/Kbuild        |   3 +
> >>>>  arch/parisc/include/uapi/asm/Kbuild   |   2 +
> >>>>  arch/parisc/include/uapi/asm/unistd.h | 373 +--------------------------
> >>>>  arch/parisc/kernel/syscall.S          |  12 +-
> >>>>  arch/parisc/kernel/syscall_table.S    | 459 ----------------------------------
> >>>
> >>>
> >>> Can we please get rid of those two new files:
> >>
> >> Yes, we don't need those files some of the architecture and other
> >> architecture does have same/similar files. That's why I added below
> >> files, so every architecture implementation looks same.
> >>
> >> I feel it is better to remove these files.
> >> Arnd, Do u have any comment on this?
> >>
> >> Thanks
> >> Firoz
> >>
> >>>
> >>>>  arch/parisc/kernel/syscall_table_32.S |  13 +
> >>>>  arch/parisc/kernel/syscall_table_64.S |  20 ++
> >>>
> >>> Both are not needed (at least on parisc) if you apply the following
> >>> patch on top of your patch series.
> >>> This patch finally fixes the 64-bit kernel on parisc (tested on real
> >>> hardware).
> >>>
> >>> Helge
> >>>
> >>> diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
> >>> index 2523b83b88d8..45cddeeb968f 100644
> >>> --- a/arch/parisc/kernel/syscall.S
> >>> +++ b/arch/parisc/kernel/syscall.S
> >>> @@ -923,10 +923,20 @@ ENTRY(lws_table)
> >>>  END(lws_table)
> >>>         /* End of lws table */
> >>>
> >>> -#include "syscall_table_32.S"
> >>> +#define __SYSCALL(nr, entry, nargs) ASM_ULONG_INSN entry
> >>> +
> >>> +ENTRY(sys_call_table)
> >>> +#if defined(CONFIG_64BIT)
> >>> +#include <asm/syscall_table_c32.h>     /* compat syscalls */
> >>> +#else
> >>> +#include <asm/syscall_table_32.h>      /* 32-bit native syscalls */
> >>> +#endif
> >>> +END(sys_call_table)
> >>> +
> >>>  #ifdef CONFIG_64BIT
> >>> -#define SYSCALL_TABLE_64BIT
> >>> -#include "syscall_table_64.S"
> >>> +ENTRY(sys_call_table64)
> >>> +#include <asm/syscall_table_64.h>      /* 64-bit native syscalls */
> >>> +END(sys_call_table64)
> >>>  #endif
> >>>
> >>>         /*
> >
> > I could see a patch (commit 47514da3ac20150cdf764466fbc2010c0fca0163)
> > which will perform a compile-check when adding a new syscall. My patches
> > will remove this feature. Is that fine?
>
> Yes, removing that feature is OK.
> Since everything is then autogenerated I don't expect such bugs.

Sure, thanks for your reply.

Firoz

>
> Helge

^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2018-10-11 22:28 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08  5:16 [PATCH v3 0/6] System call table generation support Firoz Khan
2018-10-08  5:16 ` Firoz Khan
2018-10-08  5:16 ` [PATCH v3 1/6] parisc: move __IGNORE* entries to non uapi header Firoz Khan
2018-10-08  5:16   ` Firoz Khan
2018-10-08  5:16 ` [PATCH v3 2/6] parisc: add __NR_Linux_syscalls along with __NR_syscalls Firoz Khan
2018-10-08  5:16   ` Firoz Khan
2018-10-08  5:16 ` [PATCH v3 3/6] parisc: add system call table generation support Firoz Khan
2018-10-08  5:16   ` Firoz Khan
2018-10-08  7:33   ` Firoz Khan
2018-10-08  7:33     ` Firoz Khan
2018-10-08 13:03     ` Eugene Syromiatnikov
2018-10-08 13:03       ` Eugene Syromiatnikov
2018-10-08 13:56       ` Arnd Bergmann
2018-10-08 13:56         ` Arnd Bergmann
2018-10-09  5:35         ` Firoz Khan
2018-10-09  5:35           ` Firoz Khan
2018-10-09  5:40           ` Firoz Khan
2018-10-09  5:40             ` Firoz Khan
2018-10-09  7:47           ` Arnd Bergmann
2018-10-09  7:47             ` Arnd Bergmann
2018-10-09  9:36             ` Firoz Khan
2018-10-09  9:36               ` Firoz Khan
2018-10-09 11:28               ` Arnd Bergmann
2018-10-09 11:28                 ` Arnd Bergmann
2018-10-09 14:10                 ` Firoz Khan
2018-10-09 14:10                   ` Firoz Khan
2018-10-08  5:16 ` [PATCH v3 4/6] parisc: uapi header and system call table file generation Firoz Khan
2018-10-08  5:16   ` Firoz Khan
2018-10-08 19:43   ` Helge Deller
2018-10-08 19:43     ` Helge Deller
2018-10-09  4:56     ` Firoz Khan
2018-10-09  4:56       ` Firoz Khan
2018-10-09 20:13   ` Helge Deller
2018-10-09 20:13     ` Helge Deller
2018-10-11  6:10     ` Firoz Khan
2018-10-11  6:10       ` Firoz Khan
2018-10-11  6:14       ` Firoz Khan
2018-10-11  6:14         ` Firoz Khan
2018-10-11  6:48       ` Firoz Khan
2018-10-11  6:48         ` Firoz Khan
2018-10-11  7:03         ` Arnd Bergmann
2018-10-11  7:03           ` Arnd Bergmann
2018-10-11 10:27         ` Helge Deller
2018-10-11 10:27           ` Helge Deller
2018-10-11 15:01           ` Firoz Khan
2018-10-11 15:01             ` Firoz Khan
2018-10-11  7:07       ` Arnd Bergmann
2018-10-11  7:07         ` Arnd Bergmann
2018-10-11  8:30         ` Firoz Khan
2018-10-11  8:30           ` Firoz Khan
2018-10-08  5:16 ` [PATCH v3 5/6] parisc: wire up rseq system call Firoz Khan
2018-10-08  5:16   ` Firoz Khan
2018-10-08  5:36   ` Helge Deller
2018-10-08  5:36     ` Helge Deller
2018-10-08  5:52     ` Firoz Khan
2018-10-08  5:52       ` Firoz Khan
2018-10-08  6:06       ` Helge Deller
2018-10-08  6:06         ` Helge Deller
2018-10-08  6:48         ` Firoz Khan
2018-10-08  6:48           ` Firoz Khan
2018-10-08  8:23           ` Geert Uytterhoeven
2018-10-08  8:23             ` Geert Uytterhoeven
2018-10-08  8:55             ` Firoz Khan
2018-10-08  8:55               ` Firoz Khan
2018-10-08  8:58               ` Geert Uytterhoeven
2018-10-08  8:58                 ` Geert Uytterhoeven
2018-10-08  9:11                 ` Arnd Bergmann
2018-10-08  9:11                   ` Arnd Bergmann
2018-10-08  5:16 ` [PATCH v3 6/6] parisc: syscalls: Ignore nfsservctl for other architectures Firoz Khan
2018-10-08  5:16   ` Firoz Khan

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).