Commit 0953fb26 authored by Mark Rutland's avatar Mark Rutland
Browse files

irq: remove handle_domain_{irq,nmi}()



Now that entry code handles IRQ entry (including setting the IRQ regs)
before calling irqchip code, irqchip code can safely call
generic_handle_domain_irq(), and there's no functional reason for it to
call handle_domain_irq().

Let's cement this split of responsibility and remove handle_domain_irq()
entirely, updating irqchip drivers to call generic_handle_domain_irq().

For consistency, handle_domain_nmi() is similarly removed and replaced
with a generic_handle_domain_nmi() function which also does not perform
any entry logic.

Previously handle_domain_{irq,nmi}() had a WARN_ON() which would fire
when they were called in an inappropriate context. So that we can
identify similar issues going forward, similar WARN_ON_ONCE() logic is
added to the generic_handle_*() functions, and comments are updated for
clarity and consistency.

Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
parent 5aecc243
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -67,9 +67,6 @@ variety of methods:
  deprecated
- generic_handle_domain_irq() handles an interrupt described by a
  domain and a hwirq number
- handle_domain_irq() does the same thing for root interrupt
  controllers and deals with the set_irq_reg()/irq_enter() sequences
  that most architecture requires

Note that irq domain lookups must happen in contexts that are
compatible with a RCU read-side critical section.
+0 −1
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ config ARM
	select GENERIC_PCI_IOMAP
	select GENERIC_SCHED_CLOCK
	select GENERIC_SMP_IDLE_THREAD
	select HANDLE_DOMAIN_IRQ
	select HARDIRQS_SW_RESEND
	select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT
	select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ static void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
		if (nivector == 0xffff)
			break;

		handle_domain_irq(domain, nivector, regs);
		generic_handle_domain_irq(domain, nivector);
	} while (1);
}

+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs)
			while (stat) {
				handled = 1;
				irqofs = fls(stat) - 1;
				handle_domain_irq(domain, irqofs + i * 32, regs);
				generic_handle_domain_irq(domain, irqofs + i * 32);
				stat &= ~(1 << irqofs);
			}
		}
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ asmlinkage void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs)
		}
irq:
		if (irqnr)
			handle_domain_irq(domain, irqnr, regs);
			generic_handle_domain_irq(domain, irqnr);
		else
			break;
	} while (irqnr);
Loading