19 #include <asm/pgtable.h>
20 #include <asm/mmu_context.h>
22 #include <asm/cacheflush.h>
29 #define MAX_ICACHE_PAGES 32
31 static void __flush_cache_one(
unsigned long addr,
unsigned long phys,
32 unsigned long exec_offset);
40 static void sh4_flush_icache_range(
void *args)
42 struct flusher_data *
data = args;
68 unsigned long icacheaddr;
78 for (i = 0; i <
cpu_data->icache.ways; i++) {
79 for (j = 0; j <
n; j++)
81 icacheaddr +=
cpu_data->icache.way_incr;
89 static inline void flush_cache_one(
unsigned long start,
unsigned long phys)
91 unsigned long flags, exec_offset = 0;
102 __flush_cache_one(start, phys, exec_offset);
110 static void sh4_flush_dcache_page(
void *
arg)
117 if (mapping && !mapping_mapped(mapping))
151 unsigned long addr, end_addr, entry_offset;
172 static void sh4_flush_cache_all(
void *
unused)
188 static void sh4_flush_cache_mm(
void *arg)
204 static void sh4_flush_cache_page(
void *args)
206 struct flusher_data *data = args;
210 int map_coherent = 0;
250 address = (
unsigned long)vaddr;
276 static void sh4_flush_cache_range(
void *args)
278 struct flusher_data *data = args;
316 static void __flush_cache_one(
unsigned long addr,
unsigned long phys,
317 unsigned long exec_offset)
320 unsigned long base_addr =
addr;
322 unsigned long way_incr;
323 unsigned long a,
ea,
p;
324 unsigned long temp_pc;
328 way_count = dcache->
ways;
329 way_incr = dcache->way_incr;
340 asm volatile(
"mov.l 1f, %0\n\t"
346 "2:\n" :
"=&r" (temp_pc) :
"r" (exec_offset));
358 *(
volatile unsigned long *)a = p;
364 *(
volatile unsigned long *)(a+32) =
p;
369 base_addr += way_incr;
370 }
while (--way_count != 0);
380 printk(
"PVR=%08x CVR=%08x PRR=%08x\n",