Skip to content

Commit d09cc36

Browse files
committed
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
Pull core irq updates from Thomas Gleixner: "The irq department delivers: - Another tree wide update to get rid of the horrible create_irq interface along with its even more horrible variants. That also gets rid of the last leftovers of the initial sparse irq hackery. arch/driver specific changes have been either acked or ignored. - A fix for the spurious interrupt detection logic with threaded interrupts. - A new ARM SoC interrupt controller - The usual pile of fixes and improvements all over the place" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits) Documentation: brcmstb-l2: Add Broadcom STB Level-2 interrupt controller binding irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 interrupt controller genirq: Improve documentation to match current implementation ARM: iop13xx: fix msi support with sparse IRQ genirq: Provide !SMP stub for irq_set_affinity_notifier() irqchip: armada-370-xp: Move the devicetree binding documentation irqchip: gic: Use mask field in GICC_IAR genirq: Remove dynamic_irq mess ia64: Use irq_init_desc genirq: Replace dynamic_irq_init/cleanup genirq: Remove irq_reserve_irq[s] genirq: Replace reserve_irqs in core code s390: Avoid call to irq_reserve_irqs() s390: Remove pointless arch_show_interrupts() s390: pci: Check return value of alloc_irq_desc() proper sh: intc: Remove pointless irq_reserve_irqs() invocation x86, irq: Remove pointless irq_reserve_irqs() call genirq: Make create/destroy_irq() ia64 private tile: Use SPARSE_IRQ tile: pci: Use irq_alloc/free_hwirq() ...
2 parents 82e627e + c0ffa79 commit d09cc36

56 files changed

Lines changed: 597 additions & 396 deletions

File tree

Some content is hidden

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

‎Documentation/IRQ-domain.txt‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ An interrupt controller driver creates and registers an irq_domain by
4141
calling one of the irq_domain_add_*() functions (each mapping method
4242
has a different allocator function, more on that later). The function
4343
will return a pointer to the irq_domain on success. The caller must
44-
provide the allocator function with an irq_domain_ops structure with
45-
the .map callback populated as a minimum.
44+
provide the allocator function with an irq_domain_ops structure.
4645

4746
In most cases, the irq_domain will begin empty without any mappings
4847
between hwirq and IRQ numbers. Mappings are added to the irq_domain
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Broadcom Generic Level 2 Interrupt Controller
2+
3+
Required properties:
4+
5+
- compatible: should be "brcm,l2-intc"
6+
- reg: specifies the base physical address and size of the registers
7+
- interrupt-controller: identifies the node as an interrupt controller
8+
- #interrupt-cells: specifies the number of cells needed to encode an
9+
interrupt source. Should be 1.
10+
- interrupt-parent: specifies the phandle to the parent interrupt controller
11+
this controller is cacaded from
12+
- interrupts: specifies the interrupt line in the interrupt-parent irq space
13+
to be used for cascading
14+
15+
Optional properties:
16+
17+
- brcm,irq-can-wake: If present, this means the L2 controller can be used as a
18+
wakeup source for system suspend/resume.
19+
20+
Example:
21+
22+
hif_intr2_intc: interrupt-controller@f0441000 {
23+
compatible = "brcm,l2-intc";
24+
reg = <0xf0441000 0x30>;
25+
interrupt-controller;
26+
#interrupt-cells = <1>;
27+
interrupt-parent = <&intc>;
28+
interrupts = <0x0 0x20 0x0>;
29+
};

Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt renamed to Documentation/devicetree/bindings/interrupt-controller/marvell,armada-370-xp-mpic.txt

File renamed without changes.

‎arch/arm/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ config ARCH_IOP13XX
480480
select PCI
481481
select PLAT_IOP
482482
select VMSPLIT_1G
483+
select SPARSE_IRQ
483484
help
484485
Support for Intel's IOP13XX (XScale) family of processors.
485486

‎arch/arm/mach-iop13xx/include/mach/irqs.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,4 @@ static inline u32 read_intpnd_3(void)
191191
#define NR_IOP13XX_IRQS (IRQ_IOP13XX_HPI + 1)
192192
#endif
193193

194-
#define NR_IRQS NR_IOP13XX_IRQS
195-
196194
#endif /* _IOP13XX_IRQ_H_ */

