From nobody Thu Sep 18 14:11:48 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 9ADDEC4332F for ; Mon, 5 Dec 2022 18:28:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233117AbiLES2C (ORCPT ); Mon, 5 Dec 2022 13:28:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232529AbiLESZU (ORCPT ); Mon, 5 Dec 2022 13:25:20 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD69720BD9; Mon, 5 Dec 2022 10:25:19 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264718; 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=jnTPAmVkRX47X4tNAaZo4ayXISHWGUMFEs/s/a5HNBc=; b=RLcUcHwmw2xPCUdqfF8xzbq0SXoH1JZUhHJsvPRLC5h30nlzBH3/oezy3OlDGe0lEMk9Ts Fkbr++oxSAZ8dm7SMB4VNyYFrYdVj8LwiBgN029nmY4YZJDa6ZiSfQq/gZ5Nrc13n4BTpC nhfdosgQq+5GZXyG8/Kk9U+j9emPTBi92+rMiFtW4q/HbaBbNr3HNxQMxx6GVmlPB9sQY9 Vec46t7TjrWuuNu47G2/pZp08p9j1qHDQLoB2MhYFI5JQk/fy+3hpUYezzlYcZ/zGKWV2A SpyG17xuuHN914PORztTRGq3GrJ4+mwUldEwKH55Je4UPHHOTCS1an5m9EqDgA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264718; 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=jnTPAmVkRX47X4tNAaZo4ayXISHWGUMFEs/s/a5HNBc=; b=wqU+S9/eYp9PRLp0Yd/lDlNZxPOH3e37u7YwhScPgzo8o0XDHq6Hoj8S4sCgaalTXuLq7c l1r33hdGeGQBdaBQ== 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] bus: fsl-mc-msi: Switch to domain id aware interfaces Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124230314.575538524@linutronix.de> References: <20221124230314.575538524@linutronix.de> MIME-Version: 1.0 Message-ID: <167026471790.4906.17520351418938687087.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: 46a2bc8c7092cf277fb486c0629894ed904984a4 Gitweb: https://git.kernel.org/tip/46a2bc8c7092cf277fb486c0629894ed9= 04984a4 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:24:40 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:21:00 +01:00 bus: fsl-mc-msi: Switch to domain id aware interfaces Switch to the new domain id aware interfaces to phase out the previous ones. Get rid of the MSI descriptor and domain checks as the core code detects these issues anyway. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230314.575538524@linutronix.de --- drivers/bus/fsl-mc/fsl-mc-msi.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-msi.c b/drivers/bus/fsl-mc/fsl-mc-ms= i.c index 0cfe859..f3f8af9 100644 --- a/drivers/bus/fsl-mc/fsl-mc-msi.c +++ b/drivers/bus/fsl-mc/fsl-mc-msi.c @@ -213,21 +213,8 @@ struct irq_domain *fsl_mc_find_msi_domain(struct devic= e *dev) =20 int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_cou= nt) { - struct irq_domain *msi_domain; - int error; - - msi_domain =3D dev_get_msi_domain(dev); - if (!msi_domain) - return -EINVAL; - - error =3D msi_setup_device_data(dev); - if (error) - return error; + int error =3D msi_setup_device_data(dev); =20 - msi_lock_descs(dev); - if (msi_first_desc(dev, MSI_DESC_ALL)) - error =3D -EINVAL; - msi_unlock_descs(dev); if (error) return error; =20 @@ -235,7 +222,7 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, u= nsigned int irq_count) * NOTE: Calling this function will trigger the invocation of the * its_fsl_mc_msi_prepare() callback */ - error =3D msi_domain_alloc_irqs(msi_domain, dev, irq_count); + error =3D msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, irq_cou= nt - 1); =20 if (error) dev_err(dev, "Failed to allocate IRQs\n"); @@ -244,11 +231,5 @@ int fsl_mc_msi_domain_alloc_irqs(struct device *dev, = unsigned int irq_count) =20 void fsl_mc_msi_domain_free_irqs(struct device *dev) { - struct irq_domain *msi_domain; - - msi_domain =3D dev_get_msi_domain(dev); - if (!msi_domain) - return; - - msi_domain_free_irqs(msi_domain, dev); + msi_domain_free_irqs_all(dev, MSI_DEFAULT_DOMAIN); }