Skip to content

Commit

Permalink
sh: Kill off broken PHYSADDR() usage in sh4_flush_dcache_page().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Sep 9, 2009
1 parent 654d364 commit 31c9efd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sh/mm/cache-sh4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 31c9efd

Please sign in to comment.