diff options
author | Dirk Müller <dirk@dmllr.de> | 2015-03-24 22:30:13 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-03-25 14:36:14 +0100 |
commit | 8e7ba4ed3a0b68ab35736c7859fd950f6705e0cf (patch) | |
tree | 7d934c447cdb7125ecf9db3784d54b5aa31bd8e8 /hw/sparc/sun4m.c | |
parent | 6a926fbc6fff58598cce9404019204090a8e8361 (diff) |
sparc: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory
Commit 0b183fc871:"memory: move mem_path handling to
memory_region_allocate_system_memory" split memory_region_init_ram and
memory_region_init_ram_from_file. Also it moved mem-path handling a step
up from memory_region_init_ram to memory_region_allocate_system_memory.
Therefore for any board that uses memory_region_init_ram directly,
-mem-path is not supported.
Fix this by replacing memory_region_init_ram with
memory_region_allocate_system_memory.
Signed-off-by: Dirk Mueller <dmueller@suse.com>
Message-Id: <CAL5wTH7o8uA59Ep0n41i0M19VFWa73n9m172j2W3fjz6=PSVBA@mail.gmail.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/sparc/sun4m.c')
-rw-r--r-- | hw/sparc/sun4m.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 255ba1f4f5..a69bf2da45 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -805,9 +805,8 @@ static int ram_init1(SysBusDevice *dev) { RamDevice *d = SUN4M_RAM(dev); - memory_region_init_ram(&d->ram, OBJECT(d), "sun4m.ram", d->size, - &error_abort); - vmstate_register_ram_global(&d->ram); + memory_region_allocate_system_memory(&d->ram, OBJECT(d), "sun4m.ram", + d->size); sysbus_init_mmio(dev, &d->ram); return 0; } |