[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 06/12] arm: avoid allocating the heaps over modules or xen itself.



At 16:23 +0000 on 13 Nov (1352823798), Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
>  xen/arch/arm/setup.c |   89 +++++++++++++++++++++++++++++++++++++++++++------
>  1 files changed, 78 insertions(+), 11 deletions(-)
> 
> @@ -215,8 +260,30 @@ static void __init setup_mm(unsigned long dtb_paddr, 
> size_t dtb_size)
>      copy_from_paddr(device_tree_flattened, dtb_paddr, dtb_size, BUFFERABLE);
>  
>      /* Add non-xenheap memory */
> -    init_boot_pages(pfn_to_paddr(xenheap_mfn_start + xenheap_pages),
> -                    pfn_to_paddr(xenheap_mfn_start + xenheap_pages + 
> domheap_pages));
> +    s = ram_start;
> +    while ( s < ram_end )
> +    {
> +        paddr_t n = ram_end;
> +
> +        e = next_module(s, &n);

Does this DTRT if there's a module starting at exactly ram_start?

> +        if ( e == ~(paddr_t)0 )
> +        {
> +            e = n = ram_end;
> +        }
> +
> +        /* Avoid the xenheap */
> +        if ( s < ((xenheap_mfn_start+xenheap_pages) << PAGE_SHIFT)
> +             && (xenheap_mfn_start << PAGE_SHIFT) < e )
> +        {
> +            e = pfn_to_paddr(xenheap_mfn_start);
> +            n = pfn_to_paddr(xenheap_mfn_start+xenheap_pages);
> +        }
> +
> +        init_boot_pages(s, e);
> +
> +        s = n;
> +    }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.