Commit 49946538 authored by Hu Tao's avatar Hu Tao Committed by Paolo Bonzini
Browse files

memory: add parameter errp to memory_region_init_ram



Add parameter errp to memory_region_init_ram and update all call sites
to pass in &error_abort.

Signed-off-by: default avatarHu Tao <hutao@cn.fujitsu.com>
Reviewed-by: default avatarPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ef701d7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ ram_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)

    path = object_get_canonical_path_component(OBJECT(backend));
    memory_region_init_ram(&backend->mr, OBJECT(backend), path,
                           backend->size);
                           backend->size, &error_abort);
    g_free(path);
}

+2 −1
Original line number Diff line number Diff line
@@ -844,7 +844,8 @@ PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus,

    /* Main memory region, 0x00.0000.0000.  Real hardware supports 32GB,
       but the address space hole reserved at this point is 8TB.  */
    memory_region_init_ram(&s->ram_region, OBJECT(s), "ram", ram_size);
    memory_region_init_ram(&s->ram_region, OBJECT(s), "ram", ram_size,
                           &error_abort);
    vmstate_register_ram_global(&s->ram_region);
    memory_region_add_subregion(addr_space, 0, &s->ram_region);

+4 −3
Original line number Diff line number Diff line
@@ -210,11 +210,12 @@ qemu_irq *armv7m_init(MemoryRegion *system_memory,
#endif

    /* Flash programming is done via the SCU, so pretend it is ROM.  */
    memory_region_init_ram(flash, NULL, "armv7m.flash", flash_size);
    memory_region_init_ram(flash, NULL, "armv7m.flash", flash_size,
                           &error_abort);
    vmstate_register_ram_global(flash);
    memory_region_set_readonly(flash, true);
    memory_region_add_subregion(system_memory, 0, flash);
    memory_region_init_ram(sram, NULL, "armv7m.sram", sram_size);
    memory_region_init_ram(sram, NULL, "armv7m.sram", sram_size, &error_abort);
    vmstate_register_ram_global(sram);
    memory_region_add_subregion(system_memory, 0x20000000, sram);
    armv7m_bitband_init();
@@ -255,7 +256,7 @@ qemu_irq *armv7m_init(MemoryRegion *system_memory,
    /* Hack to map an additional page of ram at the top of the address
       space.  This stops qemu complaining about executing code outside RAM
       when returning from an exception.  */
    memory_region_init_ram(hack, NULL, "armv7m.hack", 0x1000);
    memory_region_init_ram(hack, NULL, "armv7m.hack", 0x1000, &error_abort);
    vmstate_register_ram_global(hack);
    memory_region_add_subregion(system_memory, 0xfffff000, hack);

+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ static void cubieboard_init(MachineState *machine)
    }

    memory_region_init_ram(&s->sdram, NULL, "cubieboard.ram",
                           machine->ram_size);
                           machine->ram_size, &error_abort);
    vmstate_register_ram_global(&s->sdram);
    memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,
                                &s->sdram);
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ typedef struct DigicBoard {

static void digic4_board_setup_ram(DigicBoardState *s, hwaddr ram_size)
{
    memory_region_init_ram(&s->ram, NULL, "ram", ram_size);
    memory_region_init_ram(&s->ram, NULL, "ram", ram_size, &error_abort);
    memory_region_add_subregion(get_system_memory(), 0, &s->ram);
    vmstate_register_ram_global(&s->ram);
}
Loading