2 #include <asm/mmu_context.h>
3 #include <asm/cacheflush.h>
6 * Write back the dirty D-caches, but not invalidate them.
8 * START: Virtual Address (U0, P1, or P3)
9 * SIZE: Size of the region.
11 void __weak __flush_wback_region(void *start, int size)
14 unsigned long begin, end;
16 begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
17 end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
18 & ~(L1_CACHE_BYTES-1);
19 for (v = begin; v < end; v+=L1_CACHE_BYTES) {
20 asm volatile("ocbwb %0"
27 * Write back the dirty D-caches and invalidate them.
29 * START: Virtual Address (U0, P1, or P3)
30 * SIZE: Size of the region.
32 void __weak __flush_purge_region(void *start, int size)
35 unsigned long begin, end;
37 begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
38 end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
39 & ~(L1_CACHE_BYTES-1);
40 for (v = begin; v < end; v+=L1_CACHE_BYTES) {
41 asm volatile("ocbp %0"
48 * No write back please
50 void __weak __flush_invalidate_region(void *start, int size)
53 unsigned long begin, end;
55 begin = (unsigned long)start & ~(L1_CACHE_BYTES-1);
56 end = ((unsigned long)start + size + L1_CACHE_BYTES-1)
57 & ~(L1_CACHE_BYTES-1);
58 for (v = begin; v < end; v+=L1_CACHE_BYTES) {
59 asm volatile("ocbi %0"