Skip to contentSkip to conversation

drm/amd: Don't look for SRAT on systems without NUMA

PATCH New Mario Limonciello 1 participant 1 message Jan 19, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd: Don't look for SRAT on systems without NUMA

Laptops that have NUMA won't have an SRAT. Only look for SRAT when it should be there.

---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +2 -1
index 3251f4783ba10..e303122a9a944 100644
@@ -2028,7 +2028,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
Signature · 1 line
2.34.1