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 <tangc...@cn.fujitsu.com>
Reviewed-by: Wanpeng Li <liw...@linux.vnet.ibm.com>
Reviewed-by: Zhang Yanfei <zhangyan...@cn.fujitsu.com>
Acked-by: Tejun Heo <t...@kernel.org>
---
 arch/x86/mm/srat.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index 1613c02..71411aa 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -141,6 +141,7 @@ acpi_numa_memory_affinity_init(struct 
acpi_srat_mem_affinity *ma)
 {
        u64 start, end;
        int node, pxm;
+       u32 hotpluggable;
 
        if (srat_disabled())
                goto out_err;
@@ -152,6 +153,8 @@ acpi_numa_memory_affinity_init(struct 
acpi_srat_mem_affinity *ma)
        start = ma->base_address;
        end = start + ma->length;
        pxm = ma->proximity_domain;
+       hotpluggable = ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE;
+
        if (acpi_srat_revision <= 1)
                pxm &= 0xff;
 
@@ -166,9 +169,10 @@ acpi_numa_memory_affinity_init(struct 
acpi_srat_mem_affinity *ma)
 
        node_set(node, numa_nodes_parsed);
 
-       printk(KERN_INFO "SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n",
-              node, pxm,
-              (unsigned long long) start, (unsigned long long) end - 1);
+       pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s\n",
+               node, pxm,
+               (unsigned long long) start, (unsigned long long) end - 1,
+               hotpluggable ? " hotplug" : "");
 
        return 0;
 out_err_bad_srat:
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to