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-2017 The strace developers.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 #ifdef HAVE_ASM_CACHECTL_H
36 # include <asm/cachectl.h>
40 # include "xlat/cacheflush_scope.h"
42 static const struct xlat cacheflush_flags[] = {
43 #ifdef FLUSH_CACHE_BOTH
44 XLAT(FLUSH_CACHE_BOTH),
46 #ifdef FLUSH_CACHE_DATA
47 XLAT(FLUSH_CACHE_DATA),
49 #ifdef FLUSH_CACHE_INSN
50 XLAT(FLUSH_CACHE_INSN),
58 printaddr(tcp->u_arg[0]);
61 printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
64 printflags(cacheflush_flags, tcp->u_arg[2], "FLUSH_CACHE_???");
66 tprintf(", %lu", tcp->u_arg[3]);
73 static const struct xlat cacheflush_flags[] = {
83 printaddr(tcp->u_arg[0]);
85 tprintf(", %lu, ", tcp->u_arg[1]);
87 printxval(cacheflush_flags, tcp->u_arg[2], "?CACHE");
94 static const struct xlat cacheflush_flags[] = {
95 #ifdef CACHEFLUSH_D_INVAL
96 XLAT(CACHEFLUSH_D_INVAL),
98 #ifdef CACHEFLUSH_D_WB
99 XLAT(CACHEFLUSH_D_WB),
101 #ifdef CACHEFLUSH_D_PURGE
102 XLAT(CACHEFLUSH_D_PURGE),
113 printaddr(tcp->u_arg[0]);
115 tprintf(", %lu, ", tcp->u_arg[1]);
117 printflags(cacheflush_flags, tcp->u_arg[2], "CACHEFLUSH_???");
127 printaddr(tcp->u_arg[0]);
129 tprintf(", %lu, ", tcp->u_arg[3]);
130 /* scope and flags (cache type) are currently ignored */