Skip to content

Commit 2d38533

Browse files
committed
Merge tag 'irq-core-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner: "Updates for the interrupt subsystem: Treewide: - Cleanup of setup_irq() which is not longer required because the memory allocator is available early. Most cleanup changes come through the various maintainer trees, so the final removal of setup_irq() is postponed towards the end of the merge window. Core: - Protection against unsafe invocation of interrupt handlers and unsafe interrupt injection including a fixup of the offending PCI/AER error injection mechanism. Invoking interrupt handlers from arbitrary contexts, i.e. outside of an actual interrupt, can cause inconsistent state on the fragile x86 interrupt affinity changing hardware trainwreck. Drivers: - Second wave of support for the new ARM GICv4.1 - Multi-instance support for Xilinx and PLIC interrupt controllers - CPU-Hotplug support for PLIC - The obligatory new driver for X1000 TCU - Enhancements, cleanups and fixes all over the place" * tag 'irq-core-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (58 commits) unicore32: Replace setup_irq() by request_irq() sh: Replace setup_irq() by request_irq() hexagon: Replace setup_irq() by request_irq() c6x: Replace setup_irq() by request_irq() alpha: Replace setup_irq() by request_irq() irqchip/gic-v4.1: Eagerly vmap vPEs irqchip/gic-v4.1: Add VSGI property setup irqchip/gic-v4.1: Add VSGI allocation/teardown irqchip/gic-v4.1: Move doorbell management to the GICv4 abstraction layer irqchip/gic-v4.1: Plumb set_vcpu_affinity SGI callbacks irqchip/gic-v4.1: Plumb get/set_irqchip_state SGI callbacks irqchip/gic-v4.1: Plumb mask/unmask SGI callbacks irqchip/gic-v4.1: Add initial SGI configuration irqchip/gic-v4.1: Plumb skeletal VSGI irqchip irqchip/stm32: Retrigger both in eoi and unmask callbacks irqchip/gic-v3: Move irq_domain_update_bus_token to after checking for NULL domain irqchip/xilinx: Do not call irq_set_default_host() irqchip/xilinx: Enable generic irq multi handler irqchip/xilinx: Fill error code when irq domain registration fails irqchip/xilinx: Add support for multiple instances ...
2 parents 673b41e + 8a13b02 commit 2d38533

Some content is hidden

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

64 files changed

+1185
-420
lines changed

arch/alpha/kernel/irq_alpha.c

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -213,32 +213,13 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
213213
* The special RTC interrupt type. The interrupt itself was
214214
* processed by PALcode, and comes in via entInt vector 1.
215215
*/
216-
217-
struct irqaction timer_irqaction = {
218-
.handler = rtc_timer_interrupt,
219-
.name = "timer",
220-
};
221-
222216
void __init
223-
init_rtc_irq(void)
217+
init_rtc_irq(irq_handler_t handler)
224218
{
225219
irq_set_chip_and_handler_name(RTC_IRQ, &dummy_irq_chip,
226220
handle_percpu_irq, "RTC");
227-
setup_irq(RTC_IRQ, &timer_irqaction);
221+
if (!handler)
222+
handler = rtc_timer_interrupt;
223+
if (request_irq(RTC_IRQ, handler, 0, "timer", NULL))
224+
pr_err("Failed to register timer interrupt\n");
228225
}
229-
230-
/* Dummy irqactions. */
231-
struct irqaction isa_cascade_irqaction = {
232-
.handler = no_action,
233-
.name = "isa-cascade"
234-
};
235-
236-
struct irqaction timer_cascade_irqaction = {
237-
.handler = no_action,
238-
.name = "timer-cascade"
239-
};
240-
241-
struct irqaction halt_switch_irqaction = {
242-
.handler = no_action,
243-
.name = "halt-switch"
244-
};

arch/alpha/kernel/irq_i8259.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ struct irq_chip i8259a_irq_type = {
8282
void __init
8383
init_i8259a_irqs(void)
8484
{
85-
static struct irqaction cascade = {
86-
.handler = no_action,
87-
.name = "cascade",
88-
};
89-
9085
long i;
9186

9287
outb(0xff, 0x21); /* mask all of 8259A-1 */
@@ -96,7 +91,8 @@ init_i8259a_irqs(void)
9691
irq_set_chip_and_handler(i, &i8259a_irq_type, handle_level_irq);
9792
}
9893

99-
setup_irq(2, &cascade);
94+
if (request_irq(2, no_action, 0, "cascade", NULL))
95+
pr_err("Failed to request irq 2 (cascade)\n");
10096
}
10197

