From: Mike Frysinger Date: Sat, 11 Sep 2010 19:04:18 +0000 (-0400) Subject: Blackfin: decode new syscalls X-Git-Tag: v4.6~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=260e571343b12221ad848a9c972fc5518d66ef2c;p=strace Blackfin: decode new syscalls * 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 --- diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h index 660b8422..3126261f 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 6bfed870..679697fb 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 63a64b85..e16a6be4 100644 --- a/system.c +++ b/system.c @@ -318,6 +318,29 @@ sys_sram_alloc(struct tcb *tcp) return 1; } +#include + +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 */