From: Shawn Guo <shawnguo@kernel.org>
To: Peng Fan <peng.fan@nxp.com>
Cc: "sboyd@kernel.org" <sboyd@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>,
Abel Vesa <abel.vesa@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
dl-linux-imx <linux-imx@nxp.com>,
Aisheng Dong <aisheng.dong@nxp.com>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Leonard Crestez <leonard.crestez@nxp.com>
Subject: Re: [PATCH] clk: imx: pll14xx: fix clk_pll14xx_wait_lock
Date: Wed, 4 Dec 2019 10:19:09 +0800 [thread overview]
Message-ID: <20191204021908.GN9767@dragon> (raw)
In-Reply-To: <1573018178-14939-1-git-send-email-peng.fan@nxp.com>
On Wed, Nov 06, 2019 at 05:31:15AM +0000, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> The usage of readl_poll_timeout is wrong, the cond should be
> "val & LOCK_STATUS" not "val & LOCK_TIMEOUT_US".
Is this caught just by code inspection or a real world bug? If you want
this get into -rc (and stable kernel) as a fix, you should add more
information about the bug, like how it's been triggered, what's the
consequence of the bug, and kernel dump message etc.
>
> Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> V1:
> Hi Shawn,
> This patch is made based on 5.4-rc6, not your for-next branch,
Please rebase it on 5.5-rc1 which will be coming next Monday.
> not sure whether this patch could catch 5.4 release.
You can Cc stable kernel, so that it will be back ported.
Shawn
>
> drivers/clk/imx/clk-pll14xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
> index 7a815ec76aa5..d43b4a3c0de8 100644
> --- a/drivers/clk/imx/clk-pll14xx.c
> +++ b/drivers/clk/imx/clk-pll14xx.c
> @@ -153,7 +153,7 @@ static int clk_pll14xx_wait_lock(struct clk_pll14xx *pll)
> {
> u32 val;
>
> - return readl_poll_timeout(pll->base, val, val & LOCK_TIMEOUT_US, 0,
> + return readl_poll_timeout(pll->base, val, val & LOCK_STATUS, 0,
> LOCK_TIMEOUT_US);
> }
>
> --
> 2.16.4
>
WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Peng Fan <peng.fan@nxp.com>
Cc: Aisheng Dong <aisheng.dong@nxp.com>,
Abel Vesa <abel.vesa@nxp.com>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
Leonard Crestez <leonard.crestez@nxp.com>,
"festevam@gmail.com" <festevam@gmail.com>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] clk: imx: pll14xx: fix clk_pll14xx_wait_lock
Date: Wed, 4 Dec 2019 10:19:09 +0800 [thread overview]
Message-ID: <20191204021908.GN9767@dragon> (raw)
In-Reply-To: <1573018178-14939-1-git-send-email-peng.fan@nxp.com>
On Wed, Nov 06, 2019 at 05:31:15AM +0000, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> The usage of readl_poll_timeout is wrong, the cond should be
> "val & LOCK_STATUS" not "val & LOCK_TIMEOUT_US".
Is this caught just by code inspection or a real world bug? If you want
this get into -rc (and stable kernel) as a fix, you should add more
information about the bug, like how it's been triggered, what's the
consequence of the bug, and kernel dump message etc.
>
> Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> V1:
> Hi Shawn,
> This patch is made based on 5.4-rc6, not your for-next branch,
Please rebase it on 5.5-rc1 which will be coming next Monday.
> not sure whether this patch could catch 5.4 release.
You can Cc stable kernel, so that it will be back ported.
Shawn
>
> drivers/clk/imx/clk-pll14xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
> index 7a815ec76aa5..d43b4a3c0de8 100644
> --- a/drivers/clk/imx/clk-pll14xx.c
> +++ b/drivers/clk/imx/clk-pll14xx.c
> @@ -153,7 +153,7 @@ static int clk_pll14xx_wait_lock(struct clk_pll14xx *pll)
> {
> u32 val;
>
> - return readl_poll_timeout(pll->base, val, val & LOCK_TIMEOUT_US, 0,
> + return readl_poll_timeout(pll->base, val, val & LOCK_STATUS, 0,
> LOCK_TIMEOUT_US);
> }
>
> --
> 2.16.4
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-12-04 2:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 5:31 [PATCH] clk: imx: pll14xx: fix clk_pll14xx_wait_lock Peng Fan
2019-11-06 5:31 ` Peng Fan
2019-11-06 7:45 ` Abel Vesa
2019-11-06 7:45 ` Abel Vesa
2019-12-04 2:19 ` Shawn Guo [this message]
2019-12-04 2:19 ` Shawn Guo
2019-12-04 2:22 ` Peng Fan
2019-12-04 2:22 ` Peng Fan
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=20191204021908.GN9767@dragon \
--to=shawnguo@kernel.org \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.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.