arch/tile: avoid a simulator warning during bootup
authorChris Metcalf <cmetcalf@tilera.com>
Mon, 28 Feb 2011 20:01:53 +0000 (15:01 -0500)
committerChris Metcalf <cmetcalf@tilera.com>
Tue, 1 Mar 2011 21:20:29 +0000 (16:20 -0500)
As the added comment says, we can sometimes see a coherence warning
from our simulator if the "swapper_pgprot" variable on the boot cpu
has not been evicted from cache by the time the other cpus come up.
Force it to be evicted so we never see the warning.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/mm/init.c

index e34597e512dffa3dac797a03c82f66ff1effe9c9..9a62479aafb4e7751b52e88baf4561e92cdeae51 100644 (file)
@@ -653,6 +653,17 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
        memcpy(pgd_base, pgtables, sizeof(pgtables));
        __install_page_table(pgd_base, __get_cpu_var(current_asid),
                             swapper_pgprot);
+
+       /*
+        * We just read swapper_pgprot and thus brought it into the cache,
+        * with its new home & caching mode.  When we start the other CPUs,
+        * they're going to reference swapper_pgprot via their initial fake
+        * VA-is-PA mappings, which cache everything locally.  At that
+        * time, if it's in our cache with a conflicting home, the
+        * simulator's coherence checker will complain.  So, flush it out
+        * of our cache; we're not going to ever use it again anyway.
+        */
+       __insn_finv(&swapper_pgprot);
 }
 
 /*