Commit Graph

8 Commits

Author SHA1 Message Date
Hao Zhou 5cd963feb7 Revert "Revert^2 "Revert "Merge amd-staging into amd-master 20230524"""
This reverts commit be41c19d3c.

Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Ibfe63f701719d4eee7c589bd44ab88f720d3105d
2023-06-07 11:56:16 +08:00
Hao Zhou be41c19d3c Revert^2 "Revert "Merge amd-staging into amd-master 20230524""
4e044a1f6c

Change-Id: Ibb44f48a8ea2099de01cf04d31b47f2a2f2473ad
2023-06-02 02:12:07 -04:00
Hao Zhou 4e044a1f6c Revert "Revert "Merge amd-staging into amd-master 20230524""
This reverts commit 7d508f75ab.

Change-Id: I0f277acf328566485994b0a771b685172541874c
2023-06-02 10:11:10 +08:00
Hao Zhou 7d508f75ab Revert "Merge amd-staging into amd-master 20230524"
This reverts commit 3629c4d5ca.

Reason for revert: <commit break mainline rocm builds - RHEL-9>

Change-Id: Ideed94313b15bc8af2bd9855535d490fd84b5c3b
2023-05-25 01:53:24 -04:00
Bill(Shuzhou) Liu 160c99d12d SWDEV-400644: Reset the mutex only if errors
To prevent reset the mutex while using it, only reset the mutex
if it cannot acquire it.

Change-Id: I95e0ed1bf543f285ce81b4df9c51e16a88081d38
2023-05-22 11:20:44 -04:00
Bill(Shuzhou) Liu 76b5528feb Remove the shared mutex if no process is using it
If the code is crashed and the mutex may be in bad status. The user
has to mannually remove it. The fix will remove the shared mutex
if no process is using it.

Change-Id: I18bf562f2e0a7de8b3f0cccf72d60950b0d9bb2d
2022-11-22 10:30:58 -05:00
Chris Freehill f4938b0ac9 Fix process killed while holding mutex
Previously, when a process holding a shared mutex was killed,
the next time an RSMI application was started, it would not be
able to obtain the mutex--the application would have to exit.
This fix uses pthread_mutexattr_setrobust() to detect this
situation and act accordingingly.

Also, add some missing, needed mutexes and move mutexes
closer to where the protect resource is used.

Change-Id: Icfdc3a246f4cfa3fd008e3f13472199abd76fd35
2020-12-04 12:59:55 -05:00
Chris Freehill 6594f8f58b Refactor rsmi to support oam
Change-Id: Idc524e01ba06eb5c8d1682becaf5bf8ced5bffcf
2020-06-22 18:51:46 -05:00