aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2020-02-19 11:09:46 -0500
committerPatchew Importer <importer@patchew.org>2020-02-19 16:50:01 +0000
commitf0530f14c7c35d4050fd5da11f97dae3cd48d842 (patch)
tree58d50c8d6933ca389ef7c8e1afa8afb4c93acc93 /hw/core
parent769e8d93bebfbe51817b915ef623944442ab3af3 (diff)
downloadqemu-f0530f14c7c35d4050fd5da11f97dae3cd48d842.zip
qemu-f0530f14c7c35d4050fd5da11f97dae3cd48d842.tar.gz
qemu-f0530f14c7c35d4050fd5da11f97dae3cd48d842.tar.bz2
remove no longer used memory_region_allocate_system_memory()
all boards were switched to using memdev backend for main RAM, so we can drop no longer used memory_region_allocate_system_memory() Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200219160953.13771-73-imammedo@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/numa.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/hw/core/numa.c b/hw/core/numa.c
index e6baf2c..316bc50 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -806,40 +806,6 @@ void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp)
}
}
-static void allocate_system_memory_nonnuma(MemoryRegion *mr, Object *owner,
- const char *name,
- uint64_t ram_size)
-{
- if (mem_path) {
-#ifdef __linux__
- memory_region_init_ram_from_file(mr, owner, name, ram_size, 0, 0,
- mem_path, &error_fatal);
-#else
- fprintf(stderr, "-mem-path not supported on this host\n");
- exit(1);
-#endif
- } else {
- memory_region_init_ram_nomigrate(mr, owner, name, ram_size, &error_fatal);
- }
- vmstate_register_ram_global(mr);
-}
-
-void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
- const char *name,
- uint64_t ram_size)
-{
- MachineState *ms = MACHINE(qdev_get_machine());
-
- if (ms->numa_state == NULL ||
- ms->numa_state->num_nodes == 0 || numa_uses_legacy_mem()) {
- allocate_system_memory_nonnuma(mr, owner, name, ram_size);
- return;
- }
-
- memory_region_init(mr, owner, name, ram_size);
- numa_init_memdev_container(ms, mr);
-}
-
static void numa_stat_memory_devices(NumaNodeMem node_mem[])
{
MemoryDeviceInfoList *info_list = qmp_memory_device_list();