summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-07-13 20:49:58 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2010-07-13 20:49:58 -0300
commitf67f69139672068bf7f311ae1423d3a3fa97d007 (patch)
treea8415a1a65deff643f493093abcd7f03a3373cd4 /exec.c
parent496850369988be816680065e905edf74c7218b22 (diff)
parent498238687fd3a2bf3efb32694732f88ceac72e99 (diff)
Merge commit '498238687fd3a2bf3efb32694732f88ceac72e99' into upstream-merge
* commit '498238687fd3a2bf3efb32694732f88ceac72e99': (28 commits) pci: introduce multifunction property. qdev: implement qdev_prop_set_bit(). pci: remove PCIDeviceInfo::header_type pci: don't overwrite multi functio bit in pci header type. pci: insert assert that auto-assigned-address function is single function device. pci: use PCI_DEVFN() where appropriate. target-mips: add loongson 2E & 2F integer instructions Fix warning about uninitialized variable sheepdog: fix compile error on systems without TCP_CORK ramblocks: No more being lazy about duplicate names pci: Free the space allocated for the option rom on removal block: add sheepdog driver for distributed storage support ide: Reject invalid CHS geometry ide: Reject readonly drives unless CD-ROM ide: Make ide_init_drive() return success ide: Replace IDEState members is_cdrom, is_cf by drive_kind ide: Improve error messages scsi: Error locations for -drive if=scsi device initialization error: New qemu_opts_loc_restore() scsi: Reject unimplemented error actions ... Conflicts: hw/pci.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/exec.c b/exec.c
index f0bbc55c6..5e9a5b777 100644
--- a/exec.c
+++ b/exec.c
@@ -2790,7 +2790,7 @@ static void *file_ram_alloc(RAMBlock *block,
static ram_addr_t find_ram_offset(ram_addr_t size)
{
RAMBlock *block, *next_block;
- ram_addr_t offset, mingap = ULONG_MAX;
+ ram_addr_t offset = 0, mingap = ULONG_MAX;
if (QLIST_EMPTY(&ram_list.blocks))
return 0;
@@ -2885,16 +2885,9 @@ ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size)
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (!strcmp(block->idstr, new_block->idstr)) {
- if (block->length == new_block->length) {
- fprintf(stderr, "RAMBlock \"%s\" exists, assuming lack of"
- "free.\n", new_block->idstr);
- qemu_free(new_block);
- return block->offset;
- } else {
- fprintf(stderr, "RAMBlock \"%s\" already registered with"
- "different size, abort\n", new_block->idstr);
- abort();
- }
+ fprintf(stderr, "RAMBlock \"%s\" already registered, abort!\n",
+ new_block->idstr);
+ abort();
}
}