From ac6bbf0cdf4206c517ac9789814c23e372ebce4d Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 9 Jul 2018 09:41:52 -0600 Subject: iommu: Remove IOMMU_OF_DECLARE Now that we use the driver core to stop deferred probe for missing drivers, IOMMU_OF_DECLARE can be removed. This is slightly less optimal than having a list of built-in drivers in that we'll now defer probe twice before giving up. This shouldn't have a significant impact on boot times as past discussions about deferred probe have given no evidence of deferred probe having a substantial impact. Cc: Robin Murphy Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Rob Clark Cc: Heiko Stuebner Cc: Frank Rowand Cc: linux-arm-kernel@lists.infradead.org Cc: iommu@lists.linux-foundation.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org Acked-by: Will Deacon Acked-by: Marek Szyprowski Acked-by: Joerg Roedel Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/of_iommu.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'drivers/iommu/of_iommu.c') diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 78ddf47dd67a..f7787e757244 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -27,9 +27,6 @@ #define NO_IOMMU 1 -static const struct of_device_id __iommu_of_table_sentinel - __used __section(__iommu_of_table_end); - /** * of_get_dma_window - Parse *dma-window property and returns 0 if found. * @@ -98,19 +95,6 @@ int of_get_dma_window(struct device_node *dn, const char *prefix, int index, } EXPORT_SYMBOL_GPL(of_get_dma_window); -static bool of_iommu_driver_present(struct device_node *np) -{ - /* - * If the IOMMU still isn't ready by the time we reach init, assume - * it never will be. We don't want to defer indefinitely, nor attempt - * to dereference __iommu_of_table after it's been freed. - */ - if (system_state >= SYSTEM_RUNNING) - return false; - - return of_match_node(&__iommu_of_table, np); -} - static int of_iommu_xlate(struct device *dev, struct of_phandle_args *iommu_spec) { @@ -120,8 +104,7 @@ static int of_iommu_xlate(struct device *dev, ops = iommu_ops_from_fwnode(fwnode); if ((ops && !ops->of_xlate) || - !of_device_is_available(iommu_spec->np) || - (!ops && !of_iommu_driver_present(iommu_spec->np))) + !of_device_is_available(iommu_spec->np)) return NO_IOMMU; err = iommu_fwspec_init(dev, &iommu_spec->np->fwnode, ops); -- cgit