From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Wed, 11 Apr 2012 16:07:37 +0100 Subject: [PATCH v2 3/4] ARM: mm: truncate memory banks to fit in 4GB space for classic MMU In-Reply-To: References: <1334154639-13869-1-git-send-email-will.deacon@arm.com> <1334154639-13869-4-git-send-email-will.deacon@arm.com> Message-ID: <20120411150737.GH16643@mudshark.cambridge.arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Apr 11, 2012 at 03:44:22PM +0100, Nicolas Pitre wrote: > On Wed, 11 Apr 2012, Will Deacon wrote: > > > If a bank of memory spanning the 4GB boundary is added on a !CONFIG_LPAE > > kernel then we will hang early during boot since the memory bank will > > have wrapped around to zero. > > > > This patch truncates memory banks for !LPAE configurations when the end > > address is not representable in 32 bits. > > > > Cc: Nicolas Pitre > > Signed-off-by: Will Deacon > > Acked-by: Nicolas Pitre Thanks Nicolas. > Now what if start = 1G and size = 5G? The size variable is an unsigned > long, meaning that right now the size might be truncated to 1G. membank->size is also an unsigned long, so I guess we'd have to create two adjacent banks for this scenario. This is easy for ATAGs, because the tag_mem32 structure has a u32 for size but obviously a DT blob could pass something larger. Will