arm64: fix kernel stack overflow in kdump capture kernel
[linux-2.6-microblaze.git] / arch / arm64 / kernel / irq.c
index fdd9cb2..e8daa7a 100644 (file)
@@ -77,6 +77,15 @@ void __init init_IRQ(void)
        irqchip_init();
        if (!handle_arch_irq)
                panic("No interrupt controller found.");
+
+       if (system_uses_irq_prio_masking()) {
+               /*
+                * Now that we have a stack for our IRQ handler, set
+                * the PMR/PSR pair to a consistent state.
+                */
+               WARN_ON(read_sysreg(daif) & PSR_A_BIT);
+               local_daif_restore(DAIF_PROCCTX_NOIRQ);
+       }
 }
 
 /*