]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: simplify cpu hive assignment
authorJonathan Kim <jonathan.kim@amd.com>
Fri, 13 May 2022 00:38:18 +0000 (20:38 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 May 2022 18:56:31 +0000 (14:56 -0400)
commit28b8e1e9d854ac772242c84aaa1df243e8009242
treec434c7e12e9523cc3166998ba45fcdfefb01bc9a
parent71d63657b961fcb312346746fd57b0ddfe9a7bf7
drm/amdkfd: simplify cpu hive assignment

CPU hive assignment currently assumes when a GPU hive is connected_to_cpu,
there is only one hive in the system.

Only assign CPUs to the hive if they are explicitly directly connected to
the GPU hive to get rid of the need for this assumption.

It's more efficient to do this when querying IO links since other non-CRAT
info has to be filled in anyways.  Also, stop re-assigning the
same CPU to the same GPU hive if it has already been done before.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c