aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powernv/setup.c')
-rw-r--r--arch/powerpc/platforms/powernv/setup.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 4ddb339700b9..e239dcfa224c 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -31,6 +31,7 @@
31#include <asm/xics.h> 31#include <asm/xics.h>
32#include <asm/rtas.h> 32#include <asm/rtas.h>
33#include <asm/opal.h> 33#include <asm/opal.h>
34#include <asm/kexec.h>
34 35
35#include "powernv.h" 36#include "powernv.h"
36 37
@@ -153,6 +154,16 @@ static void pnv_shutdown(void)
153static void pnv_kexec_cpu_down(int crash_shutdown, int secondary) 154static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
154{ 155{
155 xics_kexec_teardown_cpu(secondary); 156 xics_kexec_teardown_cpu(secondary);
157
158 /* Return secondary CPUs to firmware on OPAL v3 */
159 if (firmware_has_feature(FW_FEATURE_OPALv3) && secondary) {
160 mb();
161 get_paca()->kexec_state = KEXEC_STATE_REAL_MODE;
162 mb();
163
164 /* Return the CPU to OPAL */
165 opal_return_cpu();
166 }
156} 167}
157#endif /* CONFIG_KEXEC */ 168#endif /* CONFIG_KEXEC */
158 169