From: Ian Campbell Subject: Re: [PATCH v4 4/7] xen/arm: move setup_mm right after setup_pagetables Date: Thu, 10 Jan 2013 15:55:06 +0000 Message-ID: <1357833306.9456.55.camel@zakaz.uk.xensource.com> References: <1357675408-27949-4-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1357675408-27949-4-git-send-email-stefano.stabellini@eu.citrix.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: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , "Tim (Xen.org)" List-Id: xen-devel@lists.xenproject.org On Tue, 2013-01-08 at 20:03 +0000, Stefano Stabellini wrote: > At the moment we destroy the DTB mappings we have in setup_pagetables > and we restore them only in setup_mm. > > Move setup_mm right after setup_pagetables so that we don't leave over > portions of the initialization code without a working DTB mapping. "leave over"? I think you just mean to say "This ensures we have a valid DTB mapping while running the subsequent initialization code" or something like that. Do you still get the : printk("Xen heap: %lu pages Dom heap: %lu pages\n message with this change? Or do all the printks in this function need to become early_printk/early_panic? Actually, this function has 1x early_printk, 1x printk and 1x panic, it's a bit confused I think ;-) > > Signed-off-by: Stefano Stabellini > --- > xen/arch/arm/setup.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > index 2076724..8882514 100644 > --- a/xen/arch/arm/setup.c > +++ b/xen/arch/arm/setup.c > @@ -212,6 +212,7 @@ void __init start_xen(unsigned long boot_phys_offset, > cmdline_parse(device_tree_bootargs(fdt)); > > setup_pagetables(boot_phys_offset, get_xen_paddr()); > + setup_mm(atag_paddr, fdt_size); > > #ifdef EARLY_UART_ADDRESS > /* TODO Need to get device tree or command line for UART address */ > @@ -229,8 +230,6 @@ void __init start_xen(unsigned long boot_phys_offset, > > init_xen_time(); > > - setup_mm(atag_paddr, fdt_size); > - > /* Setup Hyp vector base */ > WRITE_CP32((uint32_t) hyp_traps_vector, HVBAR); > printk("Set hyp vector base to %"PRIx32" (expected %p)\n",