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)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 11 Apr 2018 01:58:43 +0000 (11:58 +1000)
commit3b8070335f751aac9f1526ae2e012e6f5b8b0f21
tree3fea8750d6881de6cc071e9b4dc43d92cfad7e35
parent34dd25de9fe3f60bfdb31b473bf04b28262d0896
powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops

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>
arch/powerpc/platforms/powernv/opal-nvram.c