From nobody Fri Dec 19 15:48:17 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEF34329E4B for ; Fri, 5 Dec 2025 09:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764926300; cv=none; b=dyk3lo+CFzzm3cmHR1MaiiQGaqp+45Rjhr0kBty75iOdxupzxpim/URWNEL2LdHogx1gttTBfULyQC2aYL1O4Vu9irJ4pg2haJhJuxde+lzWCkuUBh808cMVQC+/W9GsToDtqniNaO6WuZOr8itC61vRufmOEulrtcbRUY1YYK4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764926300; c=relaxed/simple; bh=WRPcjnwwAgtVqlwCdAf7p2nc60aHanj56eyZnMj3bDk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QHYQ4CTwdar+ZtVoWPO/KQDcYanSqFCSRfCsa2XABTPV3Y+YdTia5Q93TqXSNpTRXnSN4Hn2HvI8pVJ2nNTCdhl7+8VMEIUZscVtjSom/GyFaj2GT9jgsDDiMEY0dOnWhZH4yh6ZmySQxlf0g3bAyWde2ARZBxc9EyFT+gOA+4o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BNMUp6zm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BNMUp6zm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4573AC4CEF1; Fri, 5 Dec 2025 09:18:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764926299; bh=WRPcjnwwAgtVqlwCdAf7p2nc60aHanj56eyZnMj3bDk=; h=From:To:Cc:Subject:Date:From; b=BNMUp6zmPxhYSfVbMF0PVQVufKVVNStcptunCvNoAve2hFlyzJ7OOiYBlptDqfoSG QgiEJlXAWy6HTrB4zbX4JzV+iVyMUa50M7NTJuG+pj/1d+J4WxtiowzKYoFV0SXwKr L81EyZyihUXAzeF7YfC/CSIJsmn+sG+acyaC5e8u9H5kt4v35X6ExWsIEsf0WGx2m6 MPa5RjhfJc3EkrKO/vUN9O5hh0QOppmNh1N5MVmE4d8E2umUysEy1GcHM1u1Cwcy7U 6iM4ZIDWtFtLX453mMfBMSUj3PT4zlT+HLnV0+UNovQtG0W5OtnTlfWfNiOuH0nbtr vHDPQp0HUUWdg== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vRRxA-0000000Afuk-3bpB; Fri, 05 Dec 2025 09:18:17 +0000 From: Marc Zyngier To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Daniel Thompson Subject: [PATCH] genirq: Allow NULL affinity for setup_percpu_irq() Date: Fri, 5 Dec 2025 09:18:14 +0000 Message-ID: <20251205091814.3944205-1-maz@kernel.org> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, danielt@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" 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 Closes: https://lore.kernel.org/r/aTFozefMQRg7lYxh@aspen.lan Fixes: bdf4e2ac295fe ("genirq: Allow per-cpu interrupt sharing for non-over= lapping affinities") Signed-off-by: Marc Zyngier --- 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 irqacti= on *act) if (retval < 0) return retval; =20 + if (!act->affinity) + act->affinity =3D cpu_online_mask; + retval =3D __setup_irq(irq, desc, act); =20 if (retval) --=20 2.47.3