@@ -60,7 +60,6 @@ ram_addr_t cpu_get_physical_page_desc(target_phys_addr_t addr);
ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
ram_addr_t size, void *host);
ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size);
-void qemu_ram_unmap(ram_addr_t addr);
void qemu_ram_free(ram_addr_t addr);
void qemu_ram_free_from_ptr(ram_addr_t addr);
void qemu_ram_remap(ram_addr_t addr, ram_addr_t length);
@@ -2982,19 +2982,6 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
return new_block->offset;
}
-void qemu_ram_unmap(ram_addr_t addr)
-{
- RAMBlock *block;
-
- QLIST_FOREACH(block, &ram_list.blocks, next) {
- if (addr == block->offset) {
- QLIST_REMOVE(block, next);
- qemu_free(block);
- return;
- }
- }
-}
-
ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size)
{
return qemu_ram_alloc_from_ptr(dev, name, size, NULL);
@@ -836,7 +836,7 @@ static void free_assigned_device(AssignedDevice *dev)
if (region->r_size & 0xFFF) {
cpu_unregister_io_memory(region->memory_index);
} else {
- qemu_ram_unmap(region->memory_index);
+ qemu_ram_free_from_ptr(region->memory_index);
}
if (munmap(region->u.r_virtbase,
(pci_region->size + 0xFFF) & 0xFFFFF000)) {