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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 May 2018 16:53:58 +0000 (18:53 +0200)
commit094595ce570121ecd03011c25eb30716caf845d3
tree6aefa7ed24f1f97aa1972ac6d70a1152ed7d962c
parentf4f05f62d3d19fc9c541a9186e511584ff9000b2
powerpc/powernv: Fix NVRAM sleep in invalid context when crashing

commit c1d2a31397ec51f0370f6bd17b19b39152c263cb upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/powernv/opal-nvram.c