2 * Copyright 2003-2008, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * François Revol <revol@free.fr>
9 #include <KernelExport.h>
11 #include <arch_platform.h>
12 #include <arch_thread.h>
14 #include <boot/kernel_args.h>
20 /* from arch_040_asm.S */
21 extern void flush_insn_pipeline_040(void);
22 extern void flush_atc_all_040(void);
23 extern void flush_atc_user_040(void);
24 extern void flush_atc_addr_040(addr_t addr
);
35 sync_icache_040(addr_t address
, size_t len
)
40 off
= (unsigned int)address
& (CACHELINE
- 1);
44 p
= (char *)address
- off
;
47 #warning M68K: 040: use CPUSHP on pages when possible for speed.
50 "cpushl %%ic,(%0)\n" \
53 } while ((l
-= CACHELINE
) > 0);
59 sync_dcache_040(addr_t address
, size_t len
)
64 off
= (unsigned int)address
& (CACHELINE
- 1);
68 p
= (char *)address
- off
;
71 #warning M68K: 040: use CPUSHP on pages when possible for speed.
74 "cpushl %%dc,(%0)\n" \
77 } while ((l
-= CACHELINE
) > 0);
82 struct m68k_cpu_ops cpu_ops_040
= {
83 &flush_insn_pipeline_040
,