From patchwork Thu Jul 18 07:58:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13736159 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 2E549C3DA49 for ; Thu, 18 Jul 2024 07:58:49 +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: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:In-Reply-To:References:List-Owner; bh=jlDWu2PTIVOz2e1/63XciZzoCzGOT7QvRQA3fUK+5Aw=; b=F68m3YuENwey1nESP6qXDjtCmb Cx/3AK/3BWoEnEeU1vC73tNxsTNkJMq+BQHFwBFZsBuj/VhJoFGbvWlvwXwTbCEkI9Dqi6jPeLLta VF3skFKIm2QpGEeMX9JxCCMesxuVlCe+bFFE3ntDTaHkSKyXX73DVXW7SuzI3QYMZHpDZLm3BE2Z9 bPuJjQcWpgeyxtj0W77celhxxGnhP+S8rkud0Zsovr4t2+fOm7Ibu1VLTMAYhoNMc4vFLw0pyKJWY HpDu224mW+e6AXm3inEE4rJZ8opfT+jwbaMYsdBaqFlrWXEcwb89gHwnEn59Cjn34zS/a1myDFC7c Iw+397zA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUM29-0000000GJP3-2HfR; Thu, 18 Jul 2024 07:58:37 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUM1n-0000000GJLi-3ohT for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2024 07:58:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2FAB8CE1931; Thu, 18 Jul 2024 07:58:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 705B7C116B1; Thu, 18 Jul 2024 07:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721289493; bh=5Cr0TJvimg84EMVSwZmi3ZpTnXbIinN5xh5boa364W8=; h=From:To:Cc:Subject:Date:From; b=cPQKVilWWtIzpovXuqpfr0IGoziiRoRgIwXm2j14m49y+rRmCamZj2kT62viT0QK/ jvBvM+0kbfY8KncCQZsDGjJsBsXNfYD7eSeB6dPQFUMbKSk2a9EP4qpa+kVLjfPVcq VblTVkLubw6tvPwRWWOBdnluZ3zepxI4QsxVU7Cv2yfTm9im1kv55gX9VTE8Uo1+UQ r3pPFnJyrXi7CX0BdEPOmCwwo/Jsq05xETsHZyEqDLnlDyAS8r0UJCOE2evZFhXlNi oCGUiDhuVlIVOx4DFyZJHjkQL8beYOpzFC2YJgRiDof4xaPvlu+ga1JOZiQzH939Px FpJhRBo78/Bqg== 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.95) (envelope-from ) id 1sUM1i-00DNHo-WE; Thu, 18 Jul 2024 08:58:11 +0100 From: Marc Zyngier To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Thomas Gleixner Subject: [PATCH] irqchip/gic-v3-its: Correctly fish out the DID for platform MSI Date: Thu, 18 Jul 2024 08:58:04 +0100 Message-Id: <20240718075804.2245733-1-maz@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240718_005816_149923_AF664C9D X-CRM114-Status: GOOD ( 14.87 ) 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 Similarly to what we do for PCI where msi-map/msi-mask are used to compute the full RID (aka DID in ITS speak), we use msi-parent as the discovery mechanism, since there is no way a device can generally express its ID. However, since we switched to a per-device MSI domain model, the domain passed to its_pmsi_prepare() is the wrong one, and points to the device's instead of the ITS'. Bad. Use the parent domain instead, which is the ITS domain. Fixes: 80b63cc1cc146 ("irqchip/gic-v3-its: Switch platform MSI to MSI parent") Signed-off-by: Marc Zyngier Cc: Thomas Gleixner --- drivers/irqchip/irq-gic-v3-its-msi-parent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its-msi-parent.c b/drivers/irqchip/irq-gic-v3-its-msi-parent.c index 2f3fc597331ba..e150365fbe892 100644 --- a/drivers/irqchip/irq-gic-v3-its-msi-parent.c +++ b/drivers/irqchip/irq-gic-v3-its-msi-parent.c @@ -134,7 +134,7 @@ static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev, int ret; if (dev->of_node) - ret = of_pmsi_get_dev_id(domain, dev, &dev_id); + ret = of_pmsi_get_dev_id(domain->parent, dev, &dev_id); else ret = iort_pmsi_get_dev_id(dev, &dev_id); if (ret)