Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI / x86: Print Hot-Pluggable Field in SRAT.

The Hot-Pluggable field in SRAT suggests if the memory could be
hotplugged while the system is running. Print it as well when
parsing SRAT will help users to know which memory is hotpluggable.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Tang Chen and committed by
Rafael J. Wysocki
d7b2c3d8 70f2903b

+7 -4
+7 -4
arch/x86/mm/srat.c
··· 146 146 acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) 147 147 { 148 148 u64 start, end; 149 + u32 hotpluggable; 149 150 int node, pxm; 150 151 151 152 if (srat_disabled()) ··· 155 154 goto out_err_bad_srat; 156 155 if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0) 157 156 goto out_err; 158 - if ((ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) && !save_add_info()) 157 + hotpluggable = ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE; 158 + if (hotpluggable && !save_add_info()) 159 159 goto out_err; 160 160 161 161 start = ma->base_address; ··· 176 174 177 175 node_set(node, numa_nodes_parsed); 178 176 179 - printk(KERN_INFO "SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n", 180 - node, pxm, 181 - (unsigned long long) start, (unsigned long long) end - 1); 177 + pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s\n", 178 + node, pxm, 179 + (unsigned long long) start, (unsigned long long) end - 1, 180 + hotpluggable ? " hotplug" : ""); 182 181 183 182 return 0; 184 183 out_err_bad_srat: