]> granicus.if.org Git - strace/blob - cacheflush.c
bfin, csky, m68k, sh: fix build regression
[strace] / cacheflush.c
1 /*
2  * Copyright (c) 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
3  * Copyright (c) 2010 Mike Frysinger <vapier@gentoo.org>
4  * Copyright (c) 2010 Carmelo Amoroso <carmelo.amoroso@st.com>
5  * Copyright (c) 2015 Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
6  * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
7  * Copyright (c) 2014-2019 The strace developers.
8  * All rights reserved.
9  *
10  * SPDX-License-Identifier: LGPL-2.1-or-later
11  */
12
13 #include "defs.h"
14
15 #ifdef HAVE_ASM_CACHECTL_H
16 # include <asm/cachectl.h>
17 #endif
18
19 #ifdef M68K
20 # include "xlat/cacheflush_scope.h"
21 # include "xlat/cacheflush_flags.h"
22
23 SYS_FUNC(cacheflush)
24 {
25         /* addr */
26         printaddr(tcp->u_arg[0]);
27         tprints(", ");
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 RVAL_DECODED;
37 }
38 #endif /* M68K */
39
40 #if defined(BFIN) || defined(CSKY)
41 # include "xlat/cacheflush_flags.h"
42
43 SYS_FUNC(cacheflush)
44 {
45         /* start addr */
46         printaddr(tcp->u_arg[0]);
47         /* length */
48         tprintf(", %lu, ", tcp->u_arg[1]);
49         /* flags */
50         printxval(cacheflush_flags, tcp->u_arg[2], "?CACHE");
51
52         return RVAL_DECODED;
53 }
54 #endif /* BFIN || CSKY */
55
56 #ifdef SH
57 # include "xlat/cacheflush_flags.h"
58
59 SYS_FUNC(cacheflush)
60 {
61         /* addr */
62         printaddr(tcp->u_arg[0]);
63         /* len */
64         tprintf(", %lu, ", tcp->u_arg[1]);
65         /* flags */
66         printflags(cacheflush_flags, tcp->u_arg[2], "CACHEFLUSH_???");
67
68         return RVAL_DECODED;
69 }
70 #endif /* SH */
71
72 #ifdef NIOS2
73 SYS_FUNC(cacheflush)
74 {
75         /* addr */
76         printaddr(tcp->u_arg[0]);
77         /* len */
78         tprintf(", %lu, ", tcp->u_arg[3]);
79         /* scope and flags (cache type) are currently ignored */
80
81         return RVAL_DECODED;
82 }
83 #endif /* NIOS2 */