Skip to content

Commit c64638d

Browse files
author
Marc Zyngier
committed
Merge branch irq/generic_handle_domain_irq-core into irq/irqchip-next
Simplify the handling of interrupts that require an IRQ domain resolution: - domains now cache the irqdata instead of the irq number - consistent behaviour wrt RCU - single lookup for architectures using sparse IRQs - reduced boilerplate code in drivers. * irq/generic_handle_domain_irq-core: (26 commits) irqchip: Bulk conversion to generic_handle_domain_irq() genirq: Move non-irqdomain handle_domain_irq() handling into ARM's handle_IRQ() genirq: Add generic_handle_domain_irq() helper irqchip/nvic: Convert from handle_IRQ() to handle_domain_irq() irqdesc: Fix __handle_domain_irq() comment genirq: Use irq_resolve_mapping() to implement __handle_domain_irq() and co irqdomain: Introduce irq_resolve_mapping() irqdomain: Protect the linear revmap with RCU irqdomain: Cache irq_data instead of a virq number in the revmap irqdomain: Use struct_size() helper when allocating irqdomain irqdomain: Make normal and nomap irqdomains exclusive powerpc: Move the use of irq_domain_add_nomap() behind a config option irqdomain: Reimplement irq_linear_revmap() with irq_find_mapping() irqdomain: Kill irq_domain_add_legacy_isa powerpc: Drop dependency between asm/irq.h and linux/irqdomain.h powerpc: Convert irq_domain_add_legacy_isa use to irq_domain_add_legacy scsi/ibmvscsi: Directly include linux/{of.h,irqdomain.h} powerpc: Add missing linux/{of.h,irqdomain.h} include directives MIPS: Do not include linux/irqdomain.h from asm/irq.h MIPS: Add missing linux/irqdomain.h includes ...
2 parents cd273da + 046a6ee commit c64638d

File tree

90 files changed

+346
-314
lines changed

Some content is hidden

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

90 files changed

+346
-314
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ Legacy
146146

147147
irq_domain_add_simple()
148148
irq_domain_add_legacy()
149-
irq_domain_add_legacy_isa()
150149
irq_domain_create_simple()
151150
irq_domain_create_legacy()
152151

arch/arm/kernel/irq.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,27 @@ int arch_show_interrupts(struct seq_file *p, int prec)
6363
*/
6464
void handle_IRQ(unsigned int irq, struct pt_regs *regs)
6565
{
66-
__handle_domain_irq(NULL, irq, false, regs);
66+
struct pt_regs *old_regs = set_irq_regs(regs);
67+
struct irq_desc *desc;
68+
69+
irq_enter();
70+
71+
/*
72+
* Some hardware gives randomly wrong interrupts. Rather
73+
* than crashing, do something sensible.
74+
*/
75+
if (unlikely(!irq || irq >= nr_irqs))
76+
desc = NULL;
77+
else
78+
desc = irq_to_desc(irq);
79+
80+
if (likely(desc))
81+
handle_irq_desc(desc);
82+
else
83+
ack_bad_irq(irq);
84+
85+
irq_exit();
86+
set_irq_regs(old_regs);
6787
}
6888

6989
/*

arch/mips/include/asm/irq.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include <linux/linkage.h>
1313
#include <linux/smp.h>
14-
#include <linux/irqdomain.h>
1514

1615
#include <asm/mipsmtregs.h>
1716

arch/mips/lantiq/xway/dma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/spinlock.h>
1313
#include <linux/clk.h>
1414
#include <linux/err.h>
15+
#include <linux/of.h>
1516

1617
#include <lantiq_soc.h>
1718
#include <xway_dma.h>

arch/mips/pci/pci-rt3883.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/init.h>
1414
#include <linux/delay.h>
1515
#include <linux/interrupt.h>
16+
#include <linux/irqdomain.h>
1617
#include <linux/of.h>
1718
#include <linux/of_irq.h>
1819
#include <linux/of_pci.h>

arch/mips/pci/pci-xtalk-bridge.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/platform_data/xtalk-bridge.h>
1414
#include <linux/nvmem-consumer.h>
1515
#include <linux/crc16.h>
16+
#include <linux/irqdomain.h>
1617

1718
#include <asm/pci/bridge.h>
1819
#include <asm/paccess.h>

arch/mips/sgi-ip27/ip27-irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <linux/interrupt.h>
1111
#include <linux/irq.h>
12+
#include <linux/irqdomain.h>
1213
#include <linux/ioport.h>
1314
#include <linux/kernel.h>
1415
#include <linux/bitops.h>

arch/mips/sgi-ip30/ip30-irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <linux/init.h>
77
#include <linux/interrupt.h>
88
#include <linux/irq.h>
9+
#include <linux/irqdomain.h>
910
#include <linux/percpu.h>
1011
#include <linux/spinlock.h>
1112
#include <linux/tick.h>

arch/nios2/include/asm/irq.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
#define NIOS2_CPU_NR_IRQS 32
1111

1212
#include <asm-generic/irq.h>
13-
#include <linux/irqdomain.h>
1413

1514
#endif

arch/nios2/kernel/irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <linux/init.h>
1313
#include <linux/interrupt.h>
14+
#include <linux/irqdomain.h>
1415
#include <linux/of.h>
1516

1617
static u32 ienable;

0 commit comments

Comments
 (0)