Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1662038imm; Mon, 3 Sep 2018 06:21:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYCAVpHEpPAtCk5fBNrYdGNbk72Cjz8pkvtaSt0Pgb/ZpWt5RzztH97NZ0EZoUIRowzLaBx X-Received: by 2002:a65:5c4b:: with SMTP id v11-v6mr25663937pgr.98.1535980902830; Mon, 03 Sep 2018 06:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535980902; cv=none; d=google.com; s=arc-20160816; b=KcOJph4BsGCHJb8Q/lBg0jTWtDv6JBsaQk+7GiiJ96ttnX2JRsnJiuUDVzfYCu1qZz YjBQsbv6ocztUoMk6r0mLVXgvk+8R8X3o8IWCE8zAJMd1zEzUGaSljPv2fwRGsg13a3Q OHOH8azqbIQqDZKzhjvANZh5q7DVTkeQD6Dcpd5w0UPa4Jz9MwdLOz2ELO1NSS8g2L47 eEv11SskopUyZz7mhzcHU3vhqnpp/sXvD4LFyeDqxmJj78wFFmVNaUn+48JZdNAbQI2C wmkiIdi63hkENldbDpjzC/06tVA3WEpAibXEzht5yoAgTyo0yZ4Oi/GLtfngZSrQuYk/ hEzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=uX1Wn+rmEeljH/Itli1+MPLEyWn8++p6QNikYNm9VtE=; b=t8ORGeFkKumJzmTKSspJsLcH6XupLWWC0jTunZBQD1WFMiV2DimWIM+pjx9iCG6GNO nopNO2dg7nOdon3G1rDQEYFoIc0stzVnnKL1921sRbybkFKunYIOUs5joA7LTcjz/2ic +jbslWNwbxzGewsKF25LAzvcQTfLVNb01hvrmVjQy7FwDft+knxREHE+JJpddhyYP3kt wQgc/1HrML8YVXs7LcYT6p7cN1NxGMg6CrXE7A8dCIIpmVNR56IZq8bpl/NgHBqBSEZK OhSGTG2iVRmH7MjCwNUd0uUNv0cobCd5Z71oWsWJbXRFDu47ovnpR2OnOEYcWUEe3jrb IZ9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t22-v6si17405601pgj.546.2018.09.03.06.21.28; Mon, 03 Sep 2018 06:21:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727255AbeICRkX (ORCPT + 99 others); Mon, 3 Sep 2018 13:40:23 -0400 Received: from mga14.intel.com ([192.55.52.115]:6971 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbeICRkX (ORCPT ); Mon, 3 Sep 2018 13:40:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 06:20:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,325,1531810800"; d="scan'208";a="259449140" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 03 Sep 2018 06:20:13 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 77B7FBB; Mon, 3 Sep 2018 16:20:12 +0300 (EEST) From: Mika Westerberg To: linux-kernel@vger.kernel.org Cc: Andreas Noever , Michael Jamet , Mika Westerberg , Yehezkel Bernat , Lukas Wunner , Lu Baolu Subject: [PATCH 2/2] thunderbolt: Initialize after IOMMUs Date: Mon, 3 Sep 2018 16:20:12 +0300 Message-Id: <20180903132012.23531-2-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903132012.23531-1-mika.westerberg@linux.intel.com> References: <20180903132012.23531-1-mika.westerberg@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 88cff05a1808..5cd6bdfa068f 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -1191,5 +1191,5 @@ static void __exit nhi_unload(void) tb_domain_exit(); } -fs_initcall(nhi_init); +rootfs_initcall(nhi_init); module_exit(nhi_unload); -- 2.18.0