Revert "arm64: virt: ensure visibility of __boot_cpu_mode"
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 28 Mar 2014 09:49:13 +0000 (09:49 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 21 May 2014 18:06:43 +0000 (19:06 +0100)
This reverts commit 82b2f495fba338d1e3098dde1df54944a9c19751. The
__boot_cpu_mode variable is flushed in head.S after being written,
therefore the additional cache flushing is no longer required.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 0a997ecc08e0b551119c56d52a591d9e5b38a7cd)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/include/asm/virt.h

index 26e310c5434446c7bfc0a9a3f9b443139ffa3368..439827271e3d5bfada26390c9a226bbf6ec763e5 100644 (file)
@@ -21,7 +21,6 @@
 #define BOOT_CPU_MODE_EL2      (0x0e12b007)
 
 #ifndef __ASSEMBLY__
-#include <asm/cacheflush.h>
 
 /*
  * __boot_cpu_mode records what mode CPUs were booted in.
@@ -37,20 +36,9 @@ extern u32 __boot_cpu_mode[2];
 void __hyp_set_vectors(phys_addr_t phys_vector_base);
 phys_addr_t __hyp_get_vectors(void);
 
-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.
-        */
-       __flush_dcache_area(__boot_cpu_mode, sizeof(__boot_cpu_mode));
-}
-
 /* Reports the availability of HYP mode */
 static inline bool is_hyp_mode_available(void)
 {
-       sync_boot_mode();
        return (__boot_cpu_mode[0] == BOOT_CPU_MODE_EL2 &&
                __boot_cpu_mode[1] == BOOT_CPU_MODE_EL2);
 }
@@ -58,7 +46,6 @@ static inline bool is_hyp_mode_available(void)
 /* Check if the bootloader has booted CPUs in different modes */
 static inline bool is_hyp_mode_mismatched(void)
 {
-       sync_boot_mode();
        return __boot_cpu_mode[0] != __boot_cpu_mode[1];
 }