aboutsummaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-gic-v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip/irq-gic-v3.c')
-rw-r--r--drivers/irqchip/irq-gic-v3.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 39232014d200..9ca08aa9e3ba 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -343,7 +343,7 @@ static u64 gic_mpidr_to_affinity(unsigned long mpidr)
}
#ifdef CONFIG_USE_ICC_SYSREGS_FOR_IRQFLAGS
-static bool gic_handle_nmi(struct pt_regs *regs)
+static bool __maybe_unused gic_handle_nmi(struct pt_regs *regs)
{
u64 irqnr;
struct pt_regs *old_regs;
@@ -393,12 +393,37 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs
{
u32 irqnr;
+#if 1
+ local_irq_disable();
+
if (gic_handle_nmi(regs))
return;
+#endif
do {
irqnr = gic_read_iar();
+#if 0
+ printk_ratelimited(KERN_INFO "irqnr %d\n", irqnr);
+
+ if (unlikely(SMP_IPI_NMI_MASK & (1 << irqnr))) {
+ struct pt_regs *old_regs;
+
+ old_regs = set_irq_regs(regs);
+ nmi_enter();
+
+ gic_write_eoir(irqnr);
+ if (static_key_true(&supports_deactivate))
+ gic_write_dir(irqnr);
+
+ nmi_cpu_backtrace(regs);
+
+ nmi_exit();
+ set_irq_regs(old_regs);
+ continue;
+ }
+#endif
+
if (likely(irqnr > 15 && irqnr < 1020) || irqnr >= 8192) {
int err;