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

[Xen-changelog] [xen master] xen/arm: Move p2m_vmid_allocator_init() inside setup_virt_paging()



commit 3ca8573f8b81b2ff8d14c0fb29260420f868ab7a
Author:     Bhupinder Thakur <bhupinder.thakur@xxxxxxxxxx>
AuthorDate: Fri Dec 16 12:46:27 2016 +0530
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Fri Dec 16 10:42:11 2016 -0800

    xen/arm: Move p2m_vmid_allocator_init() inside setup_virt_paging()
    
    Since VMIDs are related to 2nd stage address translation, it makes more 
sense
    to move the call to p2m_vmid_allocator_init(), which initializes the vmid
    allocation bitmap, inside setup_virt_paging(), where 2nd stage address 
translation
    is set up.
    
    Signed-off-by: Bhupinder Thakur <bhupinder.thakur@xxxxxxxxxx>
    Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
---
 xen/arch/arm/p2m.c        | 5 ++++-
 xen/arch/arm/setup.c      | 2 --
 xen/include/asm-arm/p2m.h | 3 ---
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 5d5bb87..6930f8c 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -1239,7 +1239,7 @@ static spinlock_t vmid_alloc_lock = SPIN_LOCK_UNLOCKED;
  */
 static DECLARE_BITMAP(vmid_mask, MAX_VMID);
 
-void p2m_vmid_allocator_init(void)
+static void p2m_vmid_allocator_init(void)
 {
     set_bit(INVALID_VMID, vmid_mask);
 }
@@ -1657,6 +1657,9 @@ void __init setup_virt_paging(void)
 #endif
     printk("P2M: %d levels with order-%d root, VTCR 0x%lx\n",
            4 - P2M_ROOT_LEVEL, P2M_ROOT_ORDER, val);
+
+    p2m_vmid_allocator_init();
+
     /* It is not allowed to concatenate a level zero root */
     BUG_ON( P2M_ROOT_LEVEL == 0 && P2M_ROOT_ORDER > 0 );
     setup_virt_paging_one((void *)val);
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 1678871..049e449 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -781,8 +781,6 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     gic_init();
 
-    p2m_vmid_allocator_init();
-
     softirq_init();
 
     tasklet_subsys_init();
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index fdb6b47..0987be2 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -152,9 +152,6 @@ void p2m_altp2m_check(struct vcpu *v, uint16_t idx)
     /* Not supported on ARM. */
 }
 
-/* Initialise vmid allocator */
-void p2m_vmid_allocator_init(void);
-
 /* Second stage paging setup, to be called on all CPUs */
 void setup_virt_paging(void);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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