Return-Path: From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.18 071/100] thunderbolt: Initialize after IOMMUs Date: Tue, 16 Oct 2018 00:11:52 -0400 Message-Id: <20181016041221.135528-71-sashal@kernel.org> In-Reply-To: <20181016041221.135528-1-sashal@kernel.org> References: <20181016041221.135528-1-sashal@kernel.org> List-ID: From: Mika Westerberg [ Upstream commit eafa717bc145963c944bb0a64d16add683861b35 ] If IOMMU is enabled and Thunderbolt driver is built into the kernel image, it will be probed before IOMMUs are attached to the PCI bus. Because of this DMA mappings the driver does will not go through IOMMU and start failing right after IOMMUs are enabled. For this reason move the Thunderbolt driver initialization happen at rootfs level. Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/thunderbolt/nhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index f5a33e88e676..2d042150e41c 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -1147,5 +1147,5 @@ static void __exit nhi_unload(void) tb_domain_exit(); } -fs_initcall(nhi_init); +rootfs_initcall(nhi_init); module_exit(nhi_unload); -- 2.17.1