summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0882473)
raw | patch | inline | side by side (parent: 0882473)
author | Hemant Hariyani <hemanthariyani@ti.com> | |
Wed, 4 Dec 2013 16:57:20 +0000 (10:57 -0600) | ||
committer | Hemant Hariyani <hemanthariyani@ti.com> | |
Wed, 4 Dec 2013 16:57:20 +0000 (10:57 -0600) |
Fixes mutex deadlock warning during boot.
Change-Id: Ieb292a7b1bba3269c8df8e8c3f836dc7b50fabd4
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Change-Id: Ieb292a7b1bba3269c8df8e8c3f836dc7b50fabd4
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz
index 7aaa04822e2a4559049212f2171ec72db5896520..9d1683bebeb51a06db5570d00162675d2abea608 100644 (file)
Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ
Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mm.c
index b1947941ed6063e7f1955dc1269a850f87ab0522..56cf52ce2f95fea43a114673fc295e92ca638207 100644 (file)
{
DEBUG_MEM_ALLOC_REC *psRecord;
- LinuxLockMutex(&g_sDebugMutex);
+ LinuxLockMutexNested(&g_sDebugMutex, PVRSRV_LOCK_CLASS_MM_DEBUG);
psRecord = kmalloc(sizeof(DEBUG_MEM_ALLOC_REC), GFP_KERNEL);
@@ -412,7 +412,7 @@ DebugMemAllocRecordRemove(DEBUG_MEM_ALLOC_TYPE eAllocType, IMG_VOID *pvKey, IMG_
{
/* DEBUG_MEM_ALLOC_REC **ppsCurrentRecord;*/
- LinuxLockMutex(&g_sDebugMutex);
+ LinuxLockMutexNested(&g_sDebugMutex, PVRSRV_LOCK_CLASS_MM_DEBUG);
/* Locate the corresponding allocation entry */
if (!List_DEBUG_MEM_ALLOC_REC_IMG_BOOL_Any_va(g_MemoryRecords,
@@ -1968,7 +1968,7 @@ DebugLinuxMemAreaRecordAdd(LinuxMemArea *psLinuxMemArea, IMG_UINT32 ui32Flags)
DEBUG_LINUX_MEM_AREA_REC *psNewRecord;
const IMG_CHAR *pi8FlagsString;
- LinuxLockMutex(&g_sDebugMutex);
+ LinuxLockMutexNested(&g_sDebugMutex, PVRSRV_LOCK_CLASS_MM_DEBUG);
if (psLinuxMemArea->eAreaType != LINUX_MEM_AREA_SUB_ALLOC)
{
{
DEBUG_LINUX_MEM_AREA_REC *psCurrentRecord;
- LinuxLockMutex(&g_sDebugMutex);
+ LinuxLockMutexNested(&g_sDebugMutex, PVRSRV_LOCK_CLASS_MM_DEBUG);
psCurrentRecord = List_DEBUG_LINUX_MEM_AREA_REC_Any_va(g_LinuxMemAreaRecords,
MatchLinuxMemArea_AnyVaCb,
psLinuxMemArea);
{
DEBUG_LINUX_MEM_AREA_REC *psCurrentRecord;
- LinuxLockMutex(&g_sDebugMutex);
+ LinuxLockMutexNested(&g_sDebugMutex, PVRSRV_LOCK_CLASS_MM_DEBUG);
if (psLinuxMemArea->eAreaType != LINUX_MEM_AREA_SUB_ALLOC)
{
@@ -2259,7 +2259,7 @@ static void ProcSeqStartstopDebugMutex(struct seq_file *sfile, IMG_BOOL start)
{
if (start)
{
- LinuxLockMutex(&g_sDebugMutex);
+ LinuxLockMutexNested(&g_sDebugMutex, PVRSRV_LOCK_CLASS_MM_DEBUG);
}
else
{
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/module.c
index e7b161f9d83ab7009e4254ea82cdea2cc0cbada5..6d50cdbccc86592a3e78f332a82fc90c866adbbe 100644 (file)
{
PVR_TRACE(("PVRSRVDriverShutdown(pDevice=%p)", pDevice));
- LinuxLockMutex(&gsPMMutex);
+ LinuxLockMutexNested(&gsPMMutex, PVRSRV_LOCK_CLASS_POWER);
if (!bDriverIsShutdown && !bDriverIsSuspended)
{
#if !(defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) && !defined(SUPPORT_DRI_DRM))
PVR_TRACE(( "PVRSRVDriverSuspend(pDevice=%p)", pDevice));
- LinuxLockMutex(&gsPMMutex);
+ LinuxLockMutexNested(&gsPMMutex, PVRSRV_LOCK_CLASS_POWER);
if (!bDriverIsSuspended && !bDriverIsShutdown)
{
#if !(defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) && !defined(SUPPORT_DRI_DRM))
PVR_TRACE(("PVRSRVDriverResume(pDevice=%p)", pDevice));
- LinuxLockMutex(&gsPMMutex);
+ LinuxLockMutexNested(&gsPMMutex, PVRSRV_LOCK_CLASS_POWER);
if (bDriverIsSuspended && !bDriverIsShutdown)
{
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutex.h b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mutex.h
index 816cf4a9735e45f2a31ad1eeccb65901c0eb321c..09ae46d4183e684e7982275d4e9bdda624acda90 100644 (file)
enum PVRSRV_MUTEX_LOCK_CLASS
{
+ PVRSRV_LOCK_CLASS_POWER,
PVRSRV_LOCK_CLASS_BRIDGE,
PVRSRV_LOCK_CLASS_MMAP,
+ PVRSRV_LOCK_CLASS_MM_DEBUG,
+ PVRSRV_LOCK_CLASS_PVR_DEBUG,
};
extern IMG_VOID LinuxInitMutex(PVRSRV_LINUX_MUTEX *psPVRSRVMutex);
diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_debug.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_debug.c
index 04e42ad3afbb92a7f1e52512df5b6829c90ac5c2..3958f84fe124d9688ca6e53d8037ca0c2d7a2715 100644 (file)
#if !defined(PVR_DEBUG_ALWAYS_USE_SPINLOCK)
else
{
- LinuxLockMutex(&gsDebugMutexNonIRQ);
+ LinuxLockMutexNested(&gsDebugMutexNonIRQ, PVRSRV_LOCK_CLASS_PVR_DEBUG);
}
#endif
}