SGXCommandComplete() may be called while holding a spinlock. In such
cases we want to defer the command completion to the MISR. As a quick
non-intrusive hack, add a simple in_atomic() check to
SGXCommandComplete() to make that happen. Obviously this only works
with CONFIG_PREEMPT kernels.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
static IMG_VOID SGXCommandComplete(PVRSRV_DEVICE_NODE *psDeviceNode)
{
#if defined(OS_SUPPORTS_IN_LISR)
- if (OSInLISR(psDeviceNode->psSysData))
+ if (OSInLISR(psDeviceNode->psSysData) || in_atomic())
{
psDeviceNode->bReProcessDeviceCommandComplete = IMG_TRUE;