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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 171F6C433EF for ; Fri, 4 Mar 2022 18:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NXH1OEBIV+jSQRDnjyFI726ZRkj3XDh08S0XjppWrDA=; b=pa+4SODlVMvUJm X+ulJgBcQx0DGwV+nKrN0tQKQJu77DNlRCqKnRYmlEVIB2IRYGmcoO713GcbX8UVTLanjZRzZDZmd Y/hU25SN/H59k7TH438QyfMmhG1xf390pdPRQghu92IMwGKaPRf14Eu55L2cpJOd3z0PLUFTV8v+L kZhwWX8gFyZoxvakjBzmrtvlsysMOTjAo5mlh9A1M+r+C1MZZmElh/iuLHUZvr1sYwro84NkYNHhu yiWkj9oRcvEoURVDFpR/CM30lC8eaugg5jTkWf6LhcpR3VldXi3P8D24rVmXJhZIEB4YUMQcFOcbb exUJjzICv/HaWj0jd4VA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQCCX-00BTI0-Ct; Fri, 04 Mar 2022 17:58:49 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQCBW-00BSsr-4X for linux-arm-kernel@lists.infradead.org; Fri, 04 Mar 2022 17:57:47 +0000 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 dfw.source.kernel.org (Postfix) with ESMTPS id B307860A57; Fri, 4 Mar 2022 17:57:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5EBCC340EF; Fri, 4 Mar 2022 17:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646416665; bh=VQZwjsyuhX6bCj2+GY+6kYhwAZndJRRcnzU171vP+OM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NFEcLUW9m4TeQ8UhzKbERNHkBV8U9XXbS5BVBPoYeeBp/rjDvYOpOTNf5IqctotCA dBnDqkkhJncp2GT9fOylQCBktJkDnDa5EddyR42n+DnPjZ7xXBTh2BO8TVD51w+v1D ywLTpc8fQrxDxR757KziYL9JJU1RWz0uOg84AgLkhrfO16zzKyDPDDl2RvnxzKxGJS 9H5VWp0okQeXzpS2aYSgzhbtgpDea15BpJJtRpq3z4MU/ySDZgFWzuGYs2esBcRJWs 5cZZ8JqrfsR8Y2z8qURe7n36iQVvcAEo/yba78r8YiC6q7DXlDzkAS3iVmyQnwbfU1 KhQA/90ogLanQ== From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: mark.rutland@arm.com, android-kvm@google.com, Ard Biesheuvel , Marc Zyngier , Will Deacon Subject: [RFC PATCH 5/8] arm64: head: populate page tables before disabling the MMU Date: Fri, 4 Mar 2022 18:56:54 +0100 Message-Id: <20220304175657.2744400-6-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220304175657.2744400-1-ardb@kernel.org> References: <20220304175657.2744400-1-ardb@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220304_095746_266041_ED8BEC03 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Reorder the call to init_kernel_el() with the creation of the page tables so the latter code runs with MMU and caches enabled if that is how we entered. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index b82c86fc9141..6041078df62a 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -93,9 +93,9 @@ SYM_CODE_START(primary_entry) bl record_mmu_state bl record_kaslr_offset bl preserve_boot_args + bl __create_page_tables bl init_kernel_el // w0=cpu_boot_mode bl set_cpu_boot_mode_flag - bl __create_page_tables /* * The following calls CPU setup code, see arch/arm64/mm/proc.S for * details. -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel