From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38B3DECAAD8 for ; Fri, 16 Sep 2022 16:02:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D9CE84BCB; Fri, 16 Sep 2022 18:02:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="TiBygaZN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 25F7E84BDB; Fri, 16 Sep 2022 18:02:45 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 933EF84BD6 for ; Fri, 16 Sep 2022 18:02:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org 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 48FDAB80DA4; Fri, 16 Sep 2022 16:02:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAB49C433D7; Fri, 16 Sep 2022 16:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663344161; bh=uQ0l+tH4TIjf/gP25lhCyVCeaKJhNuirJQfP9NHp+fA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TiBygaZNJK3YKLulvlsVo4sbsoTGWIGMqrzwH2fKHsKL7LJejz+pNa29/WSqDqyvZ WN3Xos+A8Z4zS2QeKXER2MtAYVLiNfTUODXyK7ghOUY2SXCWCmXeGiOUOCldVNoOY6 Jxjs0MEflNxTjW4blSRHM0a880cOA383AL/V1hztse2iQMVpg5iTKz4E6TCY1rdtMS WiL6/iHzWII1lixdDHBn2bz606RDI21llPISbn2RYQ36HYlJp4YgN7zHLuWBBX2p1Y rVcRCv8NK3C70KnPITWPBBj/CF7iFewaEeD1ptN4y9BnoveCfx664b3hZ5PmCutoWL ym2+CcjFCUt7A== Date: Fri, 16 Sep 2022 18:02:36 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Stefan Roese , Mark Kettenis , Andre Przywara , u-boot@lists.denx.de Subject: Re: [PATCH] armv8: cache_v8: Fix pgtables setup when MMU is already enabled Message-ID: <20220916180236.0287721c@dellmb> In-Reply-To: <20220914113746.16701-1-pali@kernel.org> References: <20220914113746.16701-1-pali@kernel.org> X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Wed, 14 Sep 2022 13:37:46 +0200 Pali Roh=C3=A1r wrote: > When MMU is already enabled then dcache_enable() does not call mmu_setup() > and so setup_all_pgtables() is also never called. >=20 > In this situation when some driver calls mmu_set_region_dcache_behaviour() > function then U-Boot crashes with error message: >=20 > Emergency page table not setup. >=20 > Fix this issue by explicitly calling setup_all_pgtables() in dcache_enabl= e() > function near condition for mmu_setup(). >=20 > This change fixes chainloading U-Boot from U-Boot on Turris Mox board whi= ch > uses mvneta ethernet driver which calls mmu_set_region_dcache_behaviour(). >=20 > Signed-off-by: Pali Roh=C3=A1r Reviewed-by: Marek Beh=C3=BAn