mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: Stephen Boyd <sboyd@kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steve Longerbeam <steve_longerbeam@mentor.com>
Subject: Re: [PATCH] clk: vc5: Avoid divide by zero when rounding or setting rates
Date: Wed, 18 Jul 2018 10:56:51 -0700	[thread overview]
Message-ID: <9b8f68f6-dd88-cc1a-6f13-b4d2fedadead@gmail.com> (raw)
In-Reply-To: <153090140728.143105.7720351459587498082@swboyd.mtv.corp.google.com>



On 07/06/2018 11:23 AM, Stephen Boyd wrote:
> Quoting Steve Longerbeam (2018-05-31 18:59:17)
>> Add checks in the .round_rate and .set_rate ops for zero requested
>> rate or zero parent rate. If either are zero in .round_rate, just
>> return zero. If either are zero in .set_rate, return -EINVAL.
> Are you seeing problems when the clk is unparented and we're trying to
> recalculate the rate or change rates, and thus the parent frequency
> looks like 0?

The problem appeared when suspending the rcar-du driver.
The kernel tested is a Renesas BSP release (3.6.2), and in the
version of the rcar-du driver from that release, the driver calls
clk_set_rate() with a rate of zero in its suspend PM op. This is
fixed in mainline kernel. So the divide-by-zero in vc5 clock driver
probably will not show up in mainline.

>   Should this get a Fixes: tag so that it goes back to
> stable kernels?
>

Zero rates are not checked beginning with the initial commit
3e1aec4e2c ("clk: vc5: Add support for IDT VersaClock 5P49V5923 and 
5P49V5933").
so that would have to be the Fixes: tag.

Steve


  reply	other threads:[~2018-07-18 17:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01  1:59 Steve Longerbeam
2018-07-06 18:23 ` Stephen Boyd
2018-07-18 17:56   ` Steve Longerbeam [this message]
2018-08-02 20:52     ` Stephen Boyd

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=9b8f68f6-dd88-cc1a-6f13-b4d2fedadead@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=steve_longerbeam@mentor.com \
    /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®