From e36c72cbed1bc61af96c97bed97aaf59ef577a82 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 3 Dec 2014 20:56:36 +0000 Subject: [PATCH] bfin: move sram_alloc parser to a separate file * sram_alloc.c: New file. * Makefile.am (strace_SOURCES): Add it. * system.c [BFIN]: Move sys_sram_alloc and related code to sram_alloc.c. --- Makefile.am | 1 + sram_alloc.c | 21 +++++++++++++++++++++ system.c | 18 ------------------ 3 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 sram_alloc.c diff --git a/Makefile.am b/Makefile.am index f0e4e13c..5abaeea3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,7 @@ strace_SOURCES = \ signal.c \ sock.c \ socketutils.c \ + sram_alloc.c \ statfs.c \ strace.c \ stream.c \ diff --git a/sram_alloc.c b/sram_alloc.c new file mode 100644 index 00000000..b524c7b2 --- /dev/null +++ b/sram_alloc.c @@ -0,0 +1,21 @@ +#include "defs.h" + +#ifdef BFIN + +#include + +#include "xlat/sram_alloc_flags.h" + +int +sys_sram_alloc(struct tcb *tcp) +{ + if (entering(tcp)) { + /* size */ + tprintf("%lu, ", tcp->u_arg[0]); + /* flags */ + printflags(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); + } + return 1; +} + +#endif /* BFIN */ diff --git a/system.c b/system.c index a522e1a8..ae72c661 100644 --- a/system.c +++ b/system.c @@ -224,24 +224,6 @@ sys_cacheflush(struct tcb *tcp) #ifdef BFIN -#include - -#include "xlat/sram_alloc_flags.h" - -int -sys_sram_alloc(struct tcb *tcp) -{ - if (entering(tcp)) { - /* size */ - tprintf("%lu, ", tcp->u_arg[0]); - /* flags */ - printflags(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); - } - return 1; -} - -#include - static const struct xlat cacheflush_flags[] = { XLAT(ICACHE), XLAT(DCACHE), -- 2.40.0