summaryrefslogtreecommitdiffstats
path: root/runtime/syscall.h
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-04-21 11:11:02 -0400
committerDave Brolley <brolley@redhat.com>2009-04-21 11:11:02 -0400
commit09fd19d66b9e3318e9e33f604eb2dbe623955123 (patch)
tree073dc18e4ca3ca4bac674c7225a9a54e5fafc7f7 /runtime/syscall.h
parentd4935c2f80122827a02d9f66c020d7e8ef6d6ade (diff)
parent9a6d143c6e2c79cee1082d0455da92cfa78b03c7 (diff)
downloadsystemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.tar.gz
systemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.tar.xz
systemtap-steved-09fd19d66b9e3318e9e33f604eb2dbe623955123.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Conflicts: aclocal.m4 configure
Diffstat (limited to 'runtime/syscall.h')
-rw-r--r--runtime/syscall.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/runtime/syscall.h b/runtime/syscall.h
index 6d22ba83..5e538389 100644
--- a/runtime/syscall.h
+++ b/runtime/syscall.h
@@ -124,7 +124,7 @@ syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
static inline long
syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
{
- return regs->r15;
+ return regs->r15;
}
#endif
@@ -304,6 +304,17 @@ syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
_stp_error("invalid syscall arg request");
return;
}
+#ifdef CONFIG_PPC64
+ if (test_tsk_thread_flag(task, TIF_32BIT)) {
+ /*
+ * Zero-extend 32-bit argument values. The high bits are
+ * garbage ignored by the actual syscall dispatch.
+ */
+ while (n-- > 0)
+ args[n] = (u32) regs->gpr[3 + i + n];
+ return;
+ }
+#endif
memcpy(args, &regs->gpr[3 + i], n * sizeof(args[0]));
}
#endif
@@ -324,22 +335,22 @@ __ia64_syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
switch (i) {
case 0:
if (!n--) break;
- *args++ = *__ia64_fetch_register(i + 32, regs, cache);
+ *args++ = ia64_fetch_register(32, regs, cache);
case 1:
if (!n--) break;
- *args++ = *__ia64_fetch_register(i + 33, regs, cache);
+ *args++ = ia64_fetch_register(33, regs, cache);
case 2:
if (!n--) break;
- *args++ = *__ia64_fetch_register(i + 34, regs, cache);
+ *args++ = ia64_fetch_register(34, regs, cache);
case 3:
if (!n--) break;
- *args++ = *__ia64_fetch_register(i + 35, regs, cache);
+ *args++ = ia64_fetch_register(35, regs, cache);
case 4:
if (!n--) break;
- *args++ = *__ia64_fetch_register(i + 36, regs, cache);
+ *args++ = ia64_fetch_register(36, regs, cache);
case 5:
if (!n--) break;
- *args++ = *__ia64_fetch_register(i + 37, regs, cache);
+ *args++ = ia64_fetch_register(37, regs, cache);
}
}
#endif