From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 06/12] arm: avoid allocating the heaps over modules or xen itself. Date: Thu, 29 Nov 2012 17:45:49 +0000 Message-ID: <20121129174549.GJ80627@ocelot.phlegethon.org> References: <1352823779.7491.94.camel@zakaz.uk.xensource.com> <1352823804-28482-6-git-send-email-ian.campbell@citrix.com> <20121129170638.GG80627@ocelot.phlegethon.org> <1354209553.6269.51.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1354209553.6269.51.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org At 17:19 +0000 on 29 Nov (1354209553), Ian Campbell wrote: > On Thu, 2012-11-29 at 17:06 +0000, Tim Deegan wrote: > > At 16:23 +0000 on 13 Nov (1352823798), Ian Campbell wrote: > > > Signed-off-by: Ian Campbell > > > --- > > > 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? > > I should probably try it... > > I think in this case next_module will return the start of that module, > so e = s, and it will also set n to the end of the module. Yes, I see; you go nce around the loop with a 0-length range, which init_boot_pages will ignore. Fine. Tim.