linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM
@ 2020-07-17 21:56 Hauke Mehrtens
  2020-07-20 14:38 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Hauke Mehrtens @ 2020-07-17 21:56 UTC (permalink / raw)
  To: broonie; +Cc: axboe, linux-spi, Hauke Mehrtens

The lantiq-ssc driver uses internally an own workqueue to wait till the
data is not only written out of the FIFO but really written to the wire.
This workqueue is flushed while the SPI subsystem is working in some
other system workqueue.

The system workqueue is marked as WQ_MEM_RECLAIM, but the workqueue in
the lantiq-ssc driver does not use WQ_MEM_RECLAIM for now. Add this flag
too to prevent this warning.

This fixes the following warning:
[    2.975956] WARNING: CPU: 1 PID: 17 at kernel/workqueue.c:2614 check_flush_dependency+0x168/0x184
[    2.984752] workqueue: WQ_MEM_RECLAIM kblockd:blk_mq_run_work_fn is flushing !WQ_MEM_RECLAIM 1e100800.spi:0x0

Fixes: 891b7c5fbf61 ("mtd_blkdevs: convert to blk-mq")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/spi/spi-lantiq-ssc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-lantiq-ssc.c b/drivers/spi/spi-lantiq-ssc.c
index 1fd7ee53d451..a12a5d0cfebf 100644
--- a/drivers/spi/spi-lantiq-ssc.c
+++ b/drivers/spi/spi-lantiq-ssc.c
@@ -899,7 +899,7 @@ static int lantiq_ssc_probe(struct platform_device *pdev)
 	master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 8) |
 				     SPI_BPW_MASK(16) | SPI_BPW_MASK(32);
 
-	spi->wq = alloc_ordered_workqueue(dev_name(dev), 0);
+	spi->wq = alloc_ordered_workqueue(dev_name(dev), WQ_MEM_RECLAIM);
 	if (!spi->wq) {
 		err = -ENOMEM;
 		goto err_clk_put;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM
  2020-07-17 21:56 [PATCH v2] spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM Hauke Mehrtens
@ 2020-07-20 14:38 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-07-20 14:38 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-spi, axboe

On Fri, 17 Jul 2020 23:56:48 +0200, Hauke Mehrtens wrote:
> The lantiq-ssc driver uses internally an own workqueue to wait till the
> data is not only written out of the FIFO but really written to the wire.
> This workqueue is flushed while the SPI subsystem is working in some
> other system workqueue.
> 
> The system workqueue is marked as WQ_MEM_RECLAIM, but the workqueue in
> the lantiq-ssc driver does not use WQ_MEM_RECLAIM for now. Add this flag
> too to prevent this warning.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM
      commit: ba3548cf29616b58c93bbaffc3d636898d009858

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-20 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 21:56 [PATCH v2] spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM Hauke Mehrtens
2020-07-20 14:38 ` Mark Brown

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).