All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org
Subject: [PATCH REPOST v3 29/80] arm/versatilepb: use memdev for RAM
Date: Thu, 23 Jan 2020 12:37:54 +0100	[thread overview]
Message-ID: <1579779525-20065-30-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1579779525-20065-1-git-send-email-imammedo@redhat.com>

memory_region_allocate_system_memory() API is going away, so
replace it with memdev allocated MemoryRegion. The later is
initialized by generic code, so board only needs to opt in
to memdev scheme by providing
  MachineClass::default_ram_id
and using MachineState::ram instead of manually initializing
RAM memory region.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
CC: peter.maydell@linaro.org
CC: qemu-arm@nongnu.org
---
 hw/arm/versatilepb.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index e86af01..f3c4a50 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -184,7 +184,6 @@ static void versatile_init(MachineState *machine, int board_id)
     Object *cpuobj;
     ARMCPU *cpu;
     MemoryRegion *sysmem = get_system_memory();
-    MemoryRegion *ram = g_new(MemoryRegion, 1);
     qemu_irq pic[32];
     qemu_irq sic[32];
     DeviceState *dev, *sysctl;
@@ -220,11 +219,9 @@ static void versatile_init(MachineState *machine, int board_id)
 
     cpu = ARM_CPU(cpuobj);
 
-    memory_region_allocate_system_memory(ram, NULL, "versatile.ram",
-                                         machine->ram_size);
     /* ??? RAM should repeat to fill physical memory space.  */
     /* SDRAM at address zero.  */
-    memory_region_add_subregion(sysmem, 0, ram);
+    memory_region_add_subregion(sysmem, 0, machine->ram);
 
     sysctl = qdev_create(NULL, "realview_sysctl");
     qdev_prop_set_uint32(sysctl, "sys_id", 0x41007004);
@@ -398,6 +395,7 @@ static void versatilepb_class_init(ObjectClass *oc, void *data)
     mc->block_default_type = IF_SCSI;
     mc->ignore_memory_transaction_failures = true;
     mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
+    mc->default_ram_id = "versatile.ram";
 }
 
 static const TypeInfo versatilepb_type = {
@@ -415,6 +413,7 @@ static void versatileab_class_init(ObjectClass *oc, void *data)
     mc->block_default_type = IF_SCSI;
     mc->ignore_memory_transaction_failures = true;
     mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926");
+    mc->default_ram_id = "versatile.ram";
 }
 
 static const TypeInfo versatileab_type = {
-- 
2.7.4



  parent reply	other threads:[~2020-01-23 12:10 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 11:37 [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 01/80] numa: remove deprecated -mem-path fallback to anonymous RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 02/80] machine: introduce memory-backend property Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 03/80] machine: alias -mem-path and -mem-prealloc into memory-foo backend Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 04/80] machine: introduce convenience MachineState::ram Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 05/80] initialize MachineState::ram in NUMA case Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 06/80] alpha:dp264: use memdev for RAM Igor Mammedov
