- switch (request) {
- case PTRACE_SYSCALL:
- /* continue and stop at next (return from) syscall */
- case PTRACE_CONT:
- /* restart after signal. */
- if (!valid_signal(data))
- return -EIO;
- if (request == PTRACE_SYSCALL)
- set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- else
- clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- child->exit_code = data;
- /* make sure the single step bit is not set. */
- clear_single_step(child);
- wake_up_process(child);
- return 0;
+static const struct utrace_regset s390_compat_regsets[] = {
+ {
+ .size = sizeof(u32), .align = sizeof(u32),
+ .n = sizeof(s390_regs) / sizeof(long),
+ .get = s390_genregs_get, .set = s390_genregs_set
+ },
+ {
+ .size = sizeof(u32), .align = sizeof(u32),
+ .n = sizeof(s390_fp_regs) / sizeof(u32),
+ .get = fpregs_get, .set = fpregs_set
+ },
+ {
+ .size = sizeof(u32), .align = sizeof(u32),
+ .n = sizeof(per_struct) / sizeof(u32),
+ .get = s390_per_info_get, .set = s390_per_info_set
+ },
+};
+
+const struct utrace_regset_view utrace_s390_compat_view = {
+ .name = "s390", .e_machine = EM_S390,
+ .regsets = s390_compat_regsets, .n = ARRAY_SIZE(s390_compat_regsets)
+};
+EXPORT_SYMBOL_GPL(utrace_s390_compat_view);
+#endif /* CONFIG_COMPAT */
+
+
+#ifdef CONFIG_PTRACE
+static const struct ptrace_layout_segment s390_uarea[] = {
+ {PT_PSWMASK, PT_FPC, 0, 0},
+ {PT_FPC, PT_CR_9, 1, 0},
+ {PT_CR_9, PT_IEEE_IP, 2, 0},
+ {PT_IEEE_IP, sizeof(struct user), -1, -1},
+ {0, 0, -1, 0}
+};
+
+int arch_ptrace(long *request, struct task_struct *child,
+ struct utrace_attached_engine *engine,
+ unsigned long addr, unsigned long data, long *val)
+{
+ ptrace_area parea;
+ unsigned long tmp;
+ int copied;