]> 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)
commitf7bcda4d0d21498a639642d43a278ba0dd964436
treec434c7e12e9523cc3166998ba45fcdfefb01bc9a
parent96beb454010c3feee2aebc0d6e56f7d05dbfc3c7
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