mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
769e8d93be
commit
f0530f14c7
2 changed files with 0 additions and 66 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue