]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
xen/arm: Clean and invalidate dcache for boot pagetables
authorOleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
Tue, 11 Mar 2014 13:19:45 +0000 (15:19 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 14 Mar 2014 14:56:22 +0000 (14:56 +0000)
We need to invalidate dcache too after zeroing boot pagetables
to avoid unpredictable behavior which may take place after
non-boot CPUs enable their caches.

So, replace clean_xen_dcache() macro by a clean_and_invalidate_xen_dcache()
for boot pagetables.

Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/mm.c

index 544aa87d74417c8e5427c42f7ec91ce5b5492f21..305879fd642808af255bcb9c8ed51b6d5047af8f 100644 (file)
@@ -480,13 +480,13 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
     /* Clear the copy of the boot pagetables. Each secondary CPU
      * rebuilds these itself (see head.S) */
     memset(boot_pgtable, 0x0, PAGE_SIZE);
-    clean_xen_dcache(boot_pgtable);
+    clean_and_invalidate_xen_dcache(boot_pgtable);
 #ifdef CONFIG_ARM_64
     memset(boot_first, 0x0, PAGE_SIZE);
-    clean_xen_dcache(boot_first);
+    clean_and_invalidate_xen_dcache(boot_first);
 #endif
     memset(boot_second, 0x0, PAGE_SIZE);
-    clean_xen_dcache(boot_second);
+    clean_and_invalidate_xen_dcache(boot_second);
 
     /* Break up the Xen mapping into 4k pages and protect them separately. */
     for ( i = 0; i < LPAE_ENTRIES; i++ )