diff options
author | Keith Busch <keith.busch@intel.com> | 2019-03-11 14:56:04 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-04 18:41:21 +0200 |
commit | 8d59f5a2ca765f65fd86db86f233678c3770819f (patch) | |
tree | deaae672a3d604d9f10611c5e2047cf9bc5263b3 /drivers/acpi/hmat/hmat.c | |
parent | acpi/hmat: Register processor domain to its memory (diff) | |
download | linux-dev-8d59f5a2ca765f65fd86db86f233678c3770819f.tar.xz linux-dev-8d59f5a2ca765f65fd86db86f233678c3770819f.zip |
acpi/hmat: Register performance attributes
Save the best performance access attributes and register these with the
memory's node if HMAT provides the locality table. While HMAT does make
it possible to know performance for all possible initiator-target
pairings, we export only the local pairings at this time.
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Tested-by: Brice Goglin <Brice.Goglin@inria.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/hmat/hmat.c')
-rw-r--r-- | drivers/acpi/hmat/hmat.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c index 01a6eddac6f7..7a3a2b50cadd 100644 --- a/drivers/acpi/hmat/hmat.c +++ b/drivers/acpi/hmat/hmat.c @@ -545,12 +545,20 @@ static __init void hmat_register_target_initiators(struct memory_target *target) } } +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) |