powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops
authorNicholas Piggin <npiggin@gmail.com>
Tue, 10 Apr 2018 11:49:33 +0000 (21:49 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:28 +0000 (09:36 +0200)
commit25b6ee378dc43fff21e778f1a21cb7e6dffa6e1a
treefdb1850886b0a316b8e54cf09a6e0b6f362cabea
parent7c854f2e1ff08edd35988acd733c6b1ad0e95e8b
powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops

commit 3b8070335f751aac9f1526ae2e012e6f5b8b0f21 upstream.

The OPAL NVRAM driver does not sleep in case it gets OPAL_BUSY or
OPAL_BUSY_EVENT from firmware, which causes large scheduling
latencies, and various lockup errors to trigger (again, BMC reboot
can cause it).

Fix this by converting it to the standard form OPAL_BUSY loop that
sleeps.

Fixes: 628daa8d5abf ("powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks")
Depends-on: 34dd25de9fe3 ("powerpc/powernv: define a standard delay for OPAL_BUSY type retry 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