From 6e4154d4c2dd3d7e61d19ddd2527322ce34c2f5a Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 8 Sep 2009 16:21:00 +0900 Subject: sh: Use more aggressive dcache purging in kmap teardown. This fixes up a number of outstanding issues observed with old mappings on the same colour hanging around. This requires some more optimal handling, but is a safe fallback until all of the corner cases have been handled. Signed-off-by: Paul Mundt --- arch/sh/mm/kmap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/sh/mm/kmap.c') diff --git a/arch/sh/mm/kmap.c b/arch/sh/mm/kmap.c index c52cd8c40a64..16e01b5fed04 100644 --- a/arch/sh/mm/kmap.c +++ b/arch/sh/mm/kmap.c @@ -54,6 +54,9 @@ void kunmap_coherent(void *kvaddr) unsigned long vaddr = (unsigned long)kvaddr & PAGE_MASK; enum fixed_addresses idx = __virt_to_fix(vaddr); + /* XXX.. Kill this later, here for sanity at the moment.. */ + __flush_purge_region((void *)vaddr, PAGE_SIZE); + pte_clear(&init_mm, vaddr, kmap_coherent_pte - idx); local_flush_tlb_one(get_asid(), vaddr); } -- cgit v1.2.2