revert between 56095 -> 55830 in arch
[AROS.git] / arch / m68k-mac / exec / cache.c
blob483f318f7396d9ca96a46526f2155ae692a1b211
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Flush Caches
6 Lang: english
7 */
9 #include <errno.h>
10 #if 0
11 #include <asm/cachectl.h>
12 /* GNU libc 2 has this included in <sys/syscall.h>, but libc5 doesn't :-( */
13 #include <asm/unistd.h>
14 static inline _syscall4(int,cacheflush,unsigned long,addr,int,scope,int,cache,unsigned long,len)
15 #endif
17 #include <proto/exec.h>
18 #include <exec/execbase.h>
20 /* See rom/exec/cacheclear*.c for documentation */
22 AROS_LH3(void, CacheClearE,
23 AROS_LHA(APTR, address, A0),
24 AROS_LHA(ULONG, length, D0),
25 AROS_LHA(ULONG, caches, D1),
26 struct ExecBase *, SysBase, 107, Exec)
28 AROS_LIBFUNC_INIT
29 #if 0
30 ULONG scope, cpucache = 0;
32 if (caches & CACRF_ClearD)
33 cpucache |= FLUSH_CACHE_DATA;
35 if (caches & CACRF_ClearI)
36 cpucache |= FLUSH_CACHE_INSN;
38 if (length == (ULONG)-1)
39 scope = FLUSH_SCOPE_ALL;
40 else
41 scope = FLUSH_SCOPE_LINE;
43 (void) cacheflush((unsigned long)address, scope, cpucache, length);
44 #endif
45 AROS_LIBFUNC_EXIT
46 } /* CacheClearE */
49 AROS_LH0(void, CacheClearU,
50 struct ExecBase *, SysBase, 106, Exec)
52 AROS_LIBFUNC_INIT
53 #if 0
54 (void) cacheflush(0, FLUSH_SCOPE_ALL, FLUSH_CACHE_BOTH, 0);
55 #endif
56 AROS_LIBFUNC_EXIT
57 } /* CacheClearU */