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