config ACPI_HMAT
bool "ACPI Heterogeneous Memory Attribute Table Support"
depends on ACPI_NUMA
+ select HMEM_REPORTING
help
If set, this option has the kernel parse and report the
platform's ACPI HMAT (Heterogeneous Memory Attributes Table),
- and register memory initiators with their targets.
+ register memory initiators with their targets, and export
+ performance attributes through the node's sysfs device if
+ provided.
}
}
+static __init void hmat_register_target_perf(struct memory_target *target)
+{
+ unsigned mem_nid = pxm_to_node(target->memory_pxm);
+ node_set_perf_attrs(mem_nid, &target->hmem_attrs, 0);
+}
+
static __init void hmat_register_targets(void)
{
struct memory_target *target;
- list_for_each_entry(target, &targets, node)
+ list_for_each_entry(target, &targets, node) {
hmat_register_target_initiators(target);
+ hmat_register_target_perf(target);
+ }
}
static __init void hmat_free_structures(void)