powerpc: Put exception configuration in a common place
[cascardo/linux.git] / arch / powerpc / platforms / powernv / opal.c
index da40d6b..8b4fc68 100644 (file)
@@ -57,7 +57,7 @@ static struct atomic_notifier_head opal_msg_notifier_head[OPAL_MSG_TYPE_MAX];
 static uint32_t opal_heartbeat;
 static struct task_struct *kopald_tsk;
 
-static void opal_reinit_cores(void)
+void opal_configure_cores(void)
 {
        /* Do the actual re-init, This will clobber all FPRs, VRs, etc...
         *
@@ -70,6 +70,10 @@ static void opal_reinit_cores(void)
 #else
        opal_reinit_cpus(OPAL_REINIT_CPUS_HILE_LE);
 #endif
+
+       /* Restore some bits */
+       if (cur_cpu_spec->cpu_restore)
+               cur_cpu_spec->cpu_restore();
 }
 
 int __init early_init_dt_scan_opal(unsigned long node,
@@ -106,13 +110,6 @@ int __init early_init_dt_scan_opal(unsigned long node,
                panic("OPAL != V3 detected, no longer supported.\n");
        }
 
-       /* Reinit all cores with the right endian */
-       opal_reinit_cores();
-
-       /* Restore some bits */
-       if (cur_cpu_spec->cpu_restore)
-               cur_cpu_spec->cpu_restore();
-
        return 1;
 }