Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp261989rdb; Thu, 22 Feb 2024 03:00:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX969qA9b4eIOT39/LswliGKDQicBJS711BQlGJJYzHH/B3+ZajhNUCVBivEebFvPBqlyZJq/1WmzwMomdULaEZPvd/ZOG1bWhiZe5q3Q== X-Google-Smtp-Source: AGHT+IG6Wq0d3+IzdVZyCe17pASN7papDuv3wmvGsB4raW3NVxWdJPLBr7tQtpBEy5+eBmzO6RPR X-Received: by 2002:a05:6a20:9d91:b0:1a0:d1ae:4641 with SMTP id mu17-20020a056a209d9100b001a0d1ae4641mr2055957pzb.30.1708599630937; Thu, 22 Feb 2024 03:00:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708599630; cv=pass; d=google.com; s=arc-20160816; b=iAuNYD9hf1b5LidZlPeTboVMm1GyyZtda/vqQ/0y/isabsH9giHfepnJkshQiu930+ D5Lc+4Us0jMEXNyWxDqb+1NoV4Za9CUfBBoyYSWk3hFF3OTwwL1DxbsQqQ4H8OLawu7V ycFuMaR3IPJenEtH21AiJEubpnRvmGNUQn4Z+tWqbq1Nb6MRDBEX5ohWA844oip5p3Ef x4U7XR1+6DEpdOHmOZRHlboBjIrUxfVPr4g6ZGf+0Rpj4GLviedkyUWYa4ztDkgC3HvJ 7eJxko7ANGoPFGoTL4LJevsP3zCskwW8dghqduBDHtx4nwgQXVHxkkpNwfwn6QZYTW5u MQYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=l6qvIagK30Lb7F8hBrI6ti7UR6ptnm/RvD4L/DffQRE=; fh=paiJjxCIK0PNlRCS+q/1ngBkJWZwMgAumX/GbiGVDCE=; b=Ngvh4jGGWI7JgUNNchx3dm+Pma2kFp9pY4ZYpceZGKPFQ4KrjRn3YcplzG5/YfiqYG MDNlThRAmQ6hm1j8Ww4wTQ4MNh6aGxX7Q4VRzwZRHBEIYpDJ621aTJx6mEVUf2Fj2LLs 1h3BjFrE87IeUk4xticdCEvTs6SKoGwa7pEDav2onI7IdGPdhdlaqZSlILU+Mn18eEuL NGWuCRDjd1NvOJawaVt8KAVIhVaJ8ZXT4Vwr3HGHZtzK0lcS8faXmcahm5vGywIDrgMv X91yHcdjNiFH9e1oN5cBzyo8FwjSQ+MU6OvRp/pDJRVKF2y1i+BfCY+O2HjNR0WLvO0o C4rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-76373-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id sm8-20020a17090b2e4800b002972e2132eesi10098027pjb.64.2024.02.22.03.00.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76373-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-76373-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AC990283C9C for ; Thu, 22 Feb 2024 11:00:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58CCD3FB20; Thu, 22 Feb 2024 11:00:03 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B66538F88 for ; Thu, 22 Feb 2024 10:59:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708599602; cv=none; b=GO/NP02VZk5TGj6qQvd3rGiqL7WmTXAyEGT65Ob8TOflzdvVsO35723cBId/6rcaydIog7UM83tparpNVyN081X4A8joNIxnpbckECRfLgYIRpsa8d1r0JJAQrEF3ze99C+dh1bQkLVEV2eIu3fDKQMn7lBvuX3ctl2+TnB0FvY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708599602; c=relaxed/simple; bh=ItDxMt1okGzqHpdyO0Hqc0WQvStSr/CV/9RJDXHmRds=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=boRiQDrvJuf+vr0s7X2KHAShIM8qfWs0TuMPkwdLg9W1WcmgVnRBZyOQKZZL/hHG6fB2yqeaiZI8Rr03f2xRw5M41cY0ZAvttWhu3MFPpBC1qEcMndDA77f9hTqBJrPxYZVZ2AFXe/1+McIwCAfu4Z2QlVEmJS4UCugzPs43CWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5AED8DA7; Thu, 22 Feb 2024 03:00:37 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.79.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C2F3B3F73F; Thu, 22 Feb 2024 02:59:57 -0800 (PST) Date: Thu, 22 Feb 2024 10:59:51 +0000 From: Mark Rutland To: Itaru Kitayama Cc: skseofh@gmail.com, catalin.marinas@arm.com, will@kernel.org, ryan.roberts@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: add early fixmap initialization flag Message-ID: References: <20240217140326.2367186-1-skseofh@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Feb 21, 2024 at 08:14:00AM +0900, Itaru Kitayama wrote: > On Tue, Feb 20, 2024 at 11:55:30AM +0000, Mark Rutland wrote: > > From 5f07f9c1d352f760fa7aba97f1b4f42d9cb99496 Mon Sep 17 00:00:00 2001 > > From: Mark Rutland > > Date: Tue, 20 Feb 2024 11:09:17 +0000 > > Subject: [PATCH] arm64: clean up fixmap initalization > > > > Currently we have redundant initialization of the fixmap, first in > > early_fdt_map(), and then again in setup_arch() before we call > > early_ioremap_init(). This redundant initialization isn't harmful, as > > early_fixmap_init() happens to be idempotent, but it's redundant and > > potentially confusing. > > > > We need to call early_fixmap_init() before we map the FDT and before we > > call early_ioremap_init(). Ideally we'd place early_fixmap_init() and > > early_ioremap_init() in the same caller as early_ioremap_init() is > > somewhat coupled with the fixmap code. > > > > Clean this up by moving the calls to early_fixmap_init() and > > early_ioremap_init() into a new early_mappings_init() function, and > > calling this once in __primary_switched() before we call > > early_fdt_map(). This means we initialize the fixmap once, and keep > > early_fixmap_init() and early_ioremap_init() together. > Thanks for this. Makes sense to me; would you post a proper patch > so I can build and do a boot test, just to make sure? I took a look, and Ard's recent changes to the boot code have removed the duplicate call to early_fixmap_init() by other means, so we don't need to do anything, and can forget about this patch. :) Mark.