All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Joshua Kinard <kumba@gentoo.org>
Subject: [PATCH 2/6] genirq: Remove __request_percpu_irq() helper
Date: Wed, 10 Dec 2025 08:22:38 +0000	[thread overview]
Message-ID: <20251210082242.360936-3-maz@kernel.org> (raw)
In-Reply-To: <20251210082242.360936-1-maz@kernel.org>

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>
---
 include/linux/interrupt.h | 18 ++++--------------
 kernel/irq/manage.c       | 16 ++++++----------
 2 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 44e335b17ed64..00c01b0a43be1 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -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
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 7b25ffc5c43a4..1c858be09ba13 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -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,9 @@ 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 +2541,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 +2560,7 @@ int __request_percpu_irq(unsigned int irq, irq_handler_t handler,
 
 	return retval;
 }
-EXPORT_SYMBOL_GPL(__request_percpu_irq);
+EXPORT_SYMBOL(request_percpu_irq_affinity);
 
 /**
  * request_percpu_nmi - allocate a percpu interrupt line for NMI delivery
-- 
2.47.3


  parent reply	other threads:[~2025-12-10  8:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10  8:22 [PATCH 0/6] genirq: Post 6.19-rc1 API cleanup Marc Zyngier
2025-12-10  8:22 ` [PATCH 1/6] genirq: Remove IRQ timing tracking infrastructure Marc Zyngier
2025-12-11  1:32   ` Jinjie Ruan
2025-12-15 21:27   ` [tip: irq/core] " tip-bot2 for Marc Zyngier
2025-12-10  8:22 ` Marc Zyngier [this message]
2025-12-11  1:46   ` [PATCH 2/6] genirq: Remove __request_percpu_irq() helper Jinjie Ruan
2025-12-15 21:27   ` [tip: irq/core] " tip-bot2 for Marc Zyngier
2025-12-10  8:22 ` [PATCH 3/6] mips: Move IP30 timer to request_percpu_irq() Marc Zyngier
2025-12-11  1:58   ` Jinjie Ruan
2025-12-11  8:20     ` Marc Zyngier
2025-12-15 21:27   ` [tip: irq/core] MIPS: " tip-bot2 for Marc Zyngier
2025-12-10  8:22 ` [PATCH 4/6] mips: Move IP27 " Marc Zyngier
2025-12-15 21:27   ` [tip: irq/core] MIPS: " tip-bot2 for Marc Zyngier
2025-12-10  8:22 ` [PATCH 5/6] clocksource: mips-gic-timer: Move GIC " Marc Zyngier
2025-12-15 21:27   ` [tip: irq/core] clocksource/drivers/mips-gic-timer: " tip-bot2 for Marc Zyngier
2026-01-29 21:32   ` [tip: timers/clocksource] " tip-bot2 for Marc Zyngier
2025-12-10  8:22 ` [PATCH 6/6] genirq: Kill setup_percpu_irq() Marc Zyngier
2025-12-15 21:27   ` [tip: irq/core] genirq: Remove setup_percpu_irq() tip-bot2 for Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251210082242.360936-3-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=kumba@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.