Skip to content

Commit bcf6f17

Browse files
vittyvkrafaeljw
authored andcommitted
ACPI: NUMA: Process hotpluggable memblocks when !CONFIG_MEMORY_HOTPLUG
Some systems (e.g. Hyper-V guests) have all their memory marked as hotpluggable in SRAT. acpi_numa_memory_affinity_init(), however, ignores all such regions when !CONFIG_MEMORY_HOTPLUG and this is unfortunate as memory affinity (NUMA) information gets lost. 'Hot Pluggable' flag in SRAT only means that "system hardware supports hot-add and hot-remove of this memory region", it doesn't prevent memory from being cold-plugged there. Ignore 'Hot Pluggable' bit instead of skipping the whole memory affinity information when !CONFIG_MEMORY_HOTPLUG. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 2585cf9 commit bcf6f17

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/acpi/numa/srat.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
254254
}
255255
if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0)
256256
goto out_err;
257-
hotpluggable = ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE;
258-
if (hotpluggable && !IS_ENABLED(CONFIG_MEMORY_HOTPLUG))
259-
goto out_err;
257+
hotpluggable = IS_ENABLED(CONFIG_MEMORY_HOTPLUG) &&
258+
(ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE);
260259

261260
start = ma->base_address;
262261
end = start + ma->length;

0 commit comments

Comments
 (0)