blob: 727d49bc8280073258db69ebce28ff36bac3b169 [file] [log] [blame]
Dmitry V. Levin95edb8b2014-12-03 20:50:08 +00001#include "defs.h"
2
3#ifdef HAVE_ASM_CACHECTL_H
4# include <asm/cachectl.h>
5#endif
6
7#ifdef M68K
8# include "xlat/cacheflush_scope.h"
9
10static const struct xlat cacheflush_flags[] = {
11#ifdef FLUSH_CACHE_BOTH
12 XLAT(FLUSH_CACHE_BOTH),
13#endif
14#ifdef FLUSH_CACHE_DATA
15 XLAT(FLUSH_CACHE_DATA),
16#endif
17#ifdef FLUSH_CACHE_INSN
18 XLAT(FLUSH_CACHE_INSN),
19#endif
20 XLAT_END
21};
22
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000023SYS_FUNC(cacheflush)
Dmitry V. Levin95edb8b2014-12-03 20:50:08 +000024{
25 if (entering(tcp)) {
26 /* addr */
27 tprintf("%#lx, ", tcp->u_arg[0]);
28 /* scope */
29 printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
30 tprints(", ");
31 /* flags */
32 printflags(cacheflush_flags, tcp->u_arg[2], "FLUSH_CACHE_???");
33 /* len */
34 tprintf(", %lu", tcp->u_arg[3]);
35 }
36 return 0;
37}
38#endif /* M68K */
39
40#ifdef BFIN
41static const struct xlat cacheflush_flags[] = {
42 XLAT(ICACHE),
43 XLAT(DCACHE),
44 XLAT(BCACHE),
45 XLAT_END
46};
47
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000048SYS_FUNC(cacheflush)
Dmitry V. Levin95edb8b2014-12-03 20:50:08 +000049{
50 if (entering(tcp)) {
51 /* start addr */
52 tprintf("%#lx, ", tcp->u_arg[0]);
53 /* length */
54 tprintf("%ld, ", tcp->u_arg[1]);
55 /* flags */
56 printxval(cacheflush_flags, tcp->u_arg[1], "?CACHE");
57 }
58 return 0;
59}
60#endif /* BFIN */
61
62#ifdef SH
63static const struct xlat cacheflush_flags[] = {
64#ifdef CACHEFLUSH_D_INVAL
65 XLAT(CACHEFLUSH_D_INVAL),
66#endif
67#ifdef CACHEFLUSH_D_WB
68 XLAT(CACHEFLUSH_D_WB),
69#endif
70#ifdef CACHEFLUSH_D_PURGE
71 XLAT(CACHEFLUSH_D_PURGE),
72#endif
73#ifdef CACHEFLUSH_I
74 XLAT(CACHEFLUSH_I),
75#endif
76 XLAT_END
77};
78
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000079SYS_FUNC(cacheflush)
Dmitry V. Levin95edb8b2014-12-03 20:50:08 +000080{
81 if (entering(tcp)) {
82 /* addr */
83 tprintf("%#lx, ", tcp->u_arg[0]);
84 /* len */
85 tprintf("%lu, ", tcp->u_arg[1]);
86 /* flags */
87 printflags(cacheflush_flags, tcp->u_arg[2], "CACHEFLUSH_???");
88 }
89 return 0;
90}
91#endif /* SH */