arm64: virt: ensure visibility of __boot_cpu_mode
authorMark Rutland <mark.rutland@arm.com>
Tue, 9 Jul 2013 14:16:06 +0000 (15:16 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 14 May 2014 11:16:30 +0000 (12:16 +0100)
commit6a23efcb3808db22be5d2625ac928a5ae998a77c
tree1b80dc62a0d0779075e8193faf7a8c70a855856d
parent31cc1d7d724ea7ec31c1d65d3a10e842c0e74b86
arm64: virt: ensure visibility of __boot_cpu_mode

commit 82b2f495fba338d1e3098dde1df54944a9c19751 upstream.

Secondary CPUs write to __boot_cpu_mode with caches disabled, and thus a
cached value of __boot_cpu_mode may be incoherent with that in memory.
This could lead to a failure to detect mismatched boot modes.

This patch adds flushing to ensure that writes by secondaries to
__boot_cpu_mode are made visible before we test against it.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@cs.columbia.edu>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5fb08df3dd1f7b8e83936808b042725a8b067562)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/include/asm/virt.h