]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/setup_64.c
Merge tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[karo-tx-linux.git] / arch / powerpc / kernel / setup_64.c
index f997154dfc41bb9dc12d514890d6c425f197048b..0d4dcaeaafcb4d0b8396f06ba8cc93e4a30e5d0b 100644 (file)
@@ -230,8 +230,8 @@ static void cpu_ready_for_interrupts(void)
         * If we are not in hypervisor mode the job is done once for
         * the whole partition in configure_exceptions().
         */
-       if (early_cpu_has_feature(CPU_FTR_HVMODE) &&
-           early_cpu_has_feature(CPU_FTR_ARCH_207S)) {
+       if (cpu_has_feature(CPU_FTR_HVMODE) &&
+           cpu_has_feature(CPU_FTR_ARCH_207S)) {
                unsigned long lpcr = mfspr(SPRN_LPCR);
                mtspr(SPRN_LPCR, lpcr | LPCR_AIL_3);
        }
@@ -637,6 +637,11 @@ void __init emergency_stack_init(void)
                paca[i].emergency_sp = (void *)ti + THREAD_SIZE;
 
 #ifdef CONFIG_PPC_BOOK3S_64
+               /* emergency stack for NMI exception handling. */
+               ti = __va(memblock_alloc_base(THREAD_SIZE, THREAD_SIZE, limit));
+               klp_init_thread_info(ti);
+               paca[i].nmi_emergency_sp = (void *)ti + THREAD_SIZE;
+
                /* emergency stack for machine check exception handling. */
                ti = __va(memblock_alloc_base(THREAD_SIZE, THREAD_SIZE, limit));
                klp_init_thread_info(ti);