From: Dan Carpenter <dan.carpenter@oracle.com>
To: hayashi.kunihiko@socionext.com
Cc: dmaengine@vger.kernel.org
Subject: [bug report] dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver
Date: Mon, 26 Jul 2021 10:34:36 +0300 [thread overview]
Message-ID: <20210726073436.GA9691@kili> (raw)
Hello Kunihiko Hayashi,
The patch 667b9251440b: "dmaengine: uniphier-xdmac: Add UniPhier
external DMA controller driver" from Feb 21, 2020, leads to the
following static checker warning:
drivers/dma/uniphier-xdmac.c:212 uniphier_xdmac_chan_stop()
warn: sleeping in atomic context
drivers/dma/uniphier-xdmac.c
197 static int uniphier_xdmac_chan_stop(struct uniphier_xdmac_chan *xc)
198 {
199 u32 val;
200
201 /* disable interrupt */
202 val = readl(xc->reg_ch_base + XDMAC_IEN);
203 val &= ~(XDMAC_IEN_ENDIEN | XDMAC_IEN_ERRIEN);
204 writel(val, xc->reg_ch_base + XDMAC_IEN);
205
206 /* stop XDMAC */
207 val = readl(xc->reg_ch_base + XDMAC_TSS);
208 val &= ~XDMAC_TSS_REQ;
209 writel(0, xc->reg_ch_base + XDMAC_TSS);
210
211 /* wait until transfer is stopped */
--> 212 return readl_poll_timeout(xc->reg_ch_base + XDMAC_STAT, val,
213 !(val & XDMAC_STAT_TENF), 100, 1000);
^^^
This is doing a 100 us sleep but both callers hold a spin lock.
214 }
regards,
dan carpenter
next reply other threads:[~2021-07-26 7:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 7:34 Dan Carpenter [this message]
2021-07-27 4:05 ` [bug report] dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver Kunihiko Hayashi
2021-07-27 4:47 ` Kunihiko Hayashi
2021-07-27 8:33 Dan Carpenter
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=20210726073436.GA9691@kili \
--to=dan.carpenter@oracle.com \
--cc=dmaengine@vger.kernel.org \
--cc=hayashi.kunihiko@socionext.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.