]> granicus.if.org Git - strace/commitdiff
Blackfin: decode new syscalls
authorMike Frysinger <vapier@gentoo.org>
Sat, 11 Sep 2010 19:04:18 +0000 (15:04 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 15 Sep 2010 15:36:00 +0000 (15:36 +0000)
* 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@gentoo.org>
linux/bfin/syscallent.h
linux/syscall.h
system.c

index 660b84222803c04ce8e978e3c0a66eb36b475ae1..3126261f1ecb1e1bde6597f1dee988fe73ee6edc 100644 (file)
        { 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 */
index 6bfed8702d607a3e88a75b7ffb3794af5ae2505d..679697fb45406125023070798fec113baded5632 100644 (file)
@@ -334,4 +334,5 @@ int sys_subpage_prot();
 
 #ifdef BFIN
 int sys_sram_alloc();
+int sys_cacheflush();
 #endif
index 63a64b858035826e313e5603ccd17787f5a6fdc4..e16a6be4a1b8315c5d072fe773f9567bddee7196 100644 (file)
--- 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 */