patch-2.4.23 linux-2.4.23/arch/ia64/sn/kernel/sn2/cache.c

Next file: linux-2.4.23/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
Previous file: linux-2.4.23/arch/ia64/sn/kernel/sn2/Makefile
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/arch/ia64/sn/kernel/sn2/cache.c linux-2.4.23/arch/ia64/sn/kernel/sn2/cache.c
@@ -23,6 +23,18 @@
 void
 sn_flush_all_caches(long flush_addr, long bytes)
 {
+	/*
+	 * The following double call to flush_icache_range has
+	 * the following effect which is required:
+	 *
+	 * The first flush_icache_range ensures the fc() address
+	 * is visible on the FSB.  The NUMA controller however has
+	 * not necessarily forwarded the fc() request to all other
+	 * NUMA controllers. The second call will stall
+	 * at the associated fc() instruction until the first
+	 * has been forwarded to all other NUMA controllers.
+	 */
+	flush_icache_range(flush_addr, flush_addr+bytes);
 	flush_icache_range(flush_addr, flush_addr+bytes);
 	mb();
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)