powerpc/powernv: Fix NVRAM sleep in invalid context when crashing
authorNicholas Piggin <npiggin@gmail.com>
Mon, 14 May 2018 15:59:47 +0000 (01:59 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 17 May 2018 14:23:07 +0000 (00:23 +1000)
commitc1d2a31397ec51f0370f6bd17b19b39152c263cb
tree9962f0d0a9da497be14ef59ed624a5a15befc85f
parent497a0790e2c604366b9e35dcb41310319e9bca13
powerpc/powernv: Fix NVRAM sleep in invalid context when crashing

Similarly to opal_event_shutdown, opal_nvram_write can be called in
the crash path with irqs disabled. Special case the delay to avoid
sleeping in invalid context.

Fixes: 3b8070335f75 ("powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops")
Cc: stable@vger.kernel.org # v3.2
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal-nvram.c