2020-01-23 15:07   ` BALATON Zoltan
2020-01-24  8:13     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 07/80] arm/aspeed: actually check RAM size Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 08/80] arm/aspeed: use memdev for RAM Igor Mammedov
2020-01-23 12:08   ` Joel Stanley
2020-01-23 11:37 ` [PATCH REPOST v3 09/80] arm/collie: " Igor Mammedov
2020-01-23 12:27   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 10/80] arm/cubieboard: " Igor Mammedov
2020-01-23 12:30   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 11/80] arm/digic_boards: " Igor Mammedov
2020-01-23 12:32   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 12/80] arm/highbank: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 13/80] arm/imx25_pdk: drop RAM size fixup Igor Mammedov
2020-01-23 12:39   ` Andrew Jones
2020-01-23 14:32     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 14/80] arm/imx25_pdk: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 15/80] arm/integratorcp: " Igor Mammedov
2020-01-23 12:40   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 16/80] arm/kzm: drop RAM size fixup Igor Mammedov
2020-01-23 22:23   ` Chubb, Peter (Data61, Kensington NSW)
2020-01-24  8:10     ` Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 17/80] arm/kzm: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 18/80] arm/mcimx6ul-evk: " Igor Mammedov
2020-01-23 12:50   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 19/80] arm/mcimx7d-sabre: " Igor Mammedov
2020-01-23 12:51   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 20/80] arm/mps2-tz: " Igor Mammedov
2020-01-23 12:59   ` Andrew Jones
2020-01-23 13:39     ` Igor Mammedov
2020-01-23 14:37       ` Andrew Jones
2020-01-23 14:37   ` [PATCH v4 " Igor Mammedov
2020-01-23 14:47     ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 21/80] arm/mps2: " Igor Mammedov
2020-01-23 13:00   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 22/80] arm/musicpal: " Igor Mammedov
2020-01-23 13:07   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 23/80] arm/nseries: " Igor Mammedov
2020-01-23 13:09   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 24/80] arm/omap_sx1: " Igor Mammedov
2020-01-23 13:12   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 25/80] arm/palm: " Igor Mammedov
2020-01-23 13:13   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 26/80] arm/raspi: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 27/80] arm/sabrelite: " Igor Mammedov
2020-01-23 13:15   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 28/80] arm/sbsa-ref: " Igor Mammedov
2020-01-23 11:37 ` Igor Mammedov [this message]
2020-01-23 11:37 ` [PATCH REPOST v3 30/80] arm/vexpress: " Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 31/80] arm/virt: " Igor Mammedov
2020-01-23 13:17   ` Andrew Jones
2020-01-23 11:37 ` [PATCH REPOST v3 32/80] arm/xilinx_zynq: drop RAM size fixup Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 33/80] arm/xilinx_zynq: use memdev for RAM Igor Mammedov
2020-01-23 11:37 ` [PATCH REPOST v3 34/80] arm/xlnx-versal-virt: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 35/80] arm/xlnx-zcu102: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 36/80] s390x/s390-virtio-ccw: " Igor Mammedov
2020-01-23 18:05   ` Cornelia Huck
2020-01-23 11:38 ` [PATCH REPOST v3 37/80] null-machine: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 38/80] cris/axis_dev88: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 39/80] hw/hppa/machine: Correctly check the firmware is in PDC range Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 40/80] hw/hppa/machine: Restrict the total memory size to 3GB Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 41/80] hw/hppa/machine: Map the PDC memory region with higher priority Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 42/80] hppa: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 43/80] x86/microvm: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 44/80] x86/pc: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 45/80] lm32/lm32_boards: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 46/80] lm32/milkymist: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 47/80] m68k/an5206: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 48/80] m68k/mcf5208: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 49/80] m68k/next-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 50/80] mips/boston-cube: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 51/80] mips/mips_fulong2e: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 52/80] mips/mips_fulong2e: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 53/80] mips/mips_jazz: " Igor Mammedov
2020-01-24 17:15   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 54/80] mips/mips_malta: " Igor Mammedov
2020-01-24 17:16   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 55/80] mips/mips_mipssim: " Igor Mammedov
2020-01-24 17:17   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 56/80] mips/mips_r4k: " Igor Mammedov
2020-01-24 17:15   ` Aleksandar Markovic
2020-01-23 11:38 ` [PATCH REPOST v3 57/80] ppc/e500: drop RAM size fixup Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 58/80] ppc/e500: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 59/80] ppc/mac_newworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 60/80] ppc/mac_oldworld: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 61/80] ppc/pnv: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 62/80] ppc/ppc405_boards: add RAM size checks Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 63/80] ppc/ppc405_boards: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup Igor Mammedov
2020-01-23 16:22   ` BALATON Zoltan
2020-01-27  3:39   ` [PATCH REPOST v3 64/80] ppc/{ppc440_bamboo,sam460ex}: " David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 65/80] ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM Igor Mammedov
2020-01-23 16:23   ` BALATON Zoltan
2020-01-27  3:40   ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 66/80] ppc/prep: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 67/80] ppc/spapr: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 68/80] ppc/virtex_ml507: remove unused arguments Igor Mammedov
2020-01-24  9:40   ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 69/80] ppc/virtex_ml507: use memdev for RAM Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 70/80] sparc/leon3: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 71/80] sparc/sun4m: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 72/80] sparc/niagara: " Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 73/80] remove no longer used memory_region_allocate_system_memory() Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 74/80] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize() Igor Mammedov
2020-01-24 10:25   ` Igor Mammedov
2020-01-27  3:31     ` David Gibson
2020-01-27  8:06   ` [PATCH v3.1 " Igor Mammedov
2020-01-27  8:18     ` David Gibson
2020-01-23 11:38 ` [PATCH REPOST v3 75/80] exec: drop bogus mem_path from qemu_ram_alloc_from_fd() Igor Mammedov
2020-01-24  9:35   ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 76/80] make mem_path local variable Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 77/80] hostmem: introduce "prealloc-threads" property Igor Mammedov
2020-01-24  9:50   ` Igor Mammedov
2020-01-23 11:38 ` [PATCH REPOST v3 78/80] hostmem: fix strict bind policy Igor Mammedov
2020-01-24 19:17   ` Halil Pasic
2020-01-27  7:39     ` Igor Mammedov
2020-01-27 14:41       ` Halil Pasic
2020-01-28 12:07         ` Igor Mammedov
2020-01-28 12:37           ` Halil Pasic
2020-01-23 11:38 ` [PATCH REPOST v3 79/80] tests:numa-test: make top level args dynamic and g_autofree(cli) cleanups Igor Mammedov
2020-01-23 16:25   ` BALATON Zoltan
2020-01-23 16:33   ` Thomas Huth
2020-01-23 11:38 ` [PATCH REPOST v3 80/80] tests:numa-test: use explicit memdev to specify node RAM Igor Mammedov
2020-01-23 16:52   ` Thomas Huth
2020-01-23 13:04 ` [PATCH REPOST v3 00/80] refactor main RAM allocation to use hostmem backend no-reply
2020-01-23 14:45 ` Laurent Vivier
2020-01-23 16:14   ` [PATCH v4 81/80] m68k/q800: use memdev for RAM Igor Mammedov
2020-01-23 19:31     ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1579779525-20065-30-git-send-email-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.