From: Wade Farnsworth <wade_farnsworth@mentor.com>
To: <systemtap@sourceware.org>
Subject: [PATCH 1/2] Userspace tap support for ARM
Date: Thu, 03 Nov 2011 18:08:00 -0000 [thread overview]
Message-ID: <4EB2D88B.8020301@mentor.com> (raw)
In-Reply-To: <4EB2D832.60402@mentor.com>
Add syscall information for ARM devices. This allows tapsets to be
compiled on this architecture when CONFIG_UTRACE is enabled.
Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
---
runtime/syscall.h | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/runtime/syscall.h b/runtime/syscall.h
index 786965f..2adcd3b 100644
--- a/runtime/syscall.h
+++ b/runtime/syscall.h
@@ -85,6 +85,14 @@
#define MREMAP_SYSCALL_NO(tsk) 163
#endif
+#if defined(__arm__)
+#define MMAP_SYSCALL_NO(tsk) 90
+#define MMAP2_SYSCALL_NO(tsk) 192
+#define MPROTECT_SYSCALL_NO(tsk) 125
+#define MUNMAP_SYSCALL_NO(tsk) 91
+#define MREMAP_SYSCALL_NO(tsk) 163
+#endif
+
#if !defined(MMAP_SYSCALL_NO) || !defined(MMAP2_SYSCALL_NO) \
|| !defined(MPROTECT_SYSCALL_NO) || !defined(MUNMAP_SYSCALL_NO) \
|| !defined(MREMAP_SYSCALL_NO)
@@ -146,6 +154,14 @@ syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
}
#endif
+#if defined(__arm__)
+static inline long
+syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
+{
+ return regs->ARM_r7;
+}
+#endif
+
#if defined(__i386__) || defined(__x86_64__)
static inline long
syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
@@ -196,6 +212,14 @@ syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
}
#endif
+#if defined(__arm__)
+static inline long
+syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
+{
+ return regs->ARM_r0;
+}
+
+#endif
#if defined(__i386__) || defined(__x86_64__)
static inline void
syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
@@ -490,5 +514,19 @@ syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
}
#endif
+#if defined(__arm__)
+static inline void
+syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
+ unsigned int i, unsigned int n, unsigned long *args)
+{
+ if (i + n > 6) {
+ _stp_error("invalid syscall arg request");
+ return;
+ }
+
+ memcpy(args, ®s->uregs[i], n * sizeof(args[0]));
+}
+#endif
+
#endif /* !STAPCONF_ASM_SYSCALL_H */
#endif /* _SYSCALL_H_ */
--
1.7.0.4
next prev parent reply other threads:[~2011-11-03 18:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 18:07 [PATCH 0/2] " Wade Farnsworth
2011-11-03 18:08 ` Wade Farnsworth [this message]
2011-11-03 18:13 ` [PATCH 1/2] Add syscall information " Wade Farnsworth
2011-11-04 12:12 ` Mark Wielaard
2011-11-03 18:09 ` [PATCH 2/2] ARM uprobes support Wade Farnsworth
2011-11-04 19:35 ` [PATCH v2] " Wade Farnsworth
2011-11-23 14:17 ` Mark Wielaard
2011-11-03 20:36 ` [PATCH 0/2] Userspace tap support for ARM Wade Farnsworth
2011-11-04 9:05 ` Mark Wielaard
[not found] ` <4EB3F998.7030305@mentor.com>
2011-11-04 19:41 ` Wade Farnsworth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EB2D88B.8020301@mentor.com \
--to=wade_farnsworth@mentor.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).