Skip to content

Commit 54b9460

Browse files
davejiangdjbw
authored andcommitted
ACPI: HMAT: Remove register of memory node for generic target
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>
1 parent d206a76 commit 54b9460

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/acpi/numa/hmat.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,12 +770,12 @@ static void __hmat_register_target_initiators(struct memory_target *target,
770770
}
771771
}
772772

773-
static void hmat_register_generic_target_initiators(struct memory_target *target)
773+
static void hmat_update_generic_target(struct memory_target *target)
774774
{
775775
static DECLARE_BITMAP(p_nodes, MAX_NUMNODES);
776776

777-
__hmat_register_target_initiators(target, p_nodes,
778-
NODE_ACCESS_CLASS_GENPORT_SINK);
777+
hmat_update_target_attrs(target, p_nodes,
778+
NODE_ACCESS_CLASS_GENPORT_SINK);
779779
}
780780

781781
static void hmat_register_target_initiators(struct memory_target *target)
@@ -835,7 +835,7 @@ static void hmat_register_target(struct memory_target *target)
835835
*/
836836
mutex_lock(&target_lock);
837837
if (*(u16 *)target->gen_port_device_handle) {
838-
hmat_register_generic_target_initiators(target);
838+
hmat_update_generic_target(target);
839839
target->registered = true;
840840
}
841841
mutex_unlock(&target_lock);

0 commit comments

Comments
 (0)