From: Nicholas Piggin <npiggin@gmail.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH 2/3] powerpc/powernv: Fix OPAL RTC driver OPAL_BUSY loops
Date: Tue, 10 Apr 2018 23:01:36 +1000 [thread overview]
Message-ID: <20180410230136.7d0b357e@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20180410120728.GC2745@piout.net>
On Tue, 10 Apr 2018 14:07:28 +0200
Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:
> Hi Nicholas,
>
> I would greatly appreciate a changelog and at least the cover letter
> because it is difficult to grasp how this relates to the previous
> patches you sent to the RTC mailing list.
Yes good point. Basically this change is "standalone" except using
OPAL_BUSY_DELAY_MS define from patch 1. That patch has a lot of
comments about firmware delays I did not think would be too
interesting.
Basically we're adding msleep(10) here, because the firmware can
repeatedly return OPAL_BUSY for long periods, so we want to context
switch and respond to interrupts.
>
> On 10/04/2018 21:49:32+1000, Nicholas Piggin wrote:
> > 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 ("powerpc/powernv: Add RTC and NVRAM support plus RTAS fallbacks"
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: linux-rtc@vger.kernel.org
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> > arch/powerpc/platforms/powernv/opal-rtc.c | 8 +++--
> > drivers/rtc/rtc-opal.c | 37 ++++++++++++++---------
>
> From what I understand, the changes in those files are fairly
> independent, they should probably be separated to ease merging.
I'm happy to do that. It's using the same firmware call, so I thought
a single patch would be fine. But I guess the boot call can be
dropped from this patch because it does not not solve the problem
described in the changelog.
Would you be happy for the driver change to be merged via the powerpc
tree? The code being fixed here came from the same original patch as
a similar issue being fixed in the OPAL NVRAM driver so it might be
easier that way.
Thanks,
Nick
next prev parent reply other threads:[~2018-04-10 13:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 11:49 [PATCH 0/3] Fix RTC and NVRAM OPAL_BUSY loops Nicholas Piggin
2018-04-10 11:49 ` [PATCH 1/3] powerpc/powernv: define a standard delay for OPAL_BUSY type retry loops Nicholas Piggin
2018-04-11 14:49 ` [1/3] " Michael Ellerman
2018-04-10 11:49 ` [PATCH 2/3] powerpc/powernv: Fix OPAL RTC driver OPAL_BUSY loops Nicholas Piggin
2018-04-10 12:07 ` Alexandre Belloni
2018-04-10 13:01 ` Nicholas Piggin [this message]
2018-04-24 18:39 ` Alexandre Belloni
2018-04-25 3:28 ` Michael Ellerman
2018-04-25 9:41 ` Alexandre Belloni
2018-04-26 10:22 ` [2/3] " Michael Ellerman
2018-04-10 11:49 ` [PATCH 3/3] powerpc/powernv: Fix OPAL NVRAM " Nicholas Piggin
2018-04-11 14:49 ` [3/3] " Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180410230136.7d0b357e@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=benh@kernel.crashing.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).