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.
10 * SPDX-License-Identifier: LGPL-2.1-or-later
15 #ifdef HAVE_ASM_CACHECTL_H
16 # include <asm/cachectl.h>
20 # include "xlat/cacheflush_scope.h"
22 static const struct xlat cacheflush_flags[] = {
23 # ifdef FLUSH_CACHE_BOTH
24 XLAT(FLUSH_CACHE_BOTH),
26 # ifdef FLUSH_CACHE_DATA
27 XLAT(FLUSH_CACHE_DATA),
29 # ifdef FLUSH_CACHE_INSN
30 XLAT(FLUSH_CACHE_INSN),
38 printaddr(tcp->u_arg[0]);
41 printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
44 printflags(cacheflush_flags, tcp->u_arg[2], "FLUSH_CACHE_???");
46 tprintf(", %lu", tcp->u_arg[3]);
52 #if defined(BFIN) || defined(CSKY)
53 static const struct xlat cacheflush_flags[] = {
63 printaddr(tcp->u_arg[0]);
65 tprintf(", %lu, ", tcp->u_arg[1]);
67 printxval(cacheflush_flags, tcp->u_arg[2], "?CACHE");
71 #endif /* BFIN || CSKY */
74 static const struct xlat cacheflush_flags[] = {
75 # ifdef CACHEFLUSH_D_INVAL
76 XLAT(CACHEFLUSH_D_INVAL),
78 # ifdef CACHEFLUSH_D_WB
79 XLAT(CACHEFLUSH_D_WB),
81 # ifdef CACHEFLUSH_D_PURGE
82 XLAT(CACHEFLUSH_D_PURGE),
93 printaddr(tcp->u_arg[0]);
95 tprintf(", %lu, ", tcp->u_arg[1]);
97 printflags(cacheflush_flags, tcp->u_arg[2], "CACHEFLUSH_???");
107 printaddr(tcp->u_arg[0]);
109 tprintf(", %lu, ", tcp->u_arg[3]);
110 /* scope and flags (cache type) are currently ignored */