[PATCH v3 RESEND 08/17] ARM: LPAE: use phys_addr_t in free_memmap()

Catalin Marinas catalin.marinas at arm.com
Mon Sep 24 13:03:33 EDT 2012


On Mon, Sep 24, 2012 at 05:55:55PM +0100, Russell King - ARM Linux wrote:
> On Mon, Sep 24, 2012 at 12:41:33PM -0400, Cyril Chemparathy wrote:
> > It appears to be not that hard actually... Or maybe I'm totally missing  
> > your point.  Could it be that you last looked at this prior to the  
> > nobootmem compatibility stuff being added in?
> 
> Quite possible - we converted over to memblock here:
> 
> commit 2778f62056ada442414392d7ccd41188bb631619
> Author: Russell King <rmk+kernel at arm.linux.org.uk>
> Date:   Fri Jul 9 16:27:52 2010 +0100
> 
> It looks like nobootmem.c was created here:
> 
> commit 0932587328d9bd5b500a640fbaff3290c8d4cabf
> Author: Yinghai Lu <yinghai at kernel.org>
> Date:   Thu Feb 24 14:43:05 2011 +0100
> 
> So, when I was porting ARM to memblock, we had:
> 
> commit 08677214e318297f228237be0042aac754f48f1d
> Author: Yinghai Lu <yinghai at kernel.org>
> Date:   Wed Feb 10 01:20:20 2010 -0800
> 
> which causes a load of bootmem functions to panic() when bootmem is
> disabled.
> 
> > The following patch appears to work just fine on a faked sparsemem system:
> 
> Great.  Don't forget to also check flatmem too, just to be sure.

There is still a problem since nobootmem.c doesn't handle 64-bit
physical addresses, so calling free_bootmem() still truncates the
values. Simply replacing bootmem.c with nobootmem.c is not enough, we
need to also replace bootmem calls with the corresponding memblock ones.

-- 
Catalin



More information about the linux-arm-kernel mailing list