From: Prashant Gaikwad <pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 1/2] ARM: tegra: fix overflow in tegra20_pll_clk_round_rate()
Date: Tue, 11 Sep 2012 11:49:26 +0530 [thread overview]
Message-ID: <504ED7EE.5050103@nvidia.com> (raw)
In-Reply-To: <1347318758-7954-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
On Tuesday 11 September 2012 04:42 AM, Stephen Warren wrote:
> From: Stephen Warren<swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> 32-bit math isn't enough when e.g. *prate=12000000, and sel->n=1000.
> Use 64-bit math to prevent this.
Thanks Stephen!!
> Cc: Prashant Gaikwad<pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Stephen Warren<swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> Prashant, can you please audit all of the Tegra clock driver to see if
> there are any other instances of the same issue? Thanks.
Sure.
> ---
> arch/arm/mach-tegra/tegra20_clocks.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/tegra20_clocks.c b/arch/arm/mach-tegra/tegra20_clocks.c
> index ee6922b..e2a43e4 100644
> --- a/arch/arm/mach-tegra/tegra20_clocks.c
> +++ b/arch/arm/mach-tegra/tegra20_clocks.c
> @@ -798,7 +798,7 @@ static long tegra20_pll_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> struct clk_tegra *c = to_clk_tegra(hw);
> const struct clk_pll_freq_table *sel;
> unsigned long input_rate = *prate;
> - unsigned long output_rate = *prate;
> + u64 output_rate = *prate;
> int mul;
> int div;
>
WARNING: multiple messages have this Message-ID (diff)
From: pgaikwad@nvidia.com (Prashant Gaikwad)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: tegra: fix overflow in tegra20_pll_clk_round_rate()
Date: Tue, 11 Sep 2012 11:49:26 +0530 [thread overview]
Message-ID: <504ED7EE.5050103@nvidia.com> (raw)
In-Reply-To: <1347318758-7954-1-git-send-email-swarren@wwwdotorg.org>
On Tuesday 11 September 2012 04:42 AM, Stephen Warren wrote:
> From: Stephen Warren<swarren@nvidia.com>
>
> 32-bit math isn't enough when e.g. *prate=12000000, and sel->n=1000.
> Use 64-bit math to prevent this.
Thanks Stephen!!
> Cc: Prashant Gaikwad<pgaikwad@nvidia.com>
> Signed-off-by: Stephen Warren<swarren@nvidia.com>
> ---
> Prashant, can you please audit all of the Tegra clock driver to see if
> there are any other instances of the same issue? Thanks.
Sure.
> ---
> arch/arm/mach-tegra/tegra20_clocks.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/tegra20_clocks.c b/arch/arm/mach-tegra/tegra20_clocks.c
> index ee6922b..e2a43e4 100644
> --- a/arch/arm/mach-tegra/tegra20_clocks.c
> +++ b/arch/arm/mach-tegra/tegra20_clocks.c
> @@ -798,7 +798,7 @@ static long tegra20_pll_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> struct clk_tegra *c = to_clk_tegra(hw);
> const struct clk_pll_freq_table *sel;
> unsigned long input_rate = *prate;
> - unsigned long output_rate = *prate;
> + u64 output_rate = *prate;
> int mul;
> int div;
>
next prev parent reply other threads:[~2012-09-11 6:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 23:12 [PATCH 1/2] ARM: tegra: fix overflow in tegra20_pll_clk_round_rate() Stephen Warren
2012-09-10 23:12 ` Stephen Warren
[not found] ` <1347318758-7954-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-09-10 23:12 ` [PATCH 2/2] ARM: tegra: cpu-tegra: explicitly manage re-parenting Stephen Warren
2012-09-10 23:12 ` Stephen Warren
[not found] ` <1347318758-7954-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-09-11 4:45 ` Mike Turquette
2012-09-11 4:45 ` Mike Turquette
2012-09-11 5:43 ` Stephen Warren
2012-09-11 5:43 ` Stephen Warren
[not found] ` <504F22E6.9040307@nvidia.com>
[not found] ` <504F22E6.9040307-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-09-11 17:20 ` Mike Turquette
2012-09-11 17:20 ` Mike Turquette
2012-09-12 4:10 ` Shawn Guo
2012-09-12 4:10 ` Shawn Guo
[not found] ` <20120912041001.GB3402-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-09-12 3:57 ` Turquette, Mike
2012-09-12 3:57 ` Turquette, Mike
2012-09-11 6:19 ` Prashant Gaikwad [this message]
2012-09-11 6:19 ` [PATCH 1/2] ARM: tegra: fix overflow in tegra20_pll_clk_round_rate() Prashant Gaikwad
2012-09-11 16:38 ` Stephen Warren
2012-09-11 16:38 ` Stephen Warren
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=504ED7EE.5050103@nvidia.com \
--to=pgaikwad-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.