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 93B3F1E0DD8; Wed, 30 Sep 2026 17:59:33 +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=1790791174; cv=none; b=ft3tzwspNTW5H+9qRRTo3i8UKhFIC9w911P3uO/lVs10mQVFkQCjmWdwecMLD6NvQLDDXmX4uZBVeRWO3QHqXQjkVnXtNypIVGFZyHvIEQvT2l80MdIX1/41TXCqktv/taim5Jla01mtKdgmRj6LRwOynFISrvQHApOKvrFEnM4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790791174; c=relaxed/simple; bh=V/ZRIYcCSrJPaK5YzApQCmGmElU2dsQ/h3ncn04+hI0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SI0PvJO5XE9vFyQEJVomMzBAXdh+KAakLZvQDtANMTQ0X9KWprasa8VKgkJg6YhPFKX3tWLw977EXeqr+m1uAO4hnnaj/HU8rys/pkdmfTVa62UJEsJFuo/sqHYL7jEUdgc6skLrpnRkF+9i6/vDt/Ckkeq3KqsxUGhShhm2hqw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Vv+tP5nQ; 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="Vv+tP5nQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFC5D1F000FF; Wed, 30 Sep 2026 17:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790791173; bh=AyhVKKaxcWn9IldGivdKx5wJczirZnwCzfplbTG79KA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Vv+tP5nQvLS319xnhJaaelc3zoSKv6Q587vVdahltvlL8S/msNyQ/b21Zl2lddPCw Rd8cgVlsMiNzkhmD8HNm8n6F1uKG8wpkADAlyQB3RpvgDUbRhVrq7drORDcscF6tnK FGDDDfaYZPcN5UP8I6+aSY1SsUv29a3eS/+0a+XA= 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.15 209/752] arm64: fixmap: Allow 256K early_ioremap() at any offset Date: Wed, 30 Sep 2026 17:21:19 +0200 Message-ID: <20260930152402.756167523@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152358.131179731@linuxfoundation.org> References: <20260930152358.131179731@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.15-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