Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2874086rwb; Mon, 15 Aug 2022 13:04:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5pw6/H8zRxL+/7zxqmZizVDx7ryyNzn55XFBdLyYEoyWlGzM/GxYgFXAkMpxK5+DYzrnTt X-Received: by 2002:a05:6402:11cf:b0:43d:fc84:c51a with SMTP id j15-20020a05640211cf00b0043dfc84c51amr15391478edw.80.1660593884877; Mon, 15 Aug 2022 13:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593884; cv=none; d=google.com; s=arc-20160816; b=YL26JW2LYf6V3ZxSxALxbhkoE92wySLPxD0Fbhy9ZhRsSDE7jdJuSsUydy8rMCxocP /f2UJ3a5e/Fa5MGpPg2CDeOmDuReLwi65zDWLkKHYybt+yXAeZPmUTD+HLU6aUKdZq6K /pQQpO4yT+2Z0KG2KsNi7vd7V3seM2ugLFmPbPufn8fd3l436Gpn8GP26b1RoCgLK4LG EItl50YuainSYpOHXxubYmnjxz8huKpvz0wee5/8lrkhTsFxWo0VU4SK3HMuoO1oXjP5 RwB8G7U4D/hYtlhkyyN6XVVVq3OsEeIT7gjlz2MbrdvV2NNmuoGinCXuOtA/LQRlsaek fNuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZerBGsfjkHv3oj+dE9WzTnYPTBamwJ/zYfRMX8kCBKM=; b=YHWS0Fi8yeEItAeoc29TneDasjY5sQUFy9s41ECsG67l4mx/jW7ASwOK2+cVGq26yW bwS/ALq+eH9qbfKgZlqHdZLfKaAzUIOLXi7FsDG9VFJO1h3w+qTGW0JTl2iMy1NNL/MG SKXVej9pnNj7acLn65ddpTyGoAq9aVfxMv3iw17sqCRBJnoXzzNvOf+l4ZmUc8icBFni 1vLxTyy3da/1DXnY+egPhVZVMtKDoQgWf7Ns2KSwT2uQ5aINOPRZCG51v70eJM4Z2guY rEwdi6Uvo+u7OHfmA7rRUdz3TRo4E0oGMQlPA36WH+SpFdP9gQyig/2cwU3GHwv2n9zZ aZfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lhluwB92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a1709065d0300b007317274bb0dsi9010729ejt.979.2022.08.15.13.04.19; Mon, 15 Aug 2022 13:04:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lhluwB92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242562AbiHOSjH (ORCPT + 99 others); Mon, 15 Aug 2022 14:39:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243531AbiHOSiX (ORCPT ); Mon, 15 Aug 2022 14:38:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C5D43C8FA; Mon, 15 Aug 2022 11:23:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9C83CB81062; Mon, 15 Aug 2022 18:23:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B22A8C43470; Mon, 15 Aug 2022 18:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587817; bh=Kuj2M50v7Es9mL0wqjafMAdtgSOCl8NrfZFfG2xdwaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lhluwB92tWLvpwfm7XHdHZ2rq/no9z8wA1i5ICXrKqiwhgSL2ICrLlp7EISW1XGRk L2bz0eApZdzI8lfPy2SUq/wD2krtrng6GF8xuM8KWSHEMCluCkhndtc0VlUR45x5QT DeshPXzI0w6ZmRlepAEpU+Cny9c4SDqHjltjCVx0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikko Perttunen , Yousaf Kaukab , Thierry Reding , Sasha Levin Subject: [PATCH 5.15 205/779] arm64: tegra: Mark BPMP channels as no-memory-wc Date: Mon, 15 Aug 2022 19:57:29 +0200 Message-Id: <20220815180346.035505502@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mikko Perttunen [ Upstream commit 61192a9d8a6367ae1b8234876941b037910a2459 ] The Tegra SYSRAM contains regions access to which is restricted to certain hardware blocks on the system, and speculative accesses to those will cause issues. Patch 'misc: sram: Only map reserved areas in Tegra SYSRAM' attempted to resolve this by only mapping the regions specified in the device tree on the assumption that there are no such restricted areas within the 64K-aligned area of memory that contains the memory we wish to map. Turns out this assumption is wrong, as there are such areas above the 4K pages described in the device trees. As such, we need to use the bigger hammer that is no-memory-wc, which causes the memory to be mapped as Device memory to which speculative accesses are disallowed. As such, the previous patch in the series, 'firmware: tegra: bpmp: do only aligned access to IPC memory area', is required with this patch to make the BPMP driver only issue aligned memory accesses as those are also required with Device memory. Fixes: fec29bf04994 ("misc: sram: Only map reserved areas in Tegra SYSRAM") Signed-off-by: Mikko Perttunen Reviewed-by: Yousaf Kaukab Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra194.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra234.dtsi | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index 8354512d7b1c..5b0bc9aa1a42 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra186.dtsi @@ -1583,6 +1583,7 @@ sram@30000000 { #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x30000000 0x50000>; + no-memory-wc; cpu_bpmp_tx: sram@4e000 { reg = <0x4e000 0x1000>; diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi index a56fb83839a4..ca71b71d801a 100644 --- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi @@ -2249,6 +2249,7 @@ sram@40000000 { #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x40000000 0x50000>; + no-memory-wc; cpu_bpmp_tx: sram@4e000 { reg = <0x4e000 0x1000>; diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index 144a7eb699a7..2b4784572220 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -128,6 +128,7 @@ sram@40000000 { #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x0 0x40000000 0x80000>; + no-memory-wc; cpu_bpmp_tx: sram@70000 { reg = <0x70000 0x1000>; -- 2.35.1