Patchwork [14/15] powerpc: Perform an isync to synchronize CPUs coming out of secondary_hold

login
register
mail settings
Submitter Benjamin Herrenschmidt
Date April 5, 2011, 6:14 a.m.
Message ID <1301984051-18413-15-git-send-email-benh@kernel.crashing.org>
Download mbox | patch
Permalink /patch/89783/
State Accepted, archived
Commit dd797738643cd3c2dd9cdff7e4c3a04d318ab23a
Headers show

Comments

Benjamin Herrenschmidt - April 5, 2011, 6:14 a.m.
We need to do that to guarantee they see any code change done by
dynamic patching during boot.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/head_64.S |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 370afd4..2505f78 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -147,6 +147,8 @@  __secondary_hold:
 	mtctr	r4
 	mr	r3,r24
 	li	r4,0
+	/* Make sure that patched code is visible */
+	isync
 	bctr
 #else
 	BUG_OPCODE