]> git.proxmox.com Git - mirror_qemu.git/commitdiff
xen: remove qemu_map_cache_unlock
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 19 May 2011 17:35:43 +0000 (18:35 +0100)
committerAlexander Graf <agraf@suse.de>
Sun, 19 Jun 2011 02:40:04 +0000 (04:40 +0200)
There is no need for qemu_map_cache_unlock, just use
qemu_invalidate_entry instead.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
exec.c
xen-mapcache-stub.c
xen-mapcache.c
xen-mapcache.h

diff --git a/exec.c b/exec.c
index 09928a3b3781f93009a7730a8d21265126e39086..01f33bb2bca8ca69ffa03ca5170d1fce3ffd2fb4 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -3146,7 +3146,7 @@ void qemu_put_ram_ptr(void *addr)
             xen_unmap_block(block->host, block->length);
             block->host = NULL;
         } else {
-            qemu_map_cache_unlock(addr);
+            qemu_invalidate_entry(addr);
         }
     }
 }
index 7c14b3d14121324e8d1714c97e0ad462d9e3817f..60f712b229b63f63f2fe9e8bf5c867cf4f031d71 100644 (file)
@@ -22,10 +22,6 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u
     return qemu_get_ram_ptr(phys_addr);
 }
 
-void qemu_map_cache_unlock(void *buffer)
-{
-}
-
 ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 {
     return -1;
index 90fbd4983f5979149e56f8b5d68dacff7ab25101..57fe24de86b372775b2a0d4d7537f231626d594e 100644 (file)
@@ -230,39 +230,6 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u
     return mapcache->last_address_vaddr + address_offset;
 }
 
-void qemu_map_cache_unlock(void *buffer)
-{
-    MapCacheEntry *entry = NULL, *pentry = NULL;
-    MapCacheRev *reventry;
-    target_phys_addr_t paddr_index;
-    int found = 0;
-
-    QTAILQ_FOREACH(reventry, &mapcache->locked_entries, next) {
-        if (reventry->vaddr_req == buffer) {
-            paddr_index = reventry->paddr_index;
-            found = 1;
-            break;
-        }
-    }
-    if (!found) {
-        return;
-    }
-    QTAILQ_REMOVE(&mapcache->locked_entries, reventry, next);
-    qemu_free(reventry);
-
-    entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
-    while (entry && entry->paddr_index != paddr_index) {
-        pentry = entry;
-        entry = entry->next;
-    }
-    if (!entry) {
-        return;
-    }
-    if (entry->lock > 0) {
-        entry->lock--;
-    }
-}
-
 ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 {
     MapCacheEntry *entry = NULL, *pentry = NULL;
index 339444c94e2e77e63f4acb575b24808434cf3928..b89b8f9653a5f58e0ea710ae0db095a7355c9eb6 100644 (file)
@@ -14,7 +14,6 @@
 
 void     qemu_map_cache_init(void);
 uint8_t  *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, uint8_t lock);
-void     qemu_map_cache_unlock(void *phys_addr);
 ram_addr_t qemu_ram_addr_from_mapcache(void *ptr);
 void     qemu_invalidate_entry(uint8_t *buffer);
 void     qemu_invalidate_map_cache(void);