Skip to content

Commit 0953fb2

Browse files
committed
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: Mark Rutland <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Cc: Thomas Gleixner <[email protected]>
1 parent 5aecc24 commit 0953fb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+80
-141
lines changed

Documentation/core-api/irq/irq-domain.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ variety of methods:
6767
deprecated
6868
- generic_handle_domain_irq() handles an interrupt described by a
6969
domain and a hwirq number
70-
- handle_domain_irq() does the same thing for root interrupt
71-
controllers and deals with the set_irq_reg()/irq_enter() sequences
72-
that most architecture requires
7370

7471
Note that irq domain lookups must happen in contexts that are
7572
compatible with a RCU read-side critical section.

arch/arm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ config ARM
6464
select GENERIC_PCI_IOMAP
6565
select GENERIC_SCHED_CLOCK
6666
select GENERIC_SMP_IDLE_THREAD
67-
select HANDLE_DOMAIN_IRQ
6867
select HARDIRQS_SW_RESEND
6968
select HAVE_ARCH_AUDITSYSCALL if AEABI && !OABI_COMPAT
7069
select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6

arch/arm/mach-imx/avic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static void __exception_irq_entry avic_handle_irq(struct pt_regs *regs)
154154
if (nivector == 0xffff)
155155
break;
156156

157-
handle_domain_irq(domain, nivector, regs);
157+
generic_handle_domain_irq(domain, nivector);
158158
} while (1);
159159
}
160160

arch/arm/mach-imx/tzic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs)
134134
while (stat) {
135135
handled = 1;
136136
irqofs = fls(stat) - 1;
137-
handle_domain_irq(domain, irqofs + i * 32, regs);
137+
generic_handle_domain_irq(domain, irqofs + i * 32);
138138
stat &= ~(1 << irqofs);
139139
}
140140
}

arch/arm/mach-omap1/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ asmlinkage void __exception_irq_entry omap1_handle_irq(struct pt_regs *regs)
165165
}
166166
irq:
167167
if (irqnr)
168-
handle_domain_irq(domain, irqnr, regs);
168+
generic_handle_domain_irq(domain, irqnr);
169169
else
170170
break;
171171
} while (irqnr);

arch/arm/mach-s3c/irq-s3c24xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static inline int s3c24xx_handle_intc(struct s3c_irq_intc *intc,
354354
if (!(pnd & (1 << offset)))
355355
offset = __ffs(pnd);
356356

357-
handle_domain_irq(intc->domain, intc_offset + offset, regs);
357+
generic_handle_domain_irq(intc->domain, intc_offset + offset);
358358
return true;
359359
}
360360

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ config ARM64
133133
select GENERIC_TIME_VSYSCALL
134134
select GENERIC_GETTIMEOFDAY
135135
select GENERIC_VDSO_TIME_NS
136-
select HANDLE_DOMAIN_IRQ
137136
select HARDIRQS_SW_RESEND
138137
select HAVE_MOVE_PMD
139138
select HAVE_MOVE_PUD

arch/csky/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ config CSKY
1717
select CSKY_APB_INTC
1818
select DMA_DIRECT_REMAP
1919
select IRQ_DOMAIN
20-
select HANDLE_DOMAIN_IRQ
2120
select DW_APB_TIMER_OF
2221
select GENERIC_IOREMAP
2322
select GENERIC_LIB_ASHLDI3

arch/openrisc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ config OPENRISC
1313
select OF
1414
select OF_EARLY_FLATTREE
1515
select IRQ_DOMAIN
16-
select HANDLE_DOMAIN_IRQ
1716
select GPIOLIB
1817
select HAVE_ARCH_TRACEHOOK
1918
select SPARSE_IRQ

arch/riscv/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ config RISCV
6262
select GENERIC_SCHED_CLOCK
6363
select GENERIC_SMP_IDLE_THREAD
6464
select GENERIC_TIME_VSYSCALL if MMU && 64BIT
65-
select HANDLE_DOMAIN_IRQ
6665
select HAVE_ARCH_AUDITSYSCALL
6766
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
6867
select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL

0 commit comments

Comments
 (0)