[PATCH 6/6] ARM: mm: truncate memory banks to fit in 4GB space for classic MMU

Will Deacon will.deacon at arm.com
Tue Mar 6 15:17:52 EST 2012


Hi Nicolas,

On Tue, Mar 06, 2012 at 07:49:43PM +0000, Nicolas Pitre wrote:
> On Tue, 6 Mar 2012, Will Deacon wrote:
> > On Tue, Mar 06, 2012 at 06:06:40PM +0000, Sergei Shtylyov wrote:
> > > On 03/06/2012 07:54 PM, Will Deacon wrote:
> > > 
> > > > +#ifndef CONFIG_LPAE
> > > > +	if (bank->start + size<  bank->start) {
> > > > +		printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in "
> > > > +			"32-bit physical address space\n", (long long)start);
> > > > +		size = ULONG_MAX - bank->start;
> > > 
> > >     I think you forgot to add one here.
> > 
> > No, I deliberately omit the last page because otherwise we end up with the
> > end address of the bank being calculated as 0, which leads to boot failure.
> 
> What this mentioned in the code, or at least in the patch log?

Good idea - I'll add a comment to the code when we assign size.

Will



More information about the linux-arm-kernel mailing list