commented early_printk patch because of rejects.
[linux-flexiantxendom0-3.2.10.git] / arch / ia64 / sn / kernel / sn2 / cache.c
index f0cce9e..0bd4443 100644 (file)
@@ -8,7 +8,9 @@
  *
  */
 
-#include <asm/pgalloc.h>
+#include <linux/module.h>
+#include <asm/cacheflush.h>
+#include <asm/system.h>
 
 /**
  * sn_flush_all_caches - flush a range of address from all caches (incl. L4)
@@ -24,5 +26,12 @@ void
 sn_flush_all_caches(long flush_addr, long bytes)
 {
        flush_icache_range(flush_addr, flush_addr+bytes);
+       /*
+        * The last call may have returned before the caches
+        * were actually flushed, so we call it again to make
+        * sure.
+        */
+       flush_icache_range(flush_addr, flush_addr+bytes);
        mb();
 }
+EXPORT_SYMBOL(sn_flush_all_caches);