All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.3] mips: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory
@ 2015-03-24 21:28 Dirk Müller
  2015-03-24 23:01 ` Andreas Färber
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Müller @ 2015-03-24 21:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hervé Poussineau, Aurelien Jarno

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>
---
 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 = 1024 * 1024;

     /* allocate RAM */
-    memory_region_init_ram(ram, NULL, "fulong2e.ram", ram_size, &error_abort);
-    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 = mips_jazz_do_unassigned_access;

     /* 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);

     memory_region_init_ram(bios, NULL, "mips_jazz.bios", MAGNUM_BIOS_SIZE,
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)
     }

     /* 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);

     /* 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);

     /* 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_abort);
-    vmstate_register_ram_global(ram);
+    memory_region_allocate_system_memory(ram, NULL, "mips_r4k.ram", ram_size);

     memory_region_add_subregion(address_space_mem, 0, ram);

-- 
2.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.3] mips: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory
  2015-03-24 21:28 [Qemu-devel] [PATCH for-2.3] mips: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory Dirk Müller
@ 2015-03-24 23:01 ` Andreas Färber
  2015-03-25 13:23   ` Leon Alrae
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2015-03-24 23:01 UTC (permalink / raw)
  To: Dirk Müller, qemu-devel, Paolo Bonzini, Leon Alrae
  Cc: Stefan Weil, Hervé Poussineau, Aurelien Jarno

Am 24.03.2015 um 22:28 schrieb Dirk Müller:
> 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>
> ---
>  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(-)

Reviewed-by: Andreas Färber <afaerber@suse.de>

Leon and Paolo, I assume one of you will be handling this?

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.3] mips: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory
  2015-03-24 23:01 ` Andreas Färber
@ 2015-03-25 13:23   ` Leon Alrae
  2015-03-25 13:32     ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Leon Alrae @ 2015-03-25 13:23 UTC (permalink / raw)
  To: Andreas Färber, Dirk Müller, qemu-devel, Paolo Bonzini
  Cc: Stefan Weil, Hervé Poussineau, Aurelien Jarno

On 24/03/2015 23:01, Andreas Färber wrote:
> Am 24.03.2015 um 22:28 schrieb Dirk Müller:
>> 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>
>> ---
>>  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(-)
> 
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> 
> Leon and Paolo, I assume one of you will be handling this?
> 

Acked-by: Leon Alrae <leon.alrae@imgtec.com>

Paolo, is this going via your memory API pullreq?

Regards,
Leon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.3] mips: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory
  2015-03-25 13:23   ` Leon Alrae
@ 2015-03-25 13:32     ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-03-25 13:32 UTC (permalink / raw)
  To: Leon Alrae, Andreas Färber, Dirk Müller, qemu-devel
  Cc: Stefan Weil, Hervé Poussineau, Aurelien Jarno



On 25/03/2015 14:23, Leon Alrae wrote:
> On 24/03/2015 23:01, Andreas Färber wrote:
>> Am 24.03.2015 um 22:28 schrieb Dirk Müller:
>>> 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>
>>> ---
>>>  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(-)
>>
>> Reviewed-by: Andreas Färber <afaerber@suse.de>
>>
>> Leon and Paolo, I assume one of you will be handling this?
>>
> 
> Acked-by: Leon Alrae <leon.alrae@imgtec.com>
> 
> Paolo, is this going via your memory API pullreq?

I can include it since you've acked it.

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-25 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 21:28 [Qemu-devel] [PATCH for-2.3] mips: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory Dirk Müller
2015-03-24 23:01 ` Andreas Färber
2015-03-25 13:23   ` Leon Alrae
2015-03-25 13:32     ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.