Skip to content

Commit 541e85e

Browse files
davejianggregkh
authored andcommitted
ACPI: HMAT: Remove register of memory node for generic target
commit 54b9460 upstream. For generic targets, there's no reason to call register_memory_node_under_compute_node() with the access levels that are only visible to HMAT handling code. Only update the attributes and rename hmat_register_generic_target_initiators() to hmat_update_generic_target(). The original call path ends up triggering register_memory_node_under_compute_node(). Although the access level would be "3" and not impact any current node arrays, it introduces unwanted data into the numa node access_coordinate array. Fixes: a3a3e34 ("acpi: numa: Add setting of generic port system locality attributes") Cc: Rafael J. Wysocki <rafael@kernel.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20240308220055.2172956-2-dave.jiang@intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 41ea28d commit 541e85e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/acpi/numa/hmat.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -729,12 +729,12 @@ static void __hmat_register_target_initiators(struct memory_target *target,
729729
}
730730
}
731731

732-
static void hmat_register_generic_target_initiators(struct memory_target *target)
732+
static void hmat_update_generic_target(struct memory_target *target)
733733
{
734734
static DECLARE_BITMAP(p_nodes, MAX_NUMNODES);
735735

736-
__hmat_register_target_initiators(target, p_nodes,
737-
NODE_ACCESS_CLASS_GENPORT_SINK);
736+
hmat_update_target_attrs(target, p_nodes,
737+
NODE_ACCESS_CLASS_GENPORT_SINK);
738738
}
739739

740740
static void hmat_register_target_initiators(struct memory_target *target)
@@ -818,7 +818,7 @@ static void hmat_register_target(struct memory_target *target)
818818
*/
819819
mutex_lock(&target_lock);
820820
if (*(u16 *)target->gen_port_device_handle) {
821-
hmat_register_generic_target_initiators(target);
821+
hmat_update_generic_target(target);
822822
target->registered = true;
823823
}
824824
mutex_unlock(&target_lock);

0 commit comments

Comments
 (0)