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

[Xen-devel] [PATCH v6 07/10] xen/arm: move setup_mm right after setup_pagetables



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.
This ensures we have a valid DTB mapping while running the subsequent
initialization code.


Changes in v5:
- reword commit message;
- turn printk in setup_mm into an early_printk.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 xen/arch/arm/setup.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index b5cb912..dc94adc 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -135,7 +135,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t 
dtb_size)
     xenheap_pages = min(1ul << (30 - PAGE_SHIFT), heap_pages);
     domheap_pages = heap_pages - xenheap_pages;
 
-    printk("Xen heap: %lu pages  Dom heap: %lu pages\n", xenheap_pages, 
domheap_pages);
+    early_printk("Xen heap: %lu pages  Dom heap: %lu pages\n", xenheap_pages, 
domheap_pages);
 
     setup_xenheap_mappings(ram_start >> PAGE_SHIFT, xenheap_pages);
 
@@ -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,
     set_current((struct vcpu *)0xfffff000); /* debug sanity */
     idle_vcpu[0] = current;
 
-    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",
-- 
1.7.2.5


_______________________________________________
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®.