From: Lee Jones <lee.jones@linaro.org>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH] mfd: atmel-hlcdc: Do not sleep in atomic context
Date: Tue, 13 Sep 2016 12:27:50 +0100 [thread overview]
Message-ID: <20160913112750.GC26864@dell> (raw)
In-Reply-To: <1473164369-10033-1-git-send-email-boris.brezillon@free-electrons.com>
On Tue, 06 Sep 2016, Boris Brezillon wrote:
> readl_poll_timeout() calls usleep_range(), but
> regmap_atmel_hlcdc_reg_write() is called in atomic context (regmap
> spinlock held).
>
> Replace the readl_poll_timeout() call by readl_poll_timeout_atomic().
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Fixes: ea31c0cf9b07 ("mfd: atmel-hlcdc: Implement config synchronization")
> Cc: <stable@vger.kernel.org>
> ---
> drivers/mfd/atmel-hlcdc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Applied, thanks.
> diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
> index eca7ea69b81c..4b15b0840f16 100644
> --- a/drivers/mfd/atmel-hlcdc.c
> +++ b/drivers/mfd/atmel-hlcdc.c
> @@ -50,8 +50,9 @@ static int regmap_atmel_hlcdc_reg_write(void *context, unsigned int reg,
> if (reg <= ATMEL_HLCDC_DIS) {
> u32 status;
>
> - readl_poll_timeout(hregmap->regs + ATMEL_HLCDC_SR, status,
> - !(status & ATMEL_HLCDC_SIP), 1, 100);
> + readl_poll_timeout_atomic(hregmap->regs + ATMEL_HLCDC_SR,
> + status, !(status & ATMEL_HLCDC_SIP),
> + 1, 100);
> }
>
> writel(val, hregmap->regs + reg);
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2016-09-13 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 12:19 [PATCH] mfd: atmel-hlcdc: Do not sleep in atomic context Boris Brezillon
2016-09-13 11:27 ` Lee Jones [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=20160913112750.GC26864@dell \
--to=lee.jones@linaro.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
--cc=sameo@linux.intel.com \
--cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).