From: Tim van der Staaij | Zign <Tim.vanderstaaij@zigngroup.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Vinod Koul <vkoul@kernel.org>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
Fabio Estevam <festevam@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] dmaengine: imx-sdma: fix deadlock in interrupt handler
Date: Tue, 26 Sep 2023 07:54:18 +0000 [thread overview]
Message-ID: <AM0PR08MB308978F82A48F664FA962F2980C3A@AM0PR08MB3089.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20230925090546.GW637806@pengutronix.de>
Hi Sascha,
> I think this is a false positive. The i.MX UART driver makes sure that
the console UART never uses DMA, so it shouldn't happen that the DMA
driver issuing console messages calls back into the DMA driver.
>
> Could you give the following patch a test?
Thank you for looking into this. I thought I had an idea of what was going on
but it seems that was based on some wrong assumptions (I'm mostly a Linux user
and not familiar with kernel code yet).
I tested with your patch and it does indeed fix the issue on my machine. Note
that I have been testing this in a similar way as you did. The log message
which triggers this issue in practice is a rare occurrence on my system
because of its condition, so I added a dev_warn_once() to
sdma_update_channel_loop() just outside of the conditional, which fires as
soon as some data is received through DMA. This consistently reproduces the
lockdep warning without your patch, so I'm confident that the patch works.
> I inserted a dev_info() into the imx-sdma driver and got said circular
locking warning. With my patch applied it's gone. Nevertheless I would
wait for Tims feedback and resend it with some more people on Cc. I
never used lockdep_set_subclass() and I am not sure if it's legal to
put it into the UART startup function like I did.
Sounds good, could you submit the patch and keep me in cc?
Thanks,
Tim
next prev parent reply other threads:[~2023-09-26 7:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 9:57 Tim van der Staaij | Zign
2023-09-21 18:55 ` Fabio Estevam
2023-09-22 9:50 ` Sascha Hauer
2023-09-25 9:05 ` Sascha Hauer
2023-09-26 7:54 ` Tim van der Staaij | Zign [this message]
2023-09-25 9:20 ` Uwe Kleine-König
2023-09-25 9:27 ` Sascha Hauer
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=AM0PR08MB308978F82A48F664FA962F2980C3A@AM0PR08MB3089.eurprd08.prod.outlook.com \
--to=tim.vanderstaaij@zigngroup.com \
--cc=dmaengine@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=vkoul@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
all inboxes | Powered by JetHome®