10298

arch/alpha/kernel/irq_impl.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,9 @@ extern void isa_no_iack_sc_device_interrupt(unsigned long);
2121
extern void srm_device_interrupt(unsigned long);
2222
extern void pyxis_device_interrupt(unsigned long);
2323

24-
extern struct irqaction timer_irqaction;
25-
extern struct irqaction isa_cascade_irqaction;
26-
extern struct irqaction timer_cascade_irqaction;
27-
extern struct irqaction halt_switch_irqaction;
28-
2924
extern void init_srm_irqs(long, unsigned long);
3025
extern void init_pyxis_irqs(unsigned long);
31-
extern void init_rtc_irq(void);
26+
extern void init_rtc_irq(irq_handler_t handler);
3227

3328
extern void common_init_isa_dma(void);
3429

arch/alpha/kernel/irq_pyxis.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,6 @@ init_pyxis_irqs(unsigned long ignore_mask)
107107
irq_set_status_flags(i, IRQ_LEVEL);
108108
}
109109

110-
setup_irq(16+7, &isa_cascade_irqaction);
110+
if (request_irq(16 + 7, no_action, 0, "isa-cascade", NULL))
111+
pr_err("Failed to register isa-cascade interrupt\n");
111112
}

arch/alpha/kernel/sys_alcor.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ alcor_init_irq(void)
133133
init_i8259a_irqs();
134134
common_init_isa_dma();
135135

136-
setup_irq(16+31, &isa_cascade_irqaction);
136+
if (request_irq(16 + 31, no_action, 0, "isa-cascade", NULL))
137+
pr_err("Failed to register isa-cascade interrupt\n");
137138
}
138139

139140

arch/alpha/kernel/sys_cabriolet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ common_init_irq(void (*srm_dev_int)(unsigned long v))
112112
}
113113

114114
common_init_isa_dma();
115-
setup_irq(16+4, &isa_cascade_irqaction);
115+
if (request_irq(16 + 4, no_action, 0, "isa-cascade", NULL))
116+
pr_err("Failed to register isa-cascade interrupt\n");
116117
}
117118

118119
#ifndef CONFIG_ALPHA_PC164

arch/alpha/kernel/sys_eb64p.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ eb64p_init_irq(void)
123123
}
124124

125125
common_init_isa_dma();
126-
setup_irq(16+5, &isa_cascade_irqaction);
126+
if (request_irq(16 + 5, no_action, 0, "isa-cascade", NULL))
127+
pr_err("Failed to register isa-cascade interrupt\n");
127128
}
128129

129130
/*

arch/alpha/kernel/sys_marvel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ marvel_init_pci(void)
397397
static void __init
398398
marvel_init_rtc(void)
399399
{
400-
init_rtc_irq();
400+
init_rtc_irq(NULL);
401401
}
402402

403403
static void

arch/alpha/kernel/sys_miata.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ miata_init_irq(void)
8181
init_pyxis_irqs(0x63b0000);
8282

8383
common_init_isa_dma();
84-
setup_irq(16+2, &halt_switch_irqaction); /* SRM only? */
85-
setup_irq(16+6, &timer_cascade_irqaction);
84+
if (request_irq(16 + 2, no_action, 0, "halt-switch", NULL))
85+
pr_err("Failed to register halt-switch interrupt\n");
86+
if (request_irq(16 + 6, no_action, 0, "timer-cascade", NULL))
87+
pr_err("Failed to register timer-cascade interrupt\n");
8688
}
8789

8890

arch/alpha/kernel/sys_ruffian.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ ruffian_init_rtc(void)
8282
outb(0x31, 0x42);
8383
outb(0x13, 0x42);
8484

85-
setup_irq(0, &timer_irqaction);
85+
if (request_irq(0, rtc_timer_interrupt, 0, "timer", NULL))
86+
pr_err("Failed to request irq 0 (timer)\n");
8687
}
8788

8889
static void

0 commit comments

Comments
 (0)