From patchwork Thu May 2 13:27:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 10926835 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 6C49B14DB for ; Thu, 2 May 2019 13:27:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 570A82873E for ; Thu, 2 May 2019 13:27:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54FFE287E9; Thu, 2 May 2019 13:27:41 +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 E23B52875F for ; Thu, 2 May 2019 13:27:40 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=YaqQ28b5MJ7RGkXyzHsqwPOIH/3kviZ2f9nWyUoFjKI=; b=eb0TdNd9mdX+gR 2Dxk7LGByNqpo9MQQApgvLuIbai6yhXzKdwJR52XlBLux2OFtmQHubdbiX3G6wbob/zC55FMgzFB5 HsjzR/qc8YyOlY237IugJOF/BKoFxqsYfoA9P5f0+JkoRBqTN4jWiChM56e7rOBsOyUsH6wZLuC89 NGk9spGRWs5kSl8X8/4L1/zLAebbdjrBVCb+2z6vTNbfxEKXFksciL9zsh87k0a0av2ap/NqyHX9m 4MYHpRRMGmb0QRclRKpAUGsufspxjx334kk165winTnj0wGaV0zTNzoS5+LNXu5p7N5ZaiXsdCO/4 M7cymjGEqhRcO5QHxm5Q==; 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 1hMBkS-00082y-6s; Thu, 02 May 2019 13:27:40 +0000 Received: from hqemgate14.nvidia.com ([216.228.121.143]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMBkO-00082V-Tc for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2019 13:27:38 +0000 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 02 May 2019 06:27:42 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 02 May 2019 06:27:35 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 02 May 2019 06:27:35 -0700 Received: from HQMAIL112.nvidia.com (172.18.146.18) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 2 May 2019 13:27:35 +0000 Received: from HQMAIL106.nvidia.com (172.18.146.12) by HQMAIL112.nvidia.com (172.18.146.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 2 May 2019 13:27:34 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 2 May 2019 13:27:34 +0000 Received: from moonraker.nvidia.com (Not Verified[10.21.132.148]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7, 5, 8, 10121) id ; Thu, 02 May 2019 06:27:34 -0700 From: Jon Hunter To: Thierry Reding Subject: [PATCH] arm64: tegra: Fix insecure SMMU users for Tegra186 Date: Thu, 2 May 2019 14:27:21 +0100 Message-ID: <1556803641-22305-1-git-send-email-jonathanh@nvidia.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1556803662; bh=+aH9/Je9oFGA1kQ26AoBccTyj0n7RzynDWAo6IIw0uo=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Type; b=MrrZGV6GGhCihPEZUmAQEk1/QgOXSU4J37gY/lv0pEz4teBo9ymsaMICxlLujHrxU e16YA4xfXy66wofgDPMHnxXkYFDu84JPnPL6Q1EZPKfxMERoV0JJbCKKsIM3NL6fuQ Eg7Lme76Txm4gRuzMJDHE9UdRIkm9XqSTPnn3N0N7S8ET2ibSOUdsBuF67qRkKoCI6 NnWQA/JMCI5wjWhY4/5VMK+uHhDBTnu7P6gcIZylL36uY4nCNiZGs960x5DaHOJGU2 ZD1D3jCa7VYK1GV0ge5MEfdbTwnEBX+eDOz78SanKQFje8vribhkfe8y3RI4MwNCkx CIqeC0Getfp9A== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190502_062736_972379_6EB60837 X-CRM114-Status: UNSURE ( 9.86 ) X-CRM114-Notice: Please train this message. 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: Mark Rutland , devicetree@vger.kernel.org, Will Deacon , Douglas Anderson , Jonathan Hunter , Rob Herring , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 From: Jonathan Hunter Commit 954a03be033c ("iommu/arm-smmu: Break insecure users by disabling bypass by default") intentionally breaks all devices using the SMMU in bypass mode. This is breaking various devices on Tegra186 which include the ethernet, BPMP and HDA device. Fix this by populating the SMMU node for these devices with their stream ID. Fixes: 954a03be033c ("iommu/arm-smmu: Break insecure users by disabling bypass by default") Signed-off-by: Jonathan Hunter --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index f0bb6ced4976..3fb60f6f3a93 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra186.dtsi @@ -60,6 +60,7 @@ clock-names = "master_bus", "slave_bus", "rx", "tx", "ptp_ref"; resets = <&bpmp TEGRA186_RESET_EQOS>; reset-names = "eqos"; + iommus = <&smmu TEGRA186_SID_EQOS>; status = "disabled"; snps,write-requests = <1>; @@ -338,6 +339,7 @@ <&bpmp TEGRA186_RESET_HDA2CODEC_2X>; reset-names = "hda", "hda2hdmi", "hda2codec_2x"; power-domains = <&bpmp TEGRA186_POWER_DOMAIN_DISP>; + iommus = <&smmu TEGRA186_SID_HDA>; status = "disabled"; }; @@ -1158,6 +1160,7 @@ bpmp: bpmp { compatible = "nvidia,tegra186-bpmp"; + iommus = <&smmu TEGRA186_SID_BPMP>; mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>; shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;