]> git.hungrycats.org Git - linux/commitdiff
thunderbolt: Initialize after IOMMUs
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 24 Sep 2018 10:20:45 +0000 (13:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:51:46 +0000 (14:51 +0100)
[ 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 <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thunderbolt/nhi.c

index f5a33e88e676160c4d4c1ca091ce3680a470207a..2d042150e41cb5d08601fe6a9dcb116c22da4205 100644 (file)
@@ -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);