aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/cache-sh4.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-09-09 14:10:28 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-09-09 14:10:28 +0900
commit31c9efde786252112cc3d04a1ed3513b6ec63a7b (patch)
tree5f59621974882f1cab719fff3b9db0764dbfef19 /arch/sh/mm/cache-sh4.c
parent654d364e26c797e8a5f9e2a1393607e6ca0106eb (diff)
downloadlinux-31c9efde786252112cc3d04a1ed3513b6ec63a7b.tar.gz
sh: Kill off broken PHYSADDR() usage in sh4_flush_dcache_page().
PHYSADDR() runs in to issues in 32-bit mode when we do not have the legacy P1/P2 areas mapped, as such, we need to use page_to_phys() directly, which also happens to do the right thing in legacy 29-bit mode. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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 a5c339bca8aaff..f0999606686f2d 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)
else
#endif
{
- unsigned long phys = PHYSADDR(page_address(page));
+ unsigned long phys = page_to_phys(page);
unsigned long addr = CACHE_OC_ADDRESS_ARRAY;
int i, n;
/* Loop all the D-cache */
- n = boot_cpu_data.dcache.n_aliases;
+ n = boot_cpu_data.dcache.way_incr >> 12;
for (i = 0; i < n; i++, addr += 4096)
flush_cache_4096(addr, phys);
}