From nobody Sun Dec 14 06:16:08 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DED75C00140 for ; Mon, 15 Aug 2022 18:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242407AbiHOSjI (ORCPT ); Mon, 15 Aug 2022 14:39:08 -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-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D <1>; #size-cells =3D <1>; ranges =3D <0x0 0x0 0x30000000 0x50000>; + no-memory-wc; =20 cpu_bpmp_tx: sram@4e000 { reg =3D <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 =3D <1>; #size-cells =3D <1>; ranges =3D <0x0 0x0 0x40000000 0x50000>; + no-memory-wc; =20 cpu_bpmp_tx: sram@4e000 { reg =3D <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 =3D <1>; #size-cells =3D <1>; ranges =3D <0x0 0x0 0x40000000 0x80000>; + no-memory-wc; =20 cpu_bpmp_tx: sram@70000 { reg =3D <0x70000 0x1000>; --=20 2.35.1