[PATCH] Blackfin: decode new syscalls

Mike Frysinger vapier at gentoo.org
Sat Sep 11 19:04:18 UTC 2010


* linux/bfin/syscallent.h: Add fanotify/prlimit/cacheflush syscalls.
* linux/syscall.h: Add sys_cacheflush() decl.
* system.c: Decode Blackfin's cacheflush syscall.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 linux/bfin/syscallent.h |    4 ++++
 linux/syscall.h         |    1 +
 system.c                |   23 +++++++++++++++++++++++
 3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h
index 660b842..3126261 100644
--- a/linux/bfin/syscallent.h
+++ b/linux/bfin/syscallent.h
@@ -399,3 +399,7 @@
 	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"	}, /* 368 */
 	{ 5,	TD,	printargs,		"perf_event_open"	}, /* 369 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 370 */
+	{ 2,	0,	printargs,		"fanotify_init"	}, /* 371 */
+	{ 5,	0,	printargs,		"fanotify_mark"	}, /* 372 */
+	{ 4,	0,	printargs,		"prlimit64"	}, /* 373 */
+	{ 3,	0,	sys_cacheflush,		"cacheflush"	}, /* 374 */
diff --git a/linux/syscall.h b/linux/syscall.h
index 6bfed87..679697f 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -334,4 +334,5 @@ int sys_subpage_prot();
 
 #ifdef BFIN
 int sys_sram_alloc();
+int sys_cacheflush();
 #endif
diff --git a/system.c b/system.c
index 63a64b8..e16a6be 100644
--- a/system.c
+++ b/system.c
@@ -318,6 +318,29 @@ sys_sram_alloc(struct tcb *tcp)
 	return 1;
 }
 
+#include <asm/cachectl.h>
+
+static const struct xlat cacheflush_flags[] = {
+	{ ICACHE,	"ICACHE" },
+	{ DCACHE,	"DCACHE" },
+	{ BCACHE,	"BCACHE" },
+	{ 0,		NULL },
+};
+
+int
+sys_cacheflush(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* start addr */
+		tprintf("%#lx, ", tcp->u_arg[0]);
+		/* length */
+		tprintf("%ld, ", tcp->u_arg[1]);
+		/* flags */
+		printxval(cacheflush_flags, tcp->u_arg[1], "?CACHE");
+	}
+	return 0;
+}
+
 #endif
 
 #endif /* LINUX */
-- 
1.7.2





More information about the Strace-devel mailing list