From patchwork Wed Mar 27 13:26:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 10873487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F399139A for ; Wed, 27 Mar 2019 13:26:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 556FA28BC8 for ; Wed, 27 Mar 2019 13:26:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46E7E28BD9; Wed, 27 Mar 2019 13:26:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A9EAB28BC8 for ; Wed, 27 Mar 2019 13:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=e/sxRnT3vtFgTH2tqT0HkDTGC0yOjCW7j0c92MY9+ZM=; b=Z03 bMoNUFJ0Bf1TxtyFnMtGIfgI+f+lf5hKbs8SX8mKokqINrY2kcqgtxyPO9iRMeD73ehPexyudis5E CPm6roeY7FbDTd3QOuwGnjMWl3K9sKJKWZrU70rEXSTLVF2dr1E7QozBwY6EW9CnDnqIHj0PSLWnS LJOcQSMsT9CAUOVwb4U0uIl1/v7GwLipfz52Rx3Dydx6j+pepls18UVyUIRFTpE/2iWkP6vslZfGP 4yIgduZEQMKfA2DNnLAiLMCgpyqQSBwxx6DIQ/Flr2cmwEO8crUwQ8aXL7vefWj01InspkgvIa5jd s2eOgGNzfa4D8JAWy8i85X1uP03Wkdw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h98ZR-0007km-Mh; Wed, 27 Mar 2019 13:26:21 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h98ZN-0007jg-09 for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 13:26:20 +0000 Received: by mail-pf1-x443.google.com with SMTP id r15so9697592pfn.9 for ; Wed, 27 Mar 2019 06:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=oILi15K3yDk4aH7eGGoaYMjRq6qKlg8s8wzzm7angH8=; b=Lbk05K82bvOyRYQGXaptlOqbNT7KNVpsOvwBhPCoW2FDP7rsJqGnjA7ndK+vh+EqIx MOaIRvAvL+UUfqfyQA5gJcsRkBH6hkUmAuiq2i99tOQQHObX3fCYpCPZwUO8cY6OFESz mFIs/+oiFFI8ryEDs5pyvCQnPDCqtMNz10STbtv1R7RQF6+xHfRm4vVin1Eg2i7V4Uaf sUiBm3c5Tk6tsyxkS4CgYz8ebARvWqV4Im6hKzRJKMXFnH5uBn1J/lfh0dsyiOu4KmpM eH7F9zYZtu8+gabkZWZSEPET7PgBC+PTX2uSdJ0eve1mSwqtx9MZeg5Be16gtEs2zm/j b6TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oILi15K3yDk4aH7eGGoaYMjRq6qKlg8s8wzzm7angH8=; b=CkdVcUUbklpbcX3UYytHMuPv/sDrBdfoIh0qyonlDz1brfuBJ7fuYj9g2COLywz005 2LBerKOI72usQPoMr1a7Evsc5VtlTvfH8pNJ7xqJEFNagZnc5GSOvwDz8yFfEcSkOJ84 B0yKpQ1fCqsUPUV3WKu2sUy9VZyQS/SCNYobM0HtOJDqmzgWqV2QmNndYit/3tWgWfrG lq/4LKnFGwX2ReUPcPMlCBbB9QWZsvsUiRc8Tz+P3fY3z9tKBL6pIXUS+h8IfbO/FcXl y+225ys+JObjvHADQnmwg1VCWC1hL7rwh8kG1titdXJ1wb34WB3gaZW3Ou19fZGAEyS3 V73Q== X-Gm-Message-State: APjAAAX/wbXIfMt2/mgRbfrq9AQJk96X9PfOGNWqi3skcMWgr8Ru+xnZ WK1LkUJHqeExyJYxa5dOitPOmQ== X-Google-Smtp-Source: APXvYqw4hPQcxBowTBZ3eHx0WmGb/UZrJSVLxSQF0u5B0GKzOoxYFQcM2tuANTjeSptINVqMpIH6mg== X-Received: by 2002:aa7:8282:: with SMTP id s2mr17542115pfm.7.1553693173503; Wed, 27 Mar 2019 06:26:13 -0700 (PDT) Received: from localhost.localdomain (61-216-91-114.HINET-IP.hinet.net. [61.216.91.114]) by smtp.gmail.com with ESMTPSA id p86sm37968206pfa.104.2019.03.27.06.26.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Mar 2019 06:26:12 -0700 (PDT) From: Zhangfei Gao To: Jean-Philippe Brucker , Will Deacon , Hanjun Guo , Charles Garcia-Tobin , kenneth-lee-2012 , Wangzhou , guodong.xu@linaro.org Subject: [RFC PATCH] ACPI/IORT: Let pci_fixup_final access iommu_fwnode Date: Wed, 27 Mar 2019 21:26:05 +0800 Message-Id: <1553693165-7105-1-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190327_062617_046982_0BBFA087 X-CRM114-Status: GOOD ( 10.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhangfei Gao , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Using quirks to access dev->iommu_fwnode is required for those devices appear as PCI but are actually on the AMBA bus. dev->iommu_fwnode is allocated in iommu_fwspec_init, while it is too late for pci_fixup_final in drivers/pci/quirks.c So iort call pci_fixup_final after iommu_fwspec_init. Signed-off-by: Zhangfei Gao --- drivers/acpi/arm64/iort.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index e48894e..39d7212 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -1063,6 +1063,7 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) info.node = node; err = pci_for_each_dma_alias(to_pci_dev(dev), iort_pci_iommu_init, &info); + pci_fixup_device(pci_fixup_final, to_pci_dev(dev)); } else { int i = 0;