diff mbox

cache coherency problem on CF

Message ID 20100618.110629.68564635.saito@densan.co.jp
State Superseded
Delegated to: Paul Mundt
Headers show

Commit Message

??????? June 18, 2010, 2:06 a.m. UTC
None
diff mbox

Patch

--- arch/sh/mm/cache-sh4.c.org	2010-05-17 06:17:36.000000000 +0900
+++ arch/sh/mm/cache-sh4.c	2010-06-17 19:00:55.000000000 +0900
@@ -364,16 +364,21 @@  static void __flush_cache_one(unsigned l
 			a += 64;
 			p += 64;
 		} while (a < ea);
 
 		base_addr += way_incr;
 	} while (--way_count != 0);
 }
 
+static void sh4_flush_icache_page(void *page)
+{
+	 __flush_purge_region(page_address(page), PAGE_SIZE);
+}
+
 extern void __weak sh4__flush_region_init(void);
 
 /*
  * SH-4 has virtually indexed and physically tagged cache.
  */
 void __init sh4_cache_init(void)
 {
 	printk("PVR=%08x CVR=%08x PRR=%08x\n",
@@ -383,11 +388,12 @@  void __init sh4_cache_init(void)
 
 	local_flush_icache_range	= sh4_flush_icache_range;
 	local_flush_dcache_page		= sh4_flush_dcache_page;
 	local_flush_cache_all		= sh4_flush_cache_all;
 	local_flush_cache_mm		= sh4_flush_cache_mm;
 	local_flush_cache_dup_mm	= sh4_flush_cache_mm;
 	local_flush_cache_page		= sh4_flush_cache_page;
 	local_flush_cache_range		= sh4_flush_cache_range;
+	local_flush_icache_page		= sh4_flush_icache_page;
 
 	sh4__flush_region_init();
 }