From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 0D88F4FB9C2; Wed, 30 Sep 2026 15:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790782914; cv=none; b=GEqEAVhppq+qt8Hx1WX129fxGO+Vj+HelHippeoXVMmdNnA2mWMsHwkwc75f/rb6o8C4Eduh0aiQNJw8UMMBrcX+xDAESaXm0jVx1F6SaWonIc8Wyj1u1sXQG8b0DhCKqA0XA5qcEu0S5sACVAQBclSZG/ThIe/g2qZJKoMnC+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790782914; c=relaxed/simple; bh=kmhKav14m+IxN4a4imYZ2oro/AL1uwKwDF+4WttE7S4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y5W8i9b5SM6Elj2gUNLxrUp3IaWHGpV6jxmCCG+QZxH9eC/tSZ8edl30XFIrTexNkG6yTlo9wxemea8lTJukZXKMHYNeHxvgQ9MqKAm5gGP4ToeZGeXTiJv0mWGBop3tWD2ae9vQyjlpu5wf2zVGhS4fxZANPcNGxa6pFinXZ4o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=14wkjRta; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="14wkjRta" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FA141F000FF; Wed, 30 Sep 2026 15:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790782908; bh=5kXinGg7+q0f9caMJUVi5mQjozsnRHSiQBsuTLURkmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=14wkjRtaPI0iz+Qck+Xr0C8Wua1dlyx8l57r5q5dqHS4cR+VasKF5myuWR57B12ez UzFm2AZeYBTgy9A+5sTkDk1yJQFrmBqdjaW+dfJgjk8EzqZNjNTYpUpvHVk6J7jVFZ 5C5OzT3O/e3zddmnw9XJdlpSNFCAqIVyWsbwjf2A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yu Peng , Will Deacon , Sasha Levin Subject: [PATCH 5.10 167/595] arm64: fixmap: Allow 256K early_ioremap() at any offset Date: Wed, 30 Sep 2026 17:21:00 +0200 Message-ID: <20260930152351.332792245@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152347.700140858@linuxfoundation.org> References: <20260930152347.700140858@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yu Peng [ Upstream commit 21fc7ec93f8b633b60d5bddef2f1529ff6b36185 ] NR_FIX_BTMAPS is the per-slot page limit for early_ioremap(). Since __early_ioremap() maps the page-aligned physical range, a 256K request can require one extra page when the physical address is not page-aligned. Reserve one extra page per slot so the 256K mapping budget is usable regardless of the initial page offset. Link: https://lore.kernel.org/r/08fd96fa-ee3a-4904-bd11-bb08bd90436f@kylinos.cn Signed-off-by: Yu Peng Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/include/asm/fixmap.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h index daff882883f92..9dcf004a4166b 100644 --- a/arch/arm64/include/asm/fixmap.h +++ b/arch/arm64/include/asm/fixmap.h @@ -73,8 +73,12 @@ enum fixed_addresses { /* * Temporary boot-time mappings, used by early_ioremap(), * before ioremap() is functional. + * + * Reserve one extra page so a 256K mapping may start at any + * offset within a page. early_ioremap() maps the page-aligned + * physical range, so the initial offset can consume an extra page. */ -#define NR_FIX_BTMAPS (SZ_256K / PAGE_SIZE) +#define NR_FIX_BTMAPS ((SZ_256K / PAGE_SIZE) + 1) #define FIX_BTMAPS_SLOTS 7 #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) -- 2.53.0