- take pvr_lock in the interrupt handling work (MISR) thread, as from
there we can call functions accessing HW and SW state tracking objects.
An example is the SGX HW recovery function.
- make SGXOSTimerCancel asynchronous. This is safe now as a previous
patch made sure that the timer will not run after cancelled. We can't
do synchronous cancellation, because there would be an ABBA lockdep
problem involving the SGXOSTimer's mutex and pvr_lock:
MISR / IOCTL thread:
1. pvr_lock in PVRSRV_BridgeDispatchKM
2. timer's lock through SGXPrePowerState -> SGXOSTimerCancel
SGXOSTimer's thread:
1. timer's lock already taken when SGXOSTimer is called
2. pvr_lock in SGXOSTimer
Signed-off-by: Imre Deak <imre.deak@nokia.com>
return;
}
+ pvr_lock();
+
psDeviceNode = psSysData->psDeviceNodeList;
while (psDeviceNode != NULL) {
if (psDeviceNode->pfnDeviceMISR != NULL)
if (hOSEventKM)
OSEventObjectSignal(hOSEventKM);
}
+
+ pvr_unlock();
}
enum PVRSRV_ERROR PVRSRVProcessConnect(u32 ui32PID)
return PVRSRV_ERROR_GENERIC;
data->armed = false;
- cancel_delayed_work_sync(&data->work);
+ cancel_delayed_work(&data->work);
return PVRSRV_OK;
}