Skip to content

Commit

Permalink
drm/amd: Check that a system is a NUMA system before looking for SRAT
Browse files Browse the repository at this point in the history
It's pointless on laptops to look for the SRAT table as these are not
NUMA.  Check the number of possible nodes is > 1 to decide whether to
look for SRAT.

Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Mario Limonciello authored and Alex Deucher committed Jun 9, 2023
1 parent 7386f88 commit bbcc351
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_crat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,8 @@ static int kfd_fill_gpu_direct_io_link_to_cpu(int *avail_size,
sub_type_hdr->proximity_domain_from = proximity_domain;

#ifdef CONFIG_ACPI_NUMA
if (kdev->adev->pdev->dev.numa_node == NUMA_NO_NODE)
if (kdev->adev->pdev->dev.numa_node == NUMA_NO_NODE &&
num_possible_nodes() > 1)
kfd_find_numa_node_in_srat(kdev);
#endif
#ifdef CONFIG_NUMA
Expand Down

0 comments on commit bbcc351

Please sign in to comment.