Skip to content

Commit

Permalink
trinity: Add support for runtime_instr svc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Richter authored and kernelslacker committed Feb 18, 2018
1 parent b9a7bd0 commit 617b496
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/syscalls-s390.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion include/syscalls-s390x.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
25 changes: 25 additions & 0 deletions syscalls/s390x/runtime_instr.c
Original file line number Diff line number Diff line change
@@ -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
};
1 change: 1 addition & 0 deletions syscalls/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 617b496

Please sign in to comment.