]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
genirq: Remove __request_percpu_irq() helper
authorMarc Zyngier <maz@kernel.org>
Wed, 10 Dec 2025 08:22:38 +0000 (08:22 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 15 Dec 2025 21:20:50 +0000 (22:20 +0100)
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
include/linux/interrupt.h
kernel/irq/manage.c

index 44e335b17ed64ab9b70fb29b28dc122d589b1dae..00c01b0a43be1c93967e70b3c31f08e178456238 100644 (file)
@@ -181,9 +181,8 @@ request_any_context_irq(unsigned int irq, irq_handler_t handler,
                        unsigned long flags, const char *name, void *dev_id);
 
 extern int __must_check
-__request_percpu_irq(unsigned int irq, irq_handler_t handler,
-                    unsigned long flags, const char *devname,
-                    const cpumask_t *affinity, void __percpu *percpu_dev_id);
+request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler, const char *devname,
+                           const cpumask_t *affinity, void __percpu *percpu_dev_id);
 
 extern int __must_check
 request_nmi(unsigned int irq, irq_handler_t handler, unsigned long flags,
@@ -193,17 +192,8 @@ static inline int __must_check
 request_percpu_irq(unsigned int irq, irq_handler_t handler,
                   const char *devname, void __percpu *percpu_dev_id)
 {
-       return __request_percpu_irq(irq, handler, 0,
-                                   devname, NULL, percpu_dev_id);
-}
-
-static inline int __must_check
-request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler,
-                           const char *devname, const cpumask_t *affinity,
-                           void __percpu *percpu_dev_id)
-{
-       return __request_percpu_irq(irq, handler, 0,
-                                   devname, affinity, percpu_dev_id);
+       return request_percpu_irq_affinity(irq, handler, devname,
+                                          NULL, percpu_dev_id);
 }
 
 extern int __must_check
index 7b25ffc5c43a4f8d1553ec06b44342756c192915..4d0b3264271693cdbff9691ea8c10d85cff2c74b 100644 (file)
@@ -2510,10 +2510,9 @@ struct irqaction *create_percpu_irqaction(irq_handler_t handler, unsigned long f
 }
 
 /**
- * __request_percpu_irq - allocate a percpu interrupt line
+ * request_percpu_irq_affinity - allocate a percpu interrupt line
  * @irq:       Interrupt line to allocate
  * @handler:   Function to be called when the IRQ occurs.
- * @flags:     Interrupt type flags (IRQF_TIMER only)
  * @devname:   An ascii name for the claiming device
  * @affinity:  A cpumask describing the target CPUs for this interrupt
  * @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
  * the handler gets called with the interrupted CPU's instance of
  * that variable.
  */
-int __request_percpu_irq(unsigned int irq, irq_handler_t handler,
-                        unsigned long flags, const char *devname,
-                        const cpumask_t *affinity, void __percpu *dev_id)
+int request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler, const char *devname,
+                               const cpumask_t *affinity, void __percpu *dev_id)
 {
        struct irqaction *action;
        struct irq_desc *desc;
@@ -2542,10 +2540,7 @@ int __request_percpu_irq(unsigned int irq, irq_handler_t handler,
            !irq_settings_is_per_cpu_devid(desc))
                return -EINVAL;
 
-       if (flags && flags != IRQF_TIMER)
-               return -EINVAL;
-
-       action = create_percpu_irqaction(handler, flags, devname, affinity, dev_id);
+       action = create_percpu_irqaction(handler, 0, devname, affinity, dev_id);
        if (!action)
                return -ENOMEM;
 
@@ -2564,7 +2559,7 @@ int __request_percpu_irq(unsigned int irq, irq_handler_t handler,
 
        return retval;
 }
-EXPORT_SYMBOL_GPL(__request_percpu_irq);
+EXPORT_SYMBOL_GPL(request_percpu_irq_affinity);
 
 /**
  * request_percpu_nmi - allocate a percpu interrupt line for NMI delivery