aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/cache-sh4.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/cache-sh4.c')
-rw-r--r--arch/sh/mm/cache-sh4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index a5c339bca8aa..f0999606686f 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -123,12 +123,12 @@ static void sh4_flush_dcache_page(void *arg)
123 else 123 else
124#endif 124#endif
125 { 125 {
126 unsigned long phys = PHYSADDR(page_address(page)); 126 unsigned long phys = page_to_phys(page);
127 unsigned long addr = CACHE_OC_ADDRESS_ARRAY; 127 unsigned long addr = CACHE_OC_ADDRESS_ARRAY;
128 int i, n; 128 int i, n;
129 129
130 /* Loop all the D-cache */ 130 /* Loop all the D-cache */
131 n = boot_cpu_data.dcache.n_aliases; 131 n = boot_cpu_data.dcache.way_incr >> 12;
132 for (i = 0; i < n; i++, addr += 4096) 132 for (i = 0; i < n; i++, addr += 4096)
133 flush_cache_4096(addr, phys); 133 flush_cache_4096(addr, phys);
134 } 134 }