[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds support for the s390 specific system
call runtime_instr() for 31 and 64 bit.

Signed-off-by: Thomas Richter <tmricht@xxxxxxxxxxxxxxxxxx>
---
 Makefile                       |  1 +
 include/syscalls-s390.h        |  2 +-
 include/syscalls-s390x.h       |  2 +-
 syscalls/s390x/runtime_instr.c | 25 +++++++++++++++++++++++++
 syscalls/syscalls.h            |  1 +
 5 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 syscalls/s390x/runtime_instr.c

diff --git a/Makefile b/Makefile
index 78619064..93e3460d 100644
--- a/Makefile
+++ b/Makefile
@@ -87,6 +87,7 @@ SYSCALLS_ARCH	:= $(shell case "$(MACHINE)" in \
 				  syscalls/x86/x86_64/*.c;; \
 		   (i?86*) echo syscalls/x86/*.c \
 				syscalls/x86/i386/*.c;; \
+		   (s390x*) echo syscalls/s390x/*.c ;; \
 		   esac)
 
 VERSION_H	:= include/version.h
diff --git a/include/syscalls-s390.h b/include/syscalls-s390.h
index 682d2030..c02ced94 100644
--- a/include/syscalls-s390.h
+++ b/include/syscalls-s390.h
@@ -349,7 +349,7 @@ struct syscalltable syscalls_s390[] = {
 	{ .entry = &syscall_setns },
 	{ .entry = &syscall_process_vm_readv },
 	{ .entry = &syscall_process_vm_writev },
-	{ .entry = &syscall_ni_syscall },	/* TODO: s390_runtime_instr */
+	{ .entry = &syscall_runtime_instr },	/* s390_runtime_instr svc */
 	{ .entry = &syscall_kcmp },
 	{ .entry = &syscall_finit_module },
 	{ .entry = &syscall_sched_setattr },
diff --git a/include/syscalls-s390x.h b/include/syscalls-s390x.h
index a3e26181..b955ceaa 100644
--- a/include/syscalls-s390x.h
+++ b/include/syscalls-s390x.h
@@ -349,7 +349,7 @@ struct syscalltable syscalls_s390x[] = {
 	{ .entry = &syscall_setns },
 	{ .entry = &syscall_process_vm_readv },
 	{ .entry = &syscall_process_vm_writev },
-	{ .entry = &syscall_ni_syscall },	/* TODO: s390_runtime_instr */
+	{ .entry = &syscall_runtime_instr },	/* s390_runtime_instr svc */
 	{ .entry = &syscall_kcmp },
 	{ .entry = &syscall_finit_module },
 	{ .entry = &syscall_sched_setattr },
diff --git a/syscalls/s390x/runtime_instr.c b/syscalls/s390x/runtime_instr.c
new file mode 100644
index 00000000..aa1f75fb
--- /dev/null
+++ b/syscalls/s390x/runtime_instr.c
@@ -0,0 +1,25 @@
+/*
+ * int runtime_instr(int on_off, int sig_nr)
+ */
+
+#include "sanitise.h"
+
+#define S390_RUNTIME_INSTR_START	0x1
+#define S390_RUNTIME_INSTR_STOP		0x2
+
+static unsigned long syscall_runtime_instr_arg1[] = {
+	0, S390_RUNTIME_INSTR_START, S390_RUNTIME_INSTR_STOP, 3
+};
+
+struct syscallentry syscall_runtime_instr = {
+	.name = "runtime_instr",
+	.num_args = 2,
+	.arg1name = "on_off",
+	.arg1type = ARG_LIST,
+	.arg1list = ARGLIST(syscall_runtime_instr_arg1),
+	.arg2name = "sig_nr",
+	.arg2type = ARG_RANGE,
+	.low2range = 0,
+	.hi2range = 128,
+	.rettype = RET_ZERO_SUCCESS
+};
diff --git a/syscalls/syscalls.h b/syscalls/syscalls.h
index 38819b37..2260bbf8 100644
--- a/syscalls/syscalls.h
+++ b/syscalls/syscalls.h
@@ -386,5 +386,6 @@ extern struct syscallentry syscall_pkey_mprotect;
 extern struct syscallentry syscall_pkey_alloc;
 extern struct syscallentry syscall_pkey_free;
 extern struct syscallentry syscall_statx;
+extern struct syscallentry syscall_runtime_instr;
 
 unsigned int random_fcntl_setfl_flags(void);
-- 
2.14.3

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux