From nobody Thu Sep 18 14:11:35 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BF2CC4332F for ; Mon, 5 Dec 2022 18:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232924AbiLES1Q (ORCPT ); Mon, 5 Dec 2022 13:27:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232463AbiLESZT (ORCPT ); Mon, 5 Dec 2022 13:25:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2C320F52; Mon, 5 Dec 2022 10:25:18 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264716; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7XrkqEXK++v8CUKFEcz/xwkxbE6fFLQhXnmRSphJvL8=; b=hwRPErUyGZ5BozB0dtj9EvdvJz6S2s9LALOLgpIS2ITZMg55C7eQJUzi49fR6tOoMia52c 1Jd7bqbiZDIRE4UP3+bxqANaZFL7SNvyk2DunjNluu0tIgDGBaxdbDQWiK4UTwA96tTMOs 5OJthlOkkxZWfSsAzsQPv/7l1xO15LUHpzKxKd/1OHDkUOmcCLG+8Xe2Tg7sZtY2sVOyZL GhMtOOj0hyMt2B/RJVZBJSSzviNqzF3d39sTLZ4DrPxSbzbtL9JNyhxldAHhW1lSfUIsgU 5tP40vhf4ULEDtwNc+RxdTSZuRPa+V7Gey1rvHIJEggD9yNIyOj7TnMuKlCHOw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264716; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7XrkqEXK++v8CUKFEcz/xwkxbE6fFLQhXnmRSphJvL8=; b=va2yoTmSD3poYzPrcMZrPYHDhhBwgplnKZpMqKZEVnVMtvt+hm72aPWDRb6g9huXkyIdUm Tby5F3CDH70FC0BQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq/msi: Split msi_create_irq_domain() Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124232325.559086358@linutronix.de> References: <20221124232325.559086358@linutronix.de> MIME-Version: 1.0 Message-ID: <167026471622.4906.12099453928840073878.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: a80c0aceeaffdb3afe9536fe747480e85841da7f Gitweb: https://git.kernel.org/tip/a80c0aceeaffdb3afe9536fe747480e85= 841da7f Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:25:52 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:21:01 +01:00 genirq/msi: Split msi_create_irq_domain() Split the functionality of msi_create_irq_domain() so it can be reused for creating per device irq domains. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.559086358@linutronix.de --- kernel/irq/msi.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 0a38905..0f7fe56 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -758,17 +758,10 @@ static void msi_domain_update_chip_ops(struct msi_dom= ain_info *info) chip->irq_set_affinity =3D msi_domain_set_affinity; } =20 -/** - * msi_create_irq_domain - Create an MSI interrupt domain - * @fwnode: Optional fwnode of the interrupt controller - * @info: MSI domain info - * @parent: Parent irq domain - * - * Return: pointer to the created &struct irq_domain or %NULL on failure - */ -struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, - struct msi_domain_info *info, - struct irq_domain *parent) +static struct irq_domain *__msi_create_irq_domain(struct fwnode_handle *fw= node, + struct msi_domain_info *info, + unsigned int flags, + struct irq_domain *parent) { struct irq_domain *domain; =20 @@ -787,7 +780,7 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_= handle *fwnode, if (info->flags & MSI_FLAG_USE_DEF_CHIP_OPS) msi_domain_update_chip_ops(info); =20 - domain =3D irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0, + domain =3D irq_domain_create_hierarchy(parent, flags | IRQ_DOMAIN_FLAG_MS= I, 0, fwnode, &msi_domain_ops, info); =20 if (domain) { @@ -800,6 +793,21 @@ struct irq_domain *msi_create_irq_domain(struct fwnode= _handle *fwnode, } =20 /** + * msi_create_irq_domain - Create an MSI interrupt domain + * @fwnode: Optional fwnode of the interrupt controller + * @info: MSI domain info + * @parent: Parent irq domain + * + * Return: pointer to the created &struct irq_domain or %NULL on failure + */ +struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, + struct msi_domain_info *info, + struct irq_domain *parent) +{ + return __msi_create_irq_domain(fwnode, info, 0, parent); +} + +/** * msi_parent_init_dev_msi_info - Delegate initialization of device MSI in= fo down * in the domain hierarchy * @dev: The device for which the domain should be created