x86/mm/p2m: Remove recursive-locking code from set_shared_p2m_entry().
authorTim Deegan <Tim.Deegan@citrix.com>
Thu, 2 Jun 2011 12:16:52 +0000 (13:16 +0100)
committerTim Deegan <Tim.Deegan@citrix.com>
Thu, 2 Jun 2011 12:16:52 +0000 (13:16 +0100)
It should no longer be needed now that the shr_lock discipline is fixed.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/arch/x86/mm/p2m.c

index e555343b518568e5f789614badbd0fd08860b146..6608cad3f78ce016a491c8eef7acf571c6f9e761 100644 (file)
@@ -601,7 +601,6 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     int rc = 0;
-    int need_lock = !p2m_locked_by_me(p2m);
     p2m_type_t ot;
     mfn_t omfn;
 
@@ -617,11 +616,9 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
 
     P2M_DEBUG("set shared %lx %lx\n", gfn, mfn_x(mfn));
-    if ( need_lock ) 
-        p2m_lock(p2m);
+    p2m_lock(p2m);
     rc = set_p2m_entry(p2m, gfn, mfn, 0, p2m_ram_shared, p2m->default_access);
-    if ( need_lock ) 
-        p2m_unlock(p2m);
+    p2m_unlock(p2m);
     if ( 0 == rc )
         gdprintk(XENLOG_ERR,
             "set_mmio_p2m_entry: set_p2m_entry failed! mfn=%08lx\n",