aboutsummaryrefslogtreecommitdiff
path: root/xen-mapcache.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-05-19 18:35:43 +0100
committerAlexander Graf <agraf@suse.de>2011-06-19 04:40:04 +0200
commitcd306087e5a9ea4091071a0a41c0ea99fac60ab0 (patch)
tree8dc2867beb07778ee778d037e35ea5df7fbbc83d /xen-mapcache.c
parentc13390cd384a9564e6dded127d01ef0627b6b1c5 (diff)
downloadqemu-cd306087e5a9ea4091071a0a41c0ea99fac60ab0.zip
qemu-cd306087e5a9ea4091071a0a41c0ea99fac60ab0.tar.gz
qemu-cd306087e5a9ea4091071a0a41c0ea99fac60ab0.tar.bz2
xen: remove qemu_map_cache_unlock
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>
Diffstat (limited to 'xen-mapcache.c')
-rw-r--r--xen-mapcache.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/xen-mapcache.c b/xen-mapcache.c
index 90fbd49..57fe24d 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -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;