From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17128318B9D for ; Sun, 11 Jan 2026 09:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768122883; cv=none; b=qJ1+wady8KBV8XKxAWWkQ4IYNJFFqFgKnABOJe1xWt+joMtflyCRHPErHjIJVoii1pW6/P+KPqmC26M7REjW6b4zXhL+pytBoMXuNR0M6c5bDbm8dWQ7kkw1wat5kmix4hcJfMlj+zAF+axmydqEc8KuEf7HAUYTxNDev93Gp14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768122883; c=relaxed/simple; bh=+eIiB8wmKtBPZLFPA5HPpiKv0zBcRE9iGummK/Yx3RU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TNLgyMZQsrlK10b3O3SEihsGgtXNoN7UubEDssLZ+SblfRFnfV7iX9Kf70UuMb1zYyQO5sTKDUTgsHTgiKXCWE243KFBI8F61/GNMgqOjYHusXEFMlzFf/tPc0vrAxzL4e8U1Q01l0r50KJsXydU+0e6R4BraWZWcNayFsFx1do= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JjqqupCp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JjqqupCp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C1ACC4CEF7; Sun, 11 Jan 2026 09:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768122882; bh=+eIiB8wmKtBPZLFPA5HPpiKv0zBcRE9iGummK/Yx3RU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JjqqupCpx9hXZySMzpTrZ5nm4UXE/3Ks73i14xJ2Px8oi8W0uD7ogFg4fPNv+YLXb FysJcwQAH9ajB/A0X7wY24nfNFv4I22VKrilRzG4YdukB6qQArOguyYYPu6UEE0iiL apihL5iIilppttMfk0l+UMqrCm80DSKAEMhdLcW4YMaFq/iHMQWxgtu86wM1NT412B o5bUneTj98sjivf7ZBKD6cYS7n0eZ/c5CofLNkh8Hbw/5LXj1uDsKoyxDaX7nwkYat iqdIfnK1hQcT/JD9tDxq24QIPalsPil06kaOHPbVDmF06wT9XhqT2SM0Vx0XhUlTVG 31SwIM8MwyUMQ== Date: Sun, 11 Jan 2026 11:14:36 +0200 From: Mike Rapoport To: Hou Wenlong Cc: linux-kernel@vger.kernel.org, Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org Subject: Re: [PATCH] mm/early_ioremap: Print the starting physical address in __early_ioremap() Message-ID: References: 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 Fri, Jan 09, 2026 at 09:31:51PM +0800, Hou Wenlong wrote: > The debug WARN() printing occurs after the while loop, so the > 'phys_addr' reflects the last physical address rather than the actual > starting physical address, which is not useful for debugging. To > simplify, the WARN() statement could be moved up before the loop instead > of introducing a new variable to record the original 'phys_addr' value. > Additionally, swap the print order of 'slot_virt[slot]' and 'offset', as > this will enhance output readability. > > Signed-off-by: Hou Wenlong Reviewed-by: Mike Rapoport (Microsoft) > --- > mm/early_ioremap.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/mm/early_ioremap.c b/mm/early_ioremap.c > index ff35b84a7b50..3fdde074c9da 100644 > --- a/mm/early_ioremap.c > +++ b/mm/early_ioremap.c > @@ -139,6 +139,9 @@ __early_ioremap(resource_size_t phys_addr, unsigned long size, pgprot_t prot) > if (WARN_ON(nrpages > NR_FIX_BTMAPS)) > return NULL; > > + WARN(early_ioremap_debug, "%s(%pa, %08lx) [%d] => %08lx + %08lx\n", > + __func__, &phys_addr, size, slot, slot_virt[slot], offset); > + > /* > * Ok, go for it.. > */ > @@ -152,8 +155,6 @@ __early_ioremap(resource_size_t phys_addr, unsigned long size, pgprot_t prot) > --idx; > --nrpages; > } > - WARN(early_ioremap_debug, "%s(%pa, %08lx) [%d] => %08lx + %08lx\n", > - __func__, &phys_addr, size, slot, offset, slot_virt[slot]); > > prev_map[slot] = (void __iomem *)(offset + slot_virt[slot]); > return prev_map[slot]; > -- > 2.31.1 > -- Sincerely yours, Mike.