‎arch/arm/mach-iop13xx/include/mach/time.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#ifndef _IOP13XX_TIME_H_
22
#define _IOP13XX_TIME_H_
3+
4+
#include <mach/irqs.h>
5+
36
#define IRQ_IOP_TIMER0 IRQ_IOP13XX_TIMER0
47

58
#define IOP_TMR_EN 0x02

‎arch/arm/mach-iop13xx/iq81340mc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ MACHINE_START(IQ81340MC, "Intel IQ81340MC")
9393
.init_time = iq81340mc_timer_init,
9494
.init_machine = iq81340mc_init,
9595
.restart = iop13xx_restart,
96+
.nr_irqs = NR_IOP13XX_IRQS,
9697
MACHINE_END

‎arch/arm/mach-iop13xx/iq81340sc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,5 @@ MACHINE_START(IQ81340SC, "Intel IQ81340SC")
9595
.init_time = iq81340sc_timer_init,
9696
.init_machine = iq81340sc_init,
9797
.restart = iop13xx_restart,
98+
.nr_irqs = NR_IOP13XX_IRQS,
9899
MACHINE_END

‎arch/arm/mach-iop13xx/msi.c‎

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@
2323
#include <linux/msi.h>
2424
#include <asm/mach/irq.h>
2525
#include <asm/irq.h>
26-
27-
28-
#define IOP13XX_NUM_MSI_IRQS 128
29-
static DECLARE_BITMAP(msi_irq_in_use, IOP13XX_NUM_MSI_IRQS);
26+
#include <mach/irqs.h>
3027

3128
/* IMIPR0 CP6 R8 Page 1
3229
*/
@@ -121,41 +118,6 @@ void __init iop13xx_msi_init(void)
121118
irq_set_chained_handler(IRQ_IOP13XX_INBD_MSI, iop13xx_msi_handler);
122119
}
123120

124-
/*
125-
* Dynamic irq allocate and deallocation
126-
*/
127-
int create_irq(void)
128-
{
129-
int irq, pos;
130-
131-
again:
132-
pos = find_first_zero_bit(msi_irq_in_use, IOP13XX_NUM_MSI_IRQS);
133-
irq = IRQ_IOP13XX_MSI_0 + pos;
134-
if (irq > NR_IRQS)
135-
return -ENOSPC;
136-
/* test_and_set_bit operates on 32-bits at a time */
137-
if (test_and_set_bit(pos, msi_irq_in_use))
138-
goto again;
139-
140-
dynamic_irq_init(irq);
141-
142-
return irq;
143-
}
144-
145-
void destroy_irq(unsigned int irq)
146-
{
147-
int pos = irq - IRQ_IOP13XX_MSI_0;
148-
149-
dynamic_irq_cleanup(irq);
150-
151-
clear_bit(pos, msi_irq_in_use);
152-
}
153-
154-
void arch_teardown_msi_irq(unsigned int irq)
155-
{
156-
destroy_irq(irq);
157-
}
158-
159121
static void iop13xx_msi_nop(struct irq_data *d)
160122
{
161123
return;
@@ -172,12 +134,17 @@ static struct irq_chip iop13xx_msi_chip = {
172134

173135
int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
174136
{
175-
int id, irq = create_irq();
137+
int id, irq = irq_alloc_desc_from(IRQ_IOP13XX_MSI_0, -1);
176138
struct msi_msg msg;
177139

178140
if (irq < 0)
179141
return irq;
180142

143+
if (irq >= NR_IOP13XX_IRQS) {
144+
irq_free_desc(irq);
145+
return -ENOSPC;
146+
}
147+
181148
irq_set_msi_desc(irq, desc);
182149

183150
msg.address_hi = 0x0;
@@ -191,3 +158,8 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
191158

192159
return 0;
193160
}
161+
162+
void arch_teardown_msi_irq(unsigned int irq)
163+
{
164+
irq_free_desc(irq);
165+
}

‎arch/arm/mach-iop13xx/setup.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <mach/hardware.h>
2828
#include <asm/irq.h>
2929
#include <asm/hardware/iop_adma.h>
30+
#include <mach/irqs.h>
3031

3132
#define IOP13XX_UART_XTAL 33334000
3233
#define IOP13XX_SETUP_DEBUG 0

0 commit comments

Comments
 (0)