static inline void emergency_stack_init(void) { };
 #endif
 
-#ifdef CONFIG_PPC64
-void record_spr_defaults(void);
-#else
-static inline void record_spr_defaults(void) { };
-#endif
-
 #ifdef CONFIG_PPC64
 u64 ppc64_bolted_size(void);
+
+/* Default SPR values from firmware/kexec */
+extern unsigned long spr_default_dscr;
 #endif
 
 /*
 
        get_paca()->kernel_msr = MSR_KERNEL;
 }
 
+unsigned long spr_default_dscr = 0;
+
+void __init record_spr_defaults(void)
+{
+       if (early_cpu_has_feature(CPU_FTR_DSCR))
+               spr_default_dscr = mfspr(SPRN_DSCR);
+}
+
 /*
  * Early initialization entry point. This is called by head.S
  * with MMU translation disabled. We rely on the "feature" of
 
 #include <asm/firmware.h>
 
 #include "cacheinfo.h"
+#include "setup.h"
 
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
 
 static void sysfs_create_dscr_default(void)
 {
-       int err = 0;
-       if (cpu_has_feature(CPU_FTR_DSCR))
-               err = device_create_file(cpu_subsys.dev_root, &dev_attr_dscr_default);
-}
-
-void __init record_spr_defaults(void)
-{
-       int cpu;
-
        if (cpu_has_feature(CPU_FTR_DSCR)) {
-               dscr_default = mfspr(SPRN_DSCR);
-               for (cpu = 0; cpu < nr_cpu_ids; cpu++)
+               int err = 0;
+               int cpu;
+
+               dscr_default = spr_default_dscr;
+               for_each_possible_cpu(cpu)
                        paca_ptrs[cpu]->dscr_default = dscr_default;
+
+               err = device_create_file(cpu_subsys.dev_root, &dev_attr_dscr_default);
        }
 }
+
 #endif /* CONFIG_PPC64 */
 
 #ifdef HAS_PPC_PMC_PA6T