From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbAFU-0002j5-Ga for qemu-devel@nongnu.org; Thu, 26 Mar 2015 12:03:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbAFK-0002zE-UP for qemu-devel@nongnu.org; Thu, 26 Mar 2015 12:03:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbAFK-0002z0-Q6 for qemu-devel@nongnu.org; Thu, 26 Mar 2015 12:03:02 -0400 From: Paolo Bonzini Date: Thu, 26 Mar 2015 17:02:31 +0100 Message-Id: <1427385754-13012-12-git-send-email-pbonzini@redhat.com> In-Reply-To: <1427385754-13012-1-git-send-email-pbonzini@redhat.com> References: <1427385754-13012-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 11/14] sparc: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Dirk Mueller , =?UTF-8?q?Dirk=20M=C3=BCller?= From: Dirk M=C3=BCller 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 Message-Id: Reviewed-by: Andreas F=C3=A4rber Signed-off-by: Paolo Bonzini --- hw/sparc/leon3.c | 3 +-- hw/sparc/sun4m.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index e41ec0b..7f5dcd6 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -151,8 +151,7 @@ static void leon3_generic_hw_init(MachineState *machi= ne) exit(1); } =20 - memory_region_init_ram(ram, NULL, "leon3.ram", ram_size, &error_abor= t); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "leon3.ram", ram_siz= e); memory_region_add_subregion(address_space_mem, 0x40000000, ram); =20 /* Allocate BIOS */ diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 255ba1f..a69bf2d 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -805,9 +805,8 @@ static int ram_init1(SysBusDevice *dev) { RamDevice *d =3D SUN4M_RAM(dev); =20 - 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; } --=20 2.3.3