]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
rtc: opal: Fix OPAL RTC driver OPAL_BUSY loops
authorNicholas Piggin <npiggin@gmail.com>
Wed, 13 Jun 2018 15:10:08 +0000 (11:10 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 17 Jul 2018 09:03:05 +0000 (11:03 +0200)
commit1e7c492e3514fb0f16d64fa47b6b93baa5066198
tree783ec6f0c20c1574ace3cac3275f2f3a1e7de44d
parent8df3cfc160cfa6bd7aeaa7930700ce78577aaa37
rtc: opal: Fix OPAL RTC driver OPAL_BUSY loops

BugLink: http://bugs.launchpad.net/bugs/1773964
The OPAL RTC driver does not sleep in case it gets OPAL_BUSY or
OPAL_BUSY_EVENT from firmware, which causes large scheduling
latencies, up to 50 seconds have been observed here when RTC stops
responding (BMC reboot can do 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")
Cc: stable@vger.kernel.org # v3.2+
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 682e6b4da5cbe8e9a53f979a58c2a9d7dc997175)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/powerpc/platforms/powernv/opal-rtc.c
drivers/rtc/rtc-opal.c