]> granicus.if.org Git - strace/commitdiff
bfin: move sram_alloc parser to a separate file
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 3 Dec 2014 20:56:36 +0000 (20:56 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 4 Dec 2014 02:22:38 +0000 (02:22 +0000)
* 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
sram_alloc.c [new file with mode: 0644]
system.c

index f0e4e13c9800ceafb44e4469be0a05119c985142..5abaeea3006cdad3da87e216eaef441cc87b8b21 100644 (file)
@@ -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 (file)
index 0000000..b524c7b
--- /dev/null
@@ -0,0 +1,21 @@
+#include "defs.h"
+
+#ifdef BFIN
+
+#include <bfin_sram.h>
+
+#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 */
index a522e1a898515dae8eca353bd4172c1423d167e6..ae72c66120ad3f9b392fe10dd5e72df83c6abefb 100644 (file)
--- a/system.c
+++ b/system.c
@@ -224,24 +224,6 @@ sys_cacheflush(struct tcb *tcp)
 
 #ifdef BFIN
 
-#include <bfin_sram.h>
-
-#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 <asm/cachectl.h>
-
 static const struct xlat cacheflush_flags[] = {
        XLAT(ICACHE),
        XLAT(DCACHE),