From: Michael Ellerman <mpe@ellerman.id.au>
To: Daniel Klamt <eleon@ele0n.de>, benh@kernel.crashing.org
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, linux-kernel@i4.cs.fau.de,
Daniel Klamt <eleon@ele0n.de>, Bjoern Noetel <bjoern@br3ak3r.de>
Subject: Re: [PATCH] powerpc: Replaced msleep with usleep_range
Date: Thu, 12 Jul 2018 00:13:39 +1000 [thread overview]
Message-ID: <878t6hami4.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1531144679-31675-1-git-send-email-eleon@ele0n.de>
Hi Daniel,
Daniel Klamt <eleon@ele0n.de> writes:
> Replaced msleep for less than 10ms with usleep_range because will
> often sleep longer than intended.
> For original explanation see:
> Documentation/timers/timers-howto.txt
>
> Signed-off-by: Daniel Klamt <eleon@ele0n.de>
> Signed-off-by: Bjoern Noetel <bjoern@br3ak3r.de>
> ---
> arch/powerpc/sysdev/xive/native.c | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c
> index 311185b9960a..b164b1cdf4d6 100644
> --- a/arch/powerpc/sysdev/xive/native.c
> +++ b/arch/powerpc/sysdev/xive/native.c
> @@ -109,7 +109,7 @@ int xive_native_configure_irq(u32 hw_irq, u32 target, u8 prio, u32 sw_irq)
> rc = opal_xive_set_irq_config(hw_irq, target, prio, sw_irq);
> if (rc != OPAL_BUSY)
> break;
> - msleep(1);
> + usleep_range(1000, 1100)
> }
We have actually recently added OPAL_BUSY_DELAY_MS (see opal.h) and
should convert these to use that. eg:
msleep(OPAL_BUSY_DELAY_MS);
That has the effect of documenting that this is a short sleep to wait
for opal (our firmware), and we aren't concerned about rounding errors
in msleep().
If you send me a patch doing that I'd be happy to merge it.
cheers
next prev parent reply other threads:[~2018-07-11 14:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 13:57 Daniel Klamt
2018-07-09 20:07 ` kbuild test robot
2018-07-10 13:57 ` Michael Ellerman
2018-07-09 23:52 ` Benjamin Herrenschmidt
2018-07-11 14:13 ` Michael Ellerman [this message]
2018-07-11 22:03 ` [PATCH] powerpc: Replaced msleep(x) with msleep(OPAL_BUSY_DELAY_MS) Daniel Klamt
2018-07-12 5:46 ` Michael Ellerman
2018-07-12 7:58 ` Nicholas Piggin
2018-07-19 6:07 ` 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=878t6hami4.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=bjoern@br3ak3r.de \
--cc=eleon@ele0n.de \
--cc=linux-kernel@i4.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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
all inboxes | Powered by JetHome®