From: Tony Lindgren <tony@atomide.com>
To: Tero Kristo <t-kristo@ti.com>
Cc: ssantosh@kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
s-anna@ti.com
Subject: Re: [PATCH 1/1] soc: ti: omap-prm: use atomic iopoll instead of sleeping one
Date: Tue, 19 May 2020 10:45:55 -0700 [thread overview]
Message-ID: <20200519174555.GX37466@atomide.com> (raw)
In-Reply-To: <20200514073718.17690-1-t-kristo@ti.com>
* Tero Kristo <t-kristo@ti.com> [200514 00:38]:
> The reset handling APIs for omap-prm can be invoked PM runtime which
> runs in atomic context. For this to work properly, switch to atomic
> iopoll version instead of the current which can sleep. Otherwise,
> this throws a "BUG: scheduling while atomic" warning. Issue is seen
> rather easily when CONFIG_PREEMPT is enabled.
>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
Santosh do you want me to pick this for fixes?
Regards,
Tony
> ---
> drivers/soc/ti/omap_prm.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
> index 96c6f777519c..c9b3f9ebf0bb 100644
> --- a/drivers/soc/ti/omap_prm.c
> +++ b/drivers/soc/ti/omap_prm.c
> @@ -256,10 +256,10 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev,
> goto exit;
>
> /* wait for the status to be set */
> - ret = readl_relaxed_poll_timeout(reset->prm->base +
> - reset->prm->data->rstst,
> - v, v & BIT(st_bit), 1,
> - OMAP_RESET_MAX_WAIT);
> + ret = readl_relaxed_poll_timeout_atomic(reset->prm->base +
> + reset->prm->data->rstst,
> + v, v & BIT(st_bit), 1,
> + OMAP_RESET_MAX_WAIT);
> if (ret)
> pr_err("%s: timedout waiting for %s:%lu\n", __func__,
> reset->prm->data->name, id);
> --
> 2.17.1
>
> --
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>
WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Tero Kristo <t-kristo@ti.com>
Cc: s-anna@ti.com, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, ssantosh@kernel.org
Subject: Re: [PATCH 1/1] soc: ti: omap-prm: use atomic iopoll instead of sleeping one
Date: Tue, 19 May 2020 10:45:55 -0700 [thread overview]
Message-ID: <20200519174555.GX37466@atomide.com> (raw)
In-Reply-To: <20200514073718.17690-1-t-kristo@ti.com>
* Tero Kristo <t-kristo@ti.com> [200514 00:38]:
> The reset handling APIs for omap-prm can be invoked PM runtime which
> runs in atomic context. For this to work properly, switch to atomic
> iopoll version instead of the current which can sleep. Otherwise,
> this throws a "BUG: scheduling while atomic" warning. Issue is seen
> rather easily when CONFIG_PREEMPT is enabled.
>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
Santosh do you want me to pick this for fixes?
Regards,
Tony
> ---
> drivers/soc/ti/omap_prm.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
> index 96c6f777519c..c9b3f9ebf0bb 100644
> --- a/drivers/soc/ti/omap_prm.c
> +++ b/drivers/soc/ti/omap_prm.c
> @@ -256,10 +256,10 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev,
> goto exit;
>
> /* wait for the status to be set */
> - ret = readl_relaxed_poll_timeout(reset->prm->base +
> - reset->prm->data->rstst,
> - v, v & BIT(st_bit), 1,
> - OMAP_RESET_MAX_WAIT);
> + ret = readl_relaxed_poll_timeout_atomic(reset->prm->base +
> + reset->prm->data->rstst,
> + v, v & BIT(st_bit), 1,
> + OMAP_RESET_MAX_WAIT);
> if (ret)
> pr_err("%s: timedout waiting for %s:%lu\n", __func__,
> reset->prm->data->name, id);
> --
> 2.17.1
>
> --
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>
_______________________________________________
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:[~2020-05-19 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-14 7:37 [PATCH 1/1] soc: ti: omap-prm: use atomic iopoll instead of sleeping one Tero Kristo
2020-05-14 7:37 ` Tero Kristo
2020-05-19 17:45 ` Tony Lindgren [this message]
2020-05-19 17:45 ` Tony Lindgren
2020-05-19 18:04 ` santosh.shilimkar
2020-05-19 18:04 ` santosh.shilimkar
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=20200519174555.GX37466@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=s-anna@ti.com \
--cc=ssantosh@kernel.org \
--cc=t-kristo@ti.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 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.