]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Use non-atomic bitmap functions when possible
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 28 Nov 2021 16:46:15 +0000 (17:46 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Apr 2022 21:44:29 +0000 (17:44 -0400)
commit2de31a34f4ed1f4616584f7325d14471dfa8d3d5
tree342b9b2189ffe56774583f188a4ef518c8880def
parent4af532a2a76724b51968dba31f4b6441d2b52f9f
drm/amdkfd: Use non-atomic bitmap functions when possible

All uses of the 'kfd->gtt_sa_bitmap' bitmap are protected with the
'kfd->gtt_sa_lock' mutex.

So:
   - prefer the non-atomic '__set_bit()' function
   - use the non-atomic 'bitmap_[set|clear]()' functions instead of
     equivalent 'for' loops. These functions can work on several bits at a
     time

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c