diff options
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 1697a25ebe91..0886ae6dd5be 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -122,6 +122,8 @@ __secondary_hold: | |||
122 | #endif | 122 | #endif |
123 | /* Grab our physical cpu number */ | 123 | /* Grab our physical cpu number */ |
124 | mr r24,r3 | 124 | mr r24,r3 |
125 | /* stash r4 for book3e */ | ||
126 | mr r25,r4 | ||
125 | 127 | ||
126 | /* Tell the master cpu we're here */ | 128 | /* Tell the master cpu we're here */ |
127 | /* Relocation is off & we are located at an address less */ | 129 | /* Relocation is off & we are located at an address less */ |
@@ -129,16 +131,31 @@ __secondary_hold: | |||
129 | std r24,__secondary_hold_acknowledge-_stext(0) | 131 | std r24,__secondary_hold_acknowledge-_stext(0) |
130 | sync | 132 | sync |
131 | 133 | ||
134 | li r26,0 | ||
135 | #ifdef CONFIG_PPC_BOOK3E | ||
136 | tovirt(r26,r26) | ||
137 | #endif | ||
132 | /* All secondary cpus wait here until told to start. */ | 138 | /* All secondary cpus wait here until told to start. */ |
133 | 100: ld r4,__secondary_hold_spinloop-_stext(0) | 139 | 100: ld r4,__secondary_hold_spinloop-_stext(r26) |
134 | cmpdi 0,r4,0 | 140 | cmpdi 0,r4,0 |
135 | beq 100b | 141 | beq 100b |
136 | 142 | ||
137 | #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) | 143 | #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) |
144 | #ifdef CONFIG_PPC_BOOK3E | ||
145 | tovirt(r4,r4) | ||
146 | #endif | ||
138 | ld r4,0(r4) /* deref function descriptor */ | 147 | ld r4,0(r4) /* deref function descriptor */ |
139 | mtctr r4 | 148 | mtctr r4 |
140 | mr r3,r24 | 149 | mr r3,r24 |
150 | /* | ||
151 | * it may be the case that other platforms have r4 right to | ||
152 | * begin with, this gives us some safety in case it is not | ||
153 | */ | ||
154 | #ifdef CONFIG_PPC_BOOK3E | ||
155 | mr r4,r25 | ||
156 | #else | ||
141 | li r4,0 | 157 | li r4,0 |
158 | #endif | ||
142 | /* Make sure that patched code is visible */ | 159 | /* Make sure that patched code is visible */ |
143 | isync | 160 | isync |
144 | bctr | 161 | bctr |