From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E201CCD199 for ; Mon, 20 Oct 2025 12:30:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MP6y5Mnu8H1oZgrt/jNBKTcXDUnKd1DtbgtjwmbKaoE=; b=YASYrm99rTwPIp9y/+MQDmFtKl VZzub1zuZNJeyTb53AqqU/UiJSVtEFeiknyWZavCJcHd8AoRowbWo7tgkN+rNLlAueP8tAbCFuFek G4eNXQWClVJvgGWMf9twBKNoctzoWZ04KY2s8AMvGjcoOdzbgi4iYhg0GhM9vJG29P6dgm3+yNyEN z76NHT75b9cbYngXUuPhTpvr3Np9/hDeF/i7CpMWeCm8GVugxY4t83KAp14UBkFsXzpPG2/4SXGTV GeBH4NDF0CBAMMHJGHAAHDjGtbDie4itIyovye5vz/JgutWyagl7qGY7h9uluOXBbZl+s+9FmSCR8 Ejr3A5eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vAp1p-0000000DR93-0agd; Mon, 20 Oct 2025 12:30:21 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vAp1j-0000000DQyc-2PsK for linux-arm-kernel@lists.infradead.org; Mon, 20 Oct 2025 12:30:15 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id B933661ED7; Mon, 20 Oct 2025 12:30:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64FB4C4CEF9; Mon, 20 Oct 2025 12:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760963414; bh=oqk3bWnV63Av2DQTlB+h2XdFTNKY9wTJHCjcd1AWrDM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kA/9vGx+DnBcwLaW2vU4NgSiYx7JB+MQqwoUadNfYchgOUrPpUsRrImcKdGV014p3 lw1AcCZPPaKBLL5VKtu7tGSZoFeK4ycQfkZKXnkCqs5rlsWRUsvtzmhKgVL9J4keYl OD7/Hn37LcLLEkQE13gzbKq07daVouFziGbtCf+MndDoLDTFYU3ir2dnsiLYZpPt0/ o/Eya/SkZMGM8DxPgcULI4pY6MtRNAh6ZT5dHlj2cl9svcOu6wgKTBQLoPXKCjMVbY 5x7nIIcc7YpeUT0fldtujEoZmHAnWLA3/bMh7CKR9sI98ZBVekS0yeEE2AgUejrV2M 0gOsabYUF2Jag== 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 1vAp1g-0000000FUu2-28CJ; Mon, 20 Oct 2025 12:30:12 +0000 From: Marc Zyngier To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Cc: Thomas Gleixner , Mark Rutland , Will Deacon , "Rafael J. Wysocki" , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , Sven Peter , Janne Grunau , Suzuki K Poulose , James Clark , Jonathan Cameron , Jinjie Ruan , Alexandru Elisei Subject: [PATCH v4 17/26] genirq: Add request_percpu_irq_affinity() helper Date: Mon, 20 Oct 2025 13:29:34 +0100 Message-ID: <20251020122944.3074811-18-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251020122944.3074811-1-maz@kernel.org> References: <20251020122944.3074811-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, tglx@linutronix.de, mark.rutland@arm.com, will@kernel.org, rafael@kernel.org, robh@kernel.org, saravanak@google.com, gregkh@linuxfoundation.org, sven@kernel.org, j@jannau.net, suzuki.poulose@arm.com, james.clark@linaro.org, jonathan.cameron@huawei.com, ruanjinjie@huawei.com, alexandru.elisei@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org While it would be nice to simply make request_percpu_irq() take an affinity mask, the churn is likely to be on the irritating side given that most drivers do not give a damn about affinities. So take the more innocuous path to provide a helper that parallels request_percpu_irq(), with an affinity as a bonus argument. Yes, request_percpu_irq_affinity() is a bit of a mouthful. Tested-by: Will Deacon Signed-off-by: Marc Zyngier --- include/linux/interrupt.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 81506ab759b81..fa62ab556ee32 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -196,6 +196,15 @@ request_percpu_irq(unsigned int irq, irq_handler_t handler, 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); +} + extern int __must_check request_percpu_nmi(unsigned int irq, irq_handler_t handler, const char *name, const struct cpumask *affinity, void __percpu *dev_id); -- 2.47.3