HACK: gfx: pvr: Don't try to complete SGX commands in atomic context
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 9 Mar 2012 15:26:07 +0000 (17:26 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:32 +0000 (12:30 +0300)
commite5eaff53a81f941e9762641e26d438387acc218d
treeb08a89cacb69e69bb912750844907d4af8026f95
parent14be372b226355cee36965670dd510c1010868fc
HACK: gfx: pvr: Don't try to complete SGX commands in atomic context

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>
drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxinit.c