aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/virt.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-08-12 09:43:45 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-08-12 09:43:45 +0200
commitcada23f308e3869ceb5c75f164d249448dfaec07 (patch)
tree97c7aebcad0eb2a93a7519251a01f5be9255ee75 /arch/arm/include/asm/virt.h
parente769ece3b129698d2b09811a6f6d304e4eaa8c29 (diff)
parent6c8c0c4dc0e98ee2191211d66e9f876e95787073 (diff)
Merge branch 'kvm-arm64/fixes-3.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into kvm-master
Diffstat (limited to 'arch/arm/include/asm/virt.h')
-rw-r--r--arch/arm/include/asm/virt.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h
index 50af92bac73..4371f45c578 100644
--- a/arch/arm/include/asm/virt.h
+++ b/arch/arm/include/asm/virt.h
@@ -29,6 +29,7 @@
#define BOOT_CPU_MODE_MISMATCH PSR_N_BIT
#ifndef __ASSEMBLY__
+#include <asm/cacheflush.h>
#ifdef CONFIG_ARM_VIRT_EXT
/*
@@ -41,10 +42,21 @@
*/
extern int __boot_cpu_mode;
+static inline void sync_boot_mode(void)
+{
+ /*
+ * As secondaries write to __boot_cpu_mode with caches disabled, we
+ * must flush the corresponding cache entries to ensure the visibility
+ * of their writes.
+ */
+ sync_cache_r(&__boot_cpu_mode);
+}
+
void __hyp_set_vectors(unsigned long phys_vector_base);
unsigned long __hyp_get_vectors(void);
#else
#define __boot_cpu_mode (SVC_MODE)
+#define sync_boot_mode()
#endif
#ifndef ZIMAGE