]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm64: Add missing synchronization barrier in invalidate_cache
authorJulien Grall <julien.grall@arm.com>
Wed, 21 Sep 2016 14:52:12 +0000 (15:52 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 21 Sep 2016 18:21:23 +0000 (11:21 -0700)
The invalidation of the instructions cache requires barriers to ensure
the completion of the invalidation before continuing (see B2.3.4 in ARM
DDI 0487A.j).

This was overlooked in commit fb9d877 "xen/arm64: Add an helper to
invalidate all instruction caches".

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/arm64/page.h

index 79ef7bddb5a9581fb7faaccd7a904d80090825cb..23d778154d280937ae85a1d882bb434fc42212cd 100644 (file)
@@ -33,6 +33,8 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
 static inline void invalidate_icache(void)
 {
     asm volatile ("ic ialluis");
+    dsb(ish);               /* Ensure completion of the flush I-cache */
+    isb();
 }
 
 /*