Skip to content

Commit e9b624e

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
genirq: Remove __request_percpu_irq() helper
With the IRQ timing stuff being gone, there is no need to specify a flag when requesting a percpu interrupt. Not only IRQF_TIMER was the only flag (set of flags actually) allowed, but nobody ever passed it. Get rid of __request_percpu_irq(), which was only getting 0 as flags, and promote request_percpu_irq_affinity() as its replacement. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com> Link: https://patch.msgid.link/20251210082242.360936-3-maz@kernel.org
1 parent c119e66 commit e9b624e

2 files changed

Lines changed: 9 additions & 24 deletions

File tree

include/linux/interrupt.h

Lines changed: 4 additions & 14 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

kernel/irq/manage.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,10 +2510,9 @@ struct irqaction *create_percpu_irqaction(irq_handler_t handler, unsigned long f
25102510
}
25112511

25122512
/**
2513-
* __request_percpu_irq - allocate a percpu interrupt line
2513+
* request_percpu_irq_affinity - allocate a percpu interrupt line
25142514
* @irq: Interrupt line to allocate
25152515
* @handler: Function to be called when the IRQ occurs.
2516-
* @flags: Interrupt type flags (IRQF_TIMER only)
25172516
* @devname: An ascii name for the claiming device
25182517
* @affinity: A cpumask describing the target CPUs for this interrupt
25192518
* @dev_id: A percpu cookie passed back to the handler function
@@ -2526,9 +2525,8 @@ struct irqaction *create_percpu_irqaction(irq_handler_t handler, unsigned long f
25262525
* the handler gets called with the interrupted CPU's instance of
25272526
* that variable.
25282527
*/
2529-
int __request_percpu_irq(unsigned int irq, irq_handler_t handler,
2530-
unsigned long flags, const char *devname,
2531-
const cpumask_t *affinity, void __percpu *dev_id)
2528+
int request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler, const char *devname,
2529+
const cpumask_t *affinity, void __percpu *dev_id)
25322530
{
25332531
struct irqaction *action;
25342532
struct irq_desc *desc;
@@ -2542,10 +2540,7 @@ int __request_percpu_irq(unsigned int irq, irq_handler_t handler,
25422540
!irq_settings_is_per_cpu_devid(desc))
25432541
return -EINVAL;
25442542

2545-
if (flags && flags != IRQF_TIMER)
2546-
return -EINVAL;
2547-
2548-
action = create_percpu_irqaction(handler, flags, devname, affinity, dev_id);
2543+
action = create_percpu_irqaction(handler, 0, devname, affinity, dev_id);
25492544
if (!action)
25502545
return -ENOMEM;
25512546

@@ -2564,7 +2559,7 @@ int __request_percpu_irq(unsigned int irq, irq_handler_t handler,
25642559

25652560
return retval;
25662561
}
2567-
EXPORT_SYMBOL_GPL(__request_percpu_irq);
2562+
EXPORT_SYMBOL_GPL(request_percpu_irq_affinity);
25682563

25692564
/**
25702565
* request_percpu_nmi - allocate a percpu interrupt line for NMI delivery

0 commit comments

Comments
 (0)