From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbAFR-0002dg-QD for qemu-devel@nongnu.org; Thu, 26 Mar 2015 12:03:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbAFK-0002z9-Tv for qemu-devel@nongnu.org; Thu, 26 Mar 2015 12:03:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbAFK-0002yr-Mr for qemu-devel@nongnu.org; Thu, 26 Mar 2015 12:03:02 -0400 From: Paolo Bonzini Date: Thu, 26 Mar 2015 17:02:30 +0100 Message-Id: <1427385754-13012-11-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 10/14] mips: 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 Acked-by: Leon Alrae Signed-off-by: Paolo Bonzini --- hw/mips/mips_fulong2e.c | 3 +-- hw/mips/mips_jazz.c | 5 ++--- hw/mips/mips_malta.c | 5 ++--- hw/mips/mips_mipssim.c | 5 ++--- hw/mips/mips_r4k.c | 3 +-- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index ea73585..4aae64a 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -301,8 +301,7 @@ static void mips_fulong2e_init(MachineState *machine) bios_size =3D 1024 * 1024; =20 /* allocate RAM */ - memory_region_init_ram(ram, NULL, "fulong2e.ram", ram_size, &error_a= bort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "fulong2e.ram", ram_= size); memory_region_init_ram(bios, NULL, "fulong2e.bios", bios_size, &error_abort); vmstate_register_ram_global(bios); diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index ef5dd7d..07f3c27 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -182,9 +182,8 @@ static void mips_jazz_init(MachineState *machine, cc->do_unassigned_access =3D mips_jazz_do_unassigned_access; =20 /* allocate RAM */ - memory_region_init_ram(ram, NULL, "mips_jazz.ram", machine->ram_size= , - &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "mips_jazz.ram", + machine->ram_size); memory_region_add_subregion(address_space, 0, ram); =20 memory_region_init_ram(bios, NULL, "mips_jazz.bios", MAGNUM_BIOS_SIZ= E, diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 533b2e6..b0fa71a 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -993,9 +993,8 @@ void mips_malta_init(MachineState *machine) } =20 /* register RAM at high address where it is undisturbed by IO */ - memory_region_init_ram(ram_high, NULL, "mips_malta.ram", ram_size, - &error_abort); - vmstate_register_ram_global(ram_high); + memory_region_allocate_system_memory(ram_high, NULL, "mips_malta.ram= ", + ram_size); memory_region_add_subregion(system_memory, 0x80000000, ram_high); =20 /* alias for pre IO hole access */ diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c index 5d44c3f..61f74a6 100644 --- a/hw/mips/mips_mipssim.c +++ b/hw/mips/mips_mipssim.c @@ -171,9 +171,8 @@ mips_mipssim_init(MachineState *machine) qemu_register_reset(main_cpu_reset, reset_info); =20 /* Allocate RAM. */ - memory_region_init_ram(ram, NULL, "mips_mipssim.ram", ram_size, - &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "mips_mipssim.ram", + ram_size); memory_region_init_ram(bios, NULL, "mips_mipssim.bios", BIOS_SIZE, &error_abort); vmstate_register_ram_global(bios); diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index 52564be..66e2a58 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -205,8 +205,7 @@ void mips_r4k_init(MachineState *machine) ((unsigned int)ram_size / (1 << 20))); exit(1); } - memory_region_init_ram(ram, NULL, "mips_r4k.ram", ram_size, &error_a= bort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "mips_r4k.ram", ram_= size); =20 memory_region_add_subregion(address_space_mem, 0, ram); =20 --=20 2.3.3