From: Lucas Stach <l.stach@pengutronix.de>
To: Xiaolei Wang <xiaolei.wang@windriver.com>,
ulf.hansson@linaro.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, ping.bai@nxp.com, aford173@gmail.com,
peng.fan@nxp.com, marex@denx.de
Cc: linux-pm@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pmdomain: imx8mp-blk-ctrl: Add a missing judgment
Date: Mon, 13 Jan 2025 09:36:05 +0100 [thread overview]
Message-ID: <1eddf262170a616eb0e154e909eee65432188ffd.camel@pengutronix.de> (raw)
In-Reply-To: <20250113045609.842243-1-xiaolei.wang@windriver.com>
Hi Xiaolei,
Am Montag, dem 13.01.2025 um 12:56 +0800 schrieb Xiaolei Wang:
> Currently imx8mp_blk_ctrl_remove() will continue the for loop
> until an out-of-bounds exception occurs.
>
afb2a86f002b ("pmdomain: imx8m[p]-blk-ctrl: Suppress bind attrs"),
which is in -next disabled the possibility to unbind the driver from
userspace, which I guess is the only way to hit this code. But maybe we
actually want to support unbind someday and as long as the code exists,
it should be correct.
Can you rephrase the commit subject to "add missing loop break
condition" or something along those lines? With that:
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : dev_pm_domain_detach+0x8/0x48
> lr : imx8mp_blk_ctrl_shutdown+0x58/0x90
> sp : ffffffc084f8bbf0
> x29: ffffffc084f8bbf0 x28: ffffff80daf32ac0 x27: 0000000000000000
> x26: ffffffc081658d78 x25: 0000000000000001 x24: ffffffc08201b028
> x23: ffffff80d0db9490 x22: ffffffc082340a78 x21: 00000000000005b0
> x20: ffffff80d19bc180 x19: 000000000000000a x18: ffffffffffffffff
> x17: ffffffc080a39e08 x16: ffffffc080a39c98 x15: 4f435f464f006c72
> x14: 0000000000000004 x13: ffffff80d0172110 x12: 0000000000000000
> x11: ffffff80d0537740 x10: ffffff80d05376c0 x9 : ffffffc0808ed2d8
> x8 : ffffffc084f8bab0 x7 : 0000000000000000 x6 : 0000000000000000
> x5 : ffffff80d19b9420 x4 : fffffffe03466e60 x3 : 0000000080800077
> x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000
> Call trace:
> dev_pm_domain_detach+0x8/0x48
> platform_shutdown+0x2c/0x48
> device_shutdown+0x158/0x268
> kernel_restart_prepare+0x40/0x58
> kernel_kexec+0x58/0xe8
> __do_sys_reboot+0x198/0x258
> __arm64_sys_reboot+0x2c/0x40
> invoke_syscall+0x5c/0x138
> el0_svc_common.constprop.0+0x48/0xf0
> do_el0_svc+0x24/0x38
> el0_svc+0x38/0xc8
> el0t_64_sync_handler+0x120/0x130
> el0t_64_sync+0x190/0x198
> Code: 8128c2d0 ffffffc0 aa1e03e9 d503201f
>
> Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl")
> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
> ---
> drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
> index e3a0f64c144c..3668fe66b22c 100644
> --- a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
> +++ b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
> @@ -770,7 +770,7 @@ static void imx8mp_blk_ctrl_remove(struct platform_device *pdev)
>
> of_genpd_del_provider(pdev->dev.of_node);
>
> - for (i = 0; bc->onecell_data.num_domains; i++) {
> + for (i = 0; i < bc->onecell_data.num_domains; i++) {
> struct imx8mp_blk_ctrl_domain *domain = &bc->domains[i];
>
> pm_genpd_remove(&domain->genpd);
prev parent reply other threads:[~2025-01-13 8:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 4:56 Xiaolei Wang
2025-01-13 8:36 ` Lucas Stach [this message]
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=1eddf262170a616eb0e154e909eee65432188ffd.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=aford173@gmail.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marex@denx.de \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=xiaolei.wang@windriver.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®