summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/cacheflush.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2017-10-23 19:11:16 +0300
committerChristoffer Dall <christoffer.dall@linaro.org>2018-01-08 17:20:43 +0300
commit4fee94736603cd6fd83c1ea1ee0388d1d2dbe11b (patch)
tree733ee370f17b3840a30d9f11e162eb4a4786cf69 /arch/arm64/include/asm/cacheflush.h
parenta15f693935a9f1fec8241cafaca27be4483d4464 (diff)
downloadlinux-4fee94736603cd6fd83c1ea1ee0388d1d2dbe11b.tar.xz
arm64: KVM: Add invalidate_icache_range helper
We currently tightly couple dcache clean with icache invalidation, but KVM could do without the initial flush to PoU, as we've already flushed things to PoC. Let's introduce invalidate_icache_range which is limited to invalidating the icache from the linear mapping (and thus has none of the userspace fault handling complexity), and wire it in KVM instead of flush_icache_range. Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm64/include/asm/cacheflush.h')
-rw-r--r--arch/arm64/include/asm/cacheflush.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h
index 955130762a3c..bef9f418f089 100644
--- a/arch/arm64/include/asm/cacheflush.h
+++ b/arch/arm64/include/asm/cacheflush.h
@@ -52,6 +52,12 @@
* - start - virtual start address
* - end - virtual end address
*
+ * invalidate_icache_range(start, end)
+ *
+ * Invalidate the I-cache in the region described by start, end.
+ * - start - virtual start address
+ * - end - virtual end address
+ *
* __flush_cache_user_range(start, end)
*
* Ensure coherency between the I-cache and the D-cache in the
@@ -66,6 +72,7 @@
* - size - region size
*/
extern void flush_icache_range(unsigned long start, unsigned long end);
+extern int invalidate_icache_range(unsigned long start, unsigned long end);
extern void __flush_dcache_area(void *addr, size_t len);
extern void __inval_dcache_area(void *addr, size_t len);
extern void __clean_dcache_area_poc(void *addr, size_t len);