Skip to content

Commit 66bbe4a

Browse files
committed
Merge tag 'irq-core-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq core updates from Thomas Gleixner: "Updates for the interrupt core subsystem: - Remove the interrupt timing infrastructure This was added seven years ago to be used for power management purposes, but that integration never happened. - Clean up the remaining setup_percpu_irq() users The memory allocator is available when interrupts can be requested so there is not need for static irq_action. Move the remaining users to request_percpu_irq() and delete the historical cruft. - Warn when interrupt flag inconsistencies are detected in request*_irq(). Inconsistent flags can lead to hard to diagnose malfunction. The fallout of this new warning has been addressed in next and the fixes are coming in via the maintainer trees and the tip irq/cleanup pull requests. - Invoke affinity notifier when CPU hotplug breaks affinity Otherwise the code using the notifier misses the affinity change and operates on stale information. - The usual cleanups and improvements" * tag 'irq-core-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/proc: Replace snprintf with strscpy in register_handler_proc genirq/cpuhotplug: Notify about affinity changes breaking the affinity mask genirq: Move clear of kstat_irqs to free_desc() genirq: Warn about using IRQF_ONESHOT without a threaded handler irqdomain: Fix up const problem in irq_domain_set_name() genirq: Remove setup_percpu_irq() clocksource/drivers/mips-gic-timer: Move GIC timer to request_percpu_irq() MIPS: Move IP27 timer to request_percpu_irq() MIPS: Move IP30 timer to request_percpu_irq() genirq: Remove __request_percpu_irq() helper genirq: Remove IRQ timing tracking infrastructure
2 parents 4e21e58 + 2dfc417 commit 66bbe4a

18 files changed

Lines changed: 53 additions & 1200 deletions

File tree

arch/mips/include/asm/cevt-r4k.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ void mips_event_handler(struct clock_event_device *dev);
2323
int c0_compare_int_usable(void);
2424
irqreturn_t c0_compare_interrupt(int, void *);
2525

26-
extern struct irqaction c0_compare_irqaction;
2726
extern int cp0_timer_irq_installed;
2827

2928
#endif /* __ASM_CEVT_R4K_H */

arch/mips/kernel/cevt-r4k.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,6 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id)
159159
return IRQ_NONE;
160160
}
161161

162-
struct irqaction c0_compare_irqaction = {
163-
.handler = c0_compare_interrupt,
164-
/*
165-
* IRQF_SHARED: The timer interrupt may be shared with other interrupts
166-
* such as perf counter and FDC interrupts.
167-
*/
168-
.flags = IRQF_PERCPU | IRQF_TIMER | IRQF_SHARED,
169-
.name = "timer",
170-
};
171-
172-
173162
void mips_event_handler(struct clock_event_device *dev)
174163
{
175164
}

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
5858
return IRQ_HANDLED;
5959
}
6060

