[PATCH 16/21] hw/lm32: Let the machine be the owner of the system memory

Philippe Mathieu-Daudé posted 21 patches 6 years, 3 months ago
Maintainers: KONRAD Frederic <frederic.konrad@adacore.com>, "Cédric Le Goater" <clg@kaod.org>, Artyom Tarasenko <atar4qemu@gmail.com>, Thomas Huth <huth@tuxfamily.org>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Beniamino Galvani <b.galvani@gmail.com>, "Hervé Poussineau" <hpoussin@reactos.org>, Aleksandar Rikalo <arikalo@wavecomp.com>, Alistair Francis <alistair@alistair23.me>, Rob Herring <robh@kernel.org>, Andrzej Zaborowski <balrogg@gmail.com>, Leif Lindholm <leif.lindholm@linaro.org>, Aleksandar Markovic <amarkovic@wavecomp.com>, Andrew Jeffery <andrew@aj.id.au>, Richard Henderson <rth@twiddle.net>, Aurelien Jarno <aurelien@aurel32.net>, Antony Pavlov <antonynpavlov@gmail.com>, Andrey Smirnov <andrew.smirnov@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Jean-Christophe Dubois <jcd@tribudubois.net>, Peter Chubb <peter.chubb@nicta.com.au>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Joel Stanley <joel@jms.id.au>, Jan Kiszka <jan.kiszka@web.de>, Fabien Chouteau <chouteau@adacore.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Andrew Baumann <Andrew.Baumann@microsoft.com>, Radoslaw Biernacki <radoslaw.biernacki@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Helge Deller <deller@gmx.de>, Michael Walle <michael@walle.cc>, Paul Burton <pburton@wavecomp.com>
[PATCH 16/21] hw/lm32: Let the machine be the owner of the system memory
Posted by Philippe Mathieu-Daudé 6 years, 3 months ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/lm32/lm32_boards.c | 4 ++--
 hw/lm32/milkymist.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index 5ae308bfcf..50b607e0cc 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -107,7 +107,7 @@ static void lm32_evr_init(MachineState *machine)
 
     reset_info->flash_base = flash_base;
 
-    memory_region_allocate_system_memory(phys_ram, NULL, "lm32_evr.sdram",
+    memory_region_allocate_system_memory(phys_ram, machine, "lm32_evr.sdram",
                                          ram_size);
     memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
 
@@ -200,7 +200,7 @@ static void lm32_uclinux_init(MachineState *machine)
 
     reset_info->flash_base = flash_base;
 
-    memory_region_allocate_system_memory(phys_ram, NULL,
+    memory_region_allocate_system_memory(phys_ram, machine,
                                          "lm32_uclinux.sdram", ram_size);
     memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
 
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index 460d322de5..ee2eb1877e 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -116,7 +116,7 @@ milkymist_init(MachineState *machine)
 
     cpu_lm32_set_phys_msb_ignore(env, 1);
 
-    memory_region_allocate_system_memory(phys_sdram, NULL, "milkymist.sdram",
+    memory_region_allocate_system_memory(phys_sdram, machine, "milkymist.sdram",
                                          sdram_size);
     memory_region_add_subregion(address_space_mem, sdram_base, phys_sdram);
 
-- 
2.21.0


Re: [PATCH 16/21] hw/lm32: Let the machine be the owner of the system memory
Posted by Richard Henderson 6 years, 3 months ago
On 10/20/19 3:56 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/lm32/lm32_boards.c | 4 ++--
>  hw/lm32/milkymist.c   | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

Re: [PATCH 16/21] hw/lm32: Let the machine be the owner of the system memory
Posted by Alistair Francis 6 years, 3 months ago
On Sun, Oct 20, 2019 at 4:10 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/lm32/lm32_boards.c | 4 ++--
>  hw/lm32/milkymist.c   | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
> index 5ae308bfcf..50b607e0cc 100644
> --- a/hw/lm32/lm32_boards.c
> +++ b/hw/lm32/lm32_boards.c
> @@ -107,7 +107,7 @@ static void lm32_evr_init(MachineState *machine)
>
>      reset_info->flash_base = flash_base;
>
> -    memory_region_allocate_system_memory(phys_ram, NULL, "lm32_evr.sdram",
> +    memory_region_allocate_system_memory(phys_ram, machine, "lm32_evr.sdram",
>                                           ram_size);
>      memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
>
> @@ -200,7 +200,7 @@ static void lm32_uclinux_init(MachineState *machine)
>
>      reset_info->flash_base = flash_base;
>
> -    memory_region_allocate_system_memory(phys_ram, NULL,
> +    memory_region_allocate_system_memory(phys_ram, machine,
>                                           "lm32_uclinux.sdram", ram_size);
>      memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
>
> diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
> index 460d322de5..ee2eb1877e 100644
> --- a/hw/lm32/milkymist.c
> +++ b/hw/lm32/milkymist.c
> @@ -116,7 +116,7 @@ milkymist_init(MachineState *machine)
>
>      cpu_lm32_set_phys_msb_ignore(env, 1);
>
> -    memory_region_allocate_system_memory(phys_sdram, NULL, "milkymist.sdram",
> +    memory_region_allocate_system_memory(phys_sdram, machine, "milkymist.sdram",
>                                           sdram_size);
>      memory_region_add_subregion(address_space_mem, sdram_base, phys_sdram);
>
> --
> 2.21.0
>
>