All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] trinity: Add support for runtime_instr svc
@ 2018-02-13  7:55 Thomas Richter
  2018-02-13  7:55 ` [PATCH 2/4] trinity: Add support for s390_pci_mmio_read and write Thomas Richter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Richter @ 2018-02-13  7:55 UTC (permalink / raw)
  To: trinity, davej; +Cc: brueckner, schwidefsky, heiko.carstens, Thomas Richter

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

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
---
 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

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

end of thread, other threads:[~2018-02-13  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13  7:55 [PATCH 1/4] trinity: Add support for runtime_instr svc Thomas Richter
2018-02-13  7:55 ` [PATCH 2/4] trinity: Add support for s390_pci_mmio_read and write Thomas Richter
2018-02-13  7:55 ` [PATCH 3/4] trinity: Add support for s390_guarded_storage svc Thomas Richter
2018-02-13  7:55 ` [PATCH 4/4] trinity: Add support for s390_sthyi svc Thomas Richter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.