From patchwork Tue Jun 23 19:54:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F4E7C433DF for ; Tue, 23 Jun 2020 21:33:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09FC320724 for ; Tue, 23 Jun 2020 21:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592948009; bh=NuAnyTdf95lzlFykEHITVxL8KYiuOHKxR0zlx7ulsG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TfwgrooGAytUZyjmriTyNpaNN40CWQSSJiG2N4URJRdfwDvZelNV0DRisSbdw6uqP 42zEdugBjJQ4aCIS3ektasgXI3V2j1Ftk5gdkXoRHCNIAzZUmHRTJFHrsUJjShdUcC MOkd9fZassqMtUjYEL7HqPNaQn0t40dqajD5c/k0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388286AbgFWULa (ORCPT ); Tue, 23 Jun 2020 16:11:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:52810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388897AbgFWUL1 (ORCPT ); Tue, 23 Jun 2020 16:11:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB9C3206C3; Tue, 23 Jun 2020 20:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943087; bh=NuAnyTdf95lzlFykEHITVxL8KYiuOHKxR0zlx7ulsG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oGcxHyXWQ6epDSGpZ/A/UVG7uhm1vbKqGVGqtFW+JL/Rt1LZEQiaxQKo0X9uLI4Qr 0qhFHDRrB5BIFdP80SKeWrwB1IQWxN7iTO9B09KjwgnCSkaqErSIKOLUOhzdud6T6g Qtngh208pRtbH8b8XtEvK/I5DiUo6bWeA7CCtOKM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Lorenzo Pieralisi , Jingoo Han , Sasha Levin Subject: [PATCH 5.7 254/477] PCI: dwc: Fix inner MSI IRQ domain registration Date: Tue, 23 Jun 2020 21:54:11 +0200 Message-Id: <20200623195419.579441664@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195407.572062007@linuxfoundation.org> References: <20200623195407.572062007@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Zyngier [ Upstream commit 0414b93e78d87ecc24ae1a7e61fe97deb29fa2f4 ] On a system that uses the internal DWC MSI widget, I get this warning from debugfs when CONFIG_GENERIC_IRQ_DEBUGFS is selected: debugfs: File ':soc:pcie@fc000000' in directory 'domains' already present! This is due to the fact that the DWC MSI code tries to register two IRQ domains for the same firmware node, without telling the low level code how to distinguish them (by setting a bus token). This further confuses debugfs which tries to create corresponding files for each domain. Fix it by tagging the inner domain as DOMAIN_BUS_NEXUS, which is the closest thing we have as to "generic MSI". Link: https://lore.kernel.org/r/20200501113921.366597-1-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han Signed-off-by: Sasha Levin --- drivers/pci/controller/dwc/pcie-designware-host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index 395feb8ca0512..3c43311bb95c6 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -264,6 +264,8 @@ int dw_pcie_allocate_domains(struct pcie_port *pp) return -ENOMEM; } + irq_domain_update_bus_token(pp->irq_domain, DOMAIN_BUS_NEXUS); + pp->msi_domain = pci_msi_create_irq_domain(fwnode, &dw_pcie_msi_domain_info, pp->irq_domain);