trinity: Add support for runtime_instr svc
PATCH 1/4 trinity: Add support for runtime_instr svc
This patch adds support for the s390 specific system call runtime_instr() for 31 and 64 bit.
Signed-off-by Thomas Richter <[email protected]>
--- 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
Makefile +1 -0
@@ -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
include/syscalls-s390.h +1 -1
@@ -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 },
include/syscalls-s390x.h +1 -1
@@ -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 },
syscalls/s390x/runtime_instr.c new file +25 -0
@@ -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 +};
syscalls/syscalls.h +1 -0
@@ -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 );
Signature · 1 line
2.14.3
PATCH 2/4 trinity: Add support for s390_pci_mmio_read and write
Add support for s390 specific system callss390_pci_mmio_read and 390_pci_mmio_write
for 31 bit and 64 bit.
Signed-off-by Thomas Richter <[email protected]>
--- include/syscalls-s390.h | 4 +-- include/syscalls-s390x.h | 4 +-- syscalls/s390x/s390_pci_mmio.c | 70 ++++++++++++++++++++++++++++++++++++++++++ syscalls/syscalls.h | 2 ++ 4 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 syscalls/s390x/s390_pci_mmio.c
include/syscalls-s390.h +2 -2
@@ -363,8 +363,8 @@ struct syscalltable syscalls_s390[] = { #else { .entry = NULL }, #endif - { .entry = &syscall_ni_syscall }, /* TODO: s390_pci_mmio_write svc */ - { .entry = &syscall_ni_syscall }, /* TODO: s390_pci_mmio_read svc */ + { .entry = &syscall_s390_pci_mmio_write }, + { .entry = &syscall_s390_pci_mmio_read }, { .entry = &syscall_execveat }, { .entry = &syscall_userfaultfd }, { .entry = &syscall_membarrier },
include/syscalls-s390x.h +2 -2
@@ -363,8 +363,8 @@ struct syscalltable syscalls_s390x[] = { #else { .entry = NULL }, #endif - { .entry = &syscall_ni_syscall }, /* TODO: s390_pci_mmio_write svc */ - { .entry = &syscall_ni_syscall }, /* TODO: s390_pci_mmio_read svc */ + { .entry = &syscall_s390_pci_mmio_write }, + { .entry = &syscall_s390_pci_mmio_read }, { .entry = &syscall_execveat }, { .entry = &syscall_userfaultfd }, { .entry = &syscall_membarrier },
syscalls/s390x/s390_pci_mmio.c new file +70 -0
70 lines not on this page · raw message
syscalls/syscalls.h +2 -0
@@ -387,5 +387,7 @@ extern struct syscallentry syscall_pkey_alloc;extern struct syscallentry syscall_pkey_free;extern struct syscallentry syscall_statx;extern struct syscallentry syscall_runtime_instr; +extern struct syscallentry syscall_s390_pci_mmio_write; +extern struct syscallentry syscall_s390_pci_mmio_read;unsigned int random_fcntl_setfl_flags (void );
Signature · 1 line
2.14.3
PATCH 3/4 trinity: Add support for s390_guarded_storage svc
In reply to Thomas RichterAdd support for s390 specific system call s390_guarded_storage for 31 bit and 64 bit.
Signed-off-by Thomas Richter <[email protected]>
--- include/syscalls-s390.h | 2 +- include/syscalls-s390x.h | 2 +- syscalls/s390x/s390_guarded_storage.c | 48 +++++++++++++++++++++++++++++++++++ syscalls/syscalls.h | 1 + 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 syscalls/s390x/s390_guarded_storage.c
include/syscalls-s390.h +1 -1
@@ -389,7 +389,7 @@ struct syscalltable syscalls_s390[] = { { .entry = &syscall_copy_file_range }, { .entry = &syscall_preadv2 }, { .entry = &syscall_pwritev2 }, - { .entry = &syscall_ni_syscall }, /* TODO: s390_guarded_storage svc */ + { .entry = &syscall_s390_guarded_storage }, { .entry = &syscall_statx }, { .entry = &syscall_ni_syscall }, /* TODO: s390_sthyi svc */ };
include/syscalls-s390x.h +1 -1
@@ -389,7 +389,7 @@ struct syscalltable syscalls_s390x[] = { { .entry = &syscall_copy_file_range }, { .entry = &syscall_preadv2 }, { .entry = &syscall_pwritev2 }, - { .entry = &syscall_ni_syscall }, /* TODO: s390_guarded_storage svc */ + { .entry = &syscall_s390_guarded_storage }, { .entry = &syscall_statx }, { .entry = &syscall_ni_syscall }, /* TODO: s390_sthyi svc */ };
syscalls/s390x/s390_guarded_storage.c new file +48 -0
48 lines not on this page · raw message
syscalls/syscalls.h +1 -0
@@ -389,5 +389,6 @@ extern struct syscallentry syscall_statx;extern struct syscallentry syscall_runtime_instr;extern struct syscallentry syscall_s390_pci_mmio_write;extern struct syscallentry syscall_s390_pci_mmio_read; +extern struct syscallentry syscall_s390_guarded_storage;unsigned int random_fcntl_setfl_flags (void );
Signature · 1 line
2.14.3
PATCH 4/4 trinity: Add support for s390_sthyi svc
In reply to Thomas RichterAdd support for s390 specific system call s390_sthyi for 31 bit and 64 bit.
Signed-off-by Thomas Richter <[email protected]>
--- include/syscalls-s390.h | 2 +- include/syscalls-s390x.h | 2 +- syscalls/s390x/s390_sthyi.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ syscalls/syscalls.h | 1 + 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 syscalls/s390x/s390_sthyi.c
include/syscalls-s390.h +1 -1
@@ -391,5 +391,5 @@ struct syscalltable syscalls_s390[] = { { .entry = &syscall_pwritev2 }, { .entry = &syscall_s390_guarded_storage }, { .entry = &syscall_statx }, - { .entry = &syscall_ni_syscall }, /* TODO: s390_sthyi svc */ + { .entry = &syscall_s390_sthyi }, };
include/syscalls-s390x.h +1 -1
@@ -391,5 +391,5 @@ struct syscalltable syscalls_s390x[] = { { .entry = &syscall_pwritev2 }, { .entry = &syscall_s390_guarded_storage }, { .entry = &syscall_statx }, - { .entry = &syscall_ni_syscall }, /* TODO: s390_sthyi svc */ + { .entry = &syscall_s390_sthyi }, };
syscalls/s390x/s390_sthyi.c new file +60 -0
60 lines not on this page · raw message
syscalls/syscalls.h +1 -0
@@ -390,5 +390,6 @@ extern struct syscallentry syscall_runtime_instr;extern struct syscallentry syscall_s390_pci_mmio_write;extern struct syscallentry syscall_s390_pci_mmio_read;extern struct syscallentry syscall_s390_guarded_storage; +extern struct syscallentry syscall_s390_sthyi;unsigned int random_fcntl_setfl_flags (void );
Signature · 1 line
2.14.3