61-
struct irqaction hub_rt_irqaction = {
62-
.handler = hub_rt_counter_handler,
63-
.percpu_dev_id = &hub_rt_clockevent,
64-
.flags = IRQF_PERCPU | IRQF_TIMER,
65-
.name = "hub-rt",
66-
};
67-
6861
/*
6962
* This is a hack; we really need to figure these values out dynamically
7063
*
@@ -103,7 +96,8 @@ static void __init hub_rt_clock_event_global_init(void)
10396
{
10497
irq_set_handler(IP27_RT_TIMER_IRQ, handle_percpu_devid_irq);
10598
irq_set_percpu_devid(IP27_RT_TIMER_IRQ);
106-
setup_percpu_irq(IP27_RT_TIMER_IRQ, &hub_rt_irqaction);
99+
WARN_ON(request_percpu_irq(IP27_RT_TIMER_IRQ, hub_rt_counter_handler,
100+
"hub-rt", &hub_rt_clockevent));
107101
}
108102

109103
static u64 hub_rt_read(struct clocksource *cs)

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ void __init plat_time_init(void)
5252
int irq = get_c0_compare_int();
5353

5454
cp0_timer_irq_installed = 1;
55-
c0_compare_irqaction.percpu_dev_id = &mips_clockevent_device;
56-
c0_compare_irqaction.flags &= ~IRQF_SHARED;
5755
irq_set_handler(irq, handle_percpu_devid_irq);
5856
irq_set_percpu_devid(irq);
59-
setup_percpu_irq(irq, &c0_compare_irqaction);
57+
WARN_ON(request_percpu_irq(irq, c0_compare_interrupt,
58+
"timer", &mips_clockevent_device));
6059
enable_percpu_irq(irq, IRQ_TYPE_NONE);
6160

6261
ip30_heart_clocksource_init();

drivers/clocksource/mips-gic-timer.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ static irqreturn_t gic_compare_interrupt(int irq, void *dev_id)
7777
return IRQ_HANDLED;
7878
}
7979

80-
static struct irqaction gic_compare_irqaction = {
81-
.handler = gic_compare_interrupt,
82-
.percpu_dev_id = &gic_clockevent_device,
83-
.flags = IRQF_PERCPU | IRQF_TIMER,
84-
.name = "timer",
85-
};
86-
8780
static void gic_clockevent_cpu_init(unsigned int cpu,
8881
struct clock_event_device *cd)
8982
{
@@ -152,7 +145,8 @@ static int gic_clockevent_init(void)
152145
if (!gic_frequency)
153146
return -ENXIO;
154147

155-
ret = setup_percpu_irq(gic_timer_irq, &gic_compare_irqaction);
148+
ret = request_percpu_irq(gic_timer_irq, gic_compare_interrupt,
149+
"timer", &gic_clockevent_device);
156150
if (ret < 0) {
157151
pr_err("IRQ %d setup failed (%d)\n", gic_timer_irq, ret);
158152
return ret;

include/linux/interrupt.h

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,8 @@ request_any_context_irq(unsigned int irq, irq_handler_t handler,
181181
unsigned long flags, const char *name, void *dev_id);
182182

183183
extern int __must_check
184-
__request_percpu_irq(unsigned int irq, irq_handler_t handler,
185-
unsigned long flags, const char *devname,
186-
const cpumask_t *affinity, void __percpu *percpu_dev_id);
184+
request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler, const char *devname,
185+
const cpumask_t *affinity, void __percpu *percpu_dev_id);
187186

188187
extern int __must_check
189188
request_nmi(unsigned int irq, irq_handler_t handler, unsigned long flags,
@@ -193,17 +192,8 @@ static inline int __must_check
193192
request_percpu_irq(unsigned int irq, irq_handler_t handler,
194193
const char *devname, void __percpu *percpu_dev_id)
195194
{
196-
return __request_percpu_irq(irq, handler, 0,
197-
devname, NULL, percpu_dev_id);
198-
}
199-
200-
static inline int __must_check
201-
request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler,
202-
const char *devname, const cpumask_t *affinity,
203-
void __percpu *percpu_dev_id)
204-
{
205-
return __request_percpu_irq(irq, handler, 0,
206-
devname, affinity, percpu_dev_id);
195+
return request_percpu_irq_affinity(irq, handler, devname,
196+
NULL, percpu_dev_id);
207197
}
208198

209199
extern int __must_check
@@ -871,12 +861,6 @@ static inline void init_irq_proc(void)
871861
}
872862
#endif
873863

874-
#ifdef CONFIG_IRQ_TIMINGS
875-
void irq_timings_enable(void);
876-
void irq_timings_disable(void);
877-
u64 irq_timings_next_event(u64 now);
878-
#endif
879-
880864
struct seq_file;
881865
int show_interrupts(struct seq_file *p, void *v);
882866
int arch_show_interrupts(struct seq_file *p, int prec);

include/linux/irq.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,6 @@ enum {
595595

596596
#define IRQ_DEFAULT_INIT_FLAGS ARCH_IRQ_INIT_FLAGS
597597

598-
struct irqaction;
599-
extern int setup_percpu_irq(unsigned int irq, struct irqaction *new);
600-
601598
#ifdef CONFIG_DEPRECATED_IRQ_CPU_ONOFFLINE
602599
extern void irq_cpu_online(void);
603600
extern void irq_cpu_offline(void);

kernel/irq/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ config GENERIC_MSI_IRQ
9292
config IRQ_MSI_IOMMU
9393
bool
9494

95-
config IRQ_TIMINGS
96-
bool
97-
9895
config GENERIC_IRQ_MATRIX_ALLOCATOR
9996
bool
10097

kernel/irq/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22

33
obj-y := irqdesc.o handle.o manage.o spurious.o resend.o chip.o dummychip.o devres.o kexec.o
4-
obj-$(CONFIG_IRQ_TIMINGS) += timings.o
5-
ifeq ($(CONFIG_TEST_IRQ_TIMINGS),y)
6-
CFLAGS_timings.o += -DDEBUG
7-
endif
84
obj-$(CONFIG_GENERIC_IRQ_CHIP) += generic-chip.o
95
obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o
106
obj-$(CONFIG_IRQ_DOMAIN) += irqdomain.o

kernel/irq/cpuhotplug.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ void irq_migrate_all_off_this_cpu(void)
177177
bool affinity_broken;
178178

179179
desc = irq_to_desc(irq);
180-
scoped_guard(raw_spinlock, &desc->lock)
180+
scoped_guard(raw_spinlock, &desc->lock) {
181181
affinity_broken = migrate_one_irq(desc);
182-
182+
if (affinity_broken && desc->affinity_notify)
183+
irq_affinity_schedule_notify_work(desc);
184+
}
183185
if (affinity_broken) {
184186
pr_debug_ratelimited("IRQ %u: no longer affine to CPU%u\n",
185187
irq, smp_processor_id());

0 commit comments

Comments
 (0)