From nobody Sun Feb 8 22:35:27 2026 Received: from out28-197.mail.aliyun.com (out28-197.mail.aliyun.com [115.124.28.197]) (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 1285F33ADAB for ; Fri, 9 Jan 2026 13:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.28.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767965533; cv=none; b=h3ysrjUVp3dzH+PLhb8NYhD0LjdRs+CU+Lxij96dreRbYsz185ApiHytV14wbxqUuhDKFN9SAzDq2Qb2qC5c/HcyO8hyyMxyMHAjpMVu4nzqtNZaekyMMW0QAJUfEkmavemXmDgvKW08uHDrrDX3/46gyu5IA6u9cQMv4RgTdAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767965533; c=relaxed/simple; bh=ZP6ATE4I1ovDRv4GlEQfKP5dM6ggaDCa86FmVAizjgs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=JlRin/gagjh5gTQJLSc50fn+Lwtd/mW9V5Xj+Mm74IWk2Te0r5pcuh+1mcM87Wk0EFzgngfmtCCfM87CMVzBCB4xOQpFTcTwL/1q8NgHouma7Crue1JiSasRvJgM7iW1y6vDwbdRG+ubu7dpm/NnCxw4g9fysOcdonkRa686MLY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=Usj2yAlP; arc=none smtp.client-ip=115.124.28.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="Usj2yAlP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1767965527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=vjbCs+Tbn7fqSeAHdJK8sFAOmv8QqKu3U51GXVFpxco=; b=Usj2yAlPlNq/u2V/G71XePJEYvEXO38WchQT5VFPng+sJbjaYlGh19/0W++E81P3yDwTjokEKVy1HRO7G3m21O68CbI2Y4jpH8dpeoY+HcHJxmbLdb/9Wkdq2k/oVb5/obEDm7MWEcTwWVaT42o/oDJrqFU/+MS2Qb3h5E8PGgQ= Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.g2TRMK0_1767965526 cluster:ay29) by smtp.aliyun-inc.com; Fri, 09 Jan 2026 21:32:06 +0800 From: Hou Wenlong To: linux-kernel@vger.kernel.org Cc: Hou Wenlong , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org Subject: [PATCH] mm/early_ioremap: Print the starting physical address in __early_ioremap() Date: Fri, 9 Jan 2026 21:31:51 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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: Andrew Morton 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 lon= g size, pgprot_t prot) if (WARN_ON(nrpages > NR_FIX_BTMAPS)) return NULL; =20 + WARN(early_ioremap_debug, "%s(%pa, %08lx) [%d] =3D> %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 lon= g size, pgprot_t prot) --idx; --nrpages; } - WARN(early_ioremap_debug, "%s(%pa, %08lx) [%d] =3D> %08lx + %08lx\n", - __func__, &phys_addr, size, slot, offset, slot_virt[slot]); =20 prev_map[slot] =3D (void __iomem *)(offset + slot_virt[slot]); return prev_map[slot]; --=20 2.31.1