public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Daniel Thompson <danielt@kernel.org>
Subject: [PATCH] genirq: Allow NULL affinity for setup_percpu_irq()
Date: Fri,  5 Dec 2025 09:18:14 +0000	[thread overview]
Message-ID: <20251205091814.3944205-1-maz@kernel.org> (raw)

setup_percpu_irq() was forgotten when the percpu_devid infrastructure
was updated to deal with CPU affinities.

In order to keep ignoring users of this legacy API, provide sensible
defaults by setting the affinity to cpu_online_mask if none was
provided by the caller.

Reported-by: Daniel Thompson <danielt@kernel.org>
Closes: https://lore.kernel.org/r/aTFozefMQRg7lYxh@aspen.lan
Fixes: bdf4e2ac295fe ("genirq: Allow per-cpu interrupt sharing for non-overlapping affinities")
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 kernel/irq/manage.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0bb29316b4362..8b1b4c8a4f54c 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -2470,6 +2470,9 @@ int setup_percpu_irq(unsigned int irq, struct irqaction *act)
 	if (retval < 0)
 		return retval;
 
+	if (!act->affinity)
+		act->affinity = cpu_online_mask;
+
 	retval = __setup_irq(irq, desc, act);
 
 	if (retval)
-- 
2.47.3


             reply	other threads:[~2025-12-05  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05  9:18 Marc Zyngier [this message]
2025-12-10  0:53 ` [tip: irq/urgent] genirq: Allow NULL affinity for 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=20251205091814.3944205-1-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=danielt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox