From: Olivier Dautricourt <olivierdautricourt@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: dmaengine@vger.kernel.org, Stefan Roese <sr@denx.de>,
Vinod Koul <vkoul@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Eric Schwarz <eas@sw-optimization.com>
Subject: Re: [PATCH v2 2/3] dmaengine: altera-msgdma: cleanup after completing all descriptors
Date: Sun, 9 Jun 2024 22:33:56 +0200 [thread overview]
Message-ID: <ZmYRtMlJheCp7i-E@olivier-manjaro> (raw)
In-Reply-To: <0e439d73-aff5-4d56-9a3c-b29867132db1@web.de>
On Sun, Jun 09, 2024 at 07:20:49PM +0200, Markus Elfring wrote:
> …
> > This fixes a Sparse warning because we first take the lock in
> > msgdma_tasklet.
> …
>
> Can the tag “Fixes” become relevant for the proposed change?
I can add a Fixes tag, it will target only the first commit introducing
this driver.
>
>
> …
> > +++ b/drivers/dma/altera-msgdma.c
> > @@ -585,6 +585,8 @@ static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev)
> > struct msgdma_sw_desc *desc, *next;
> > unsigned long irqflags;
> >
> > + spin_lock_irqsave(&mdev->lock, irqflags);
> > +
> > list_for_each_entry_safe(desc, next, &mdev->done_list, node) {
> > struct dmaengine_desc_callback cb;
> >
> > @@ -600,6 +602,8 @@ static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev)
> > /* Run any dependencies, then free the descriptor */
> > msgdma_free_descriptor(mdev, desc);
> > }
> > +
> > + spin_unlock_irqrestore(&mdev->lock, irqflags);
> > }
> …
>
> Would you become interested to apply the guard “spinlock_irqsave”?
> https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/spinlock.h#L574
I could but arent these type of things to be integrated in a more global patch serie
targeting (let say) all drivers in one subsystem ?
Currently it seems only one driver uses a guard in the dmaengine subsystem.
Kr,
Olivier
next prev parent reply other threads:[~2024-06-09 20:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 21:31 [PATCH v2 1/3] dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while invoking callbacks Olivier Dautricourt
2024-06-08 21:31 ` [PATCH v2 2/3] dmaengine: altera-msgdma: cleanup after completing all descriptors Olivier Dautricourt
2024-06-09 17:20 ` Markus Elfring
2024-06-09 20:33 ` Olivier Dautricourt [this message]
2024-06-08 21:31 ` [PATCH v2 3/3] dmaengine: altera-msgdma: properly free descriptor in msgdma_free_descriptor Olivier Dautricourt
2024-06-09 17:30 ` Markus Elfring
2024-06-09 20:36 ` Olivier Dautricourt
2024-06-09 15:50 ` [PATCH v2 1/3] dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while invoking callbacks Markus Elfring
2024-06-11 18:28 ` Vinod Koul
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=ZmYRtMlJheCp7i-E@olivier-manjaro \
--to=olivierdautricourt@gmail.com \
--cc=Markus.Elfring@web.de \
--cc=dmaengine@vger.kernel.org \
--cc=eas@sw-optimization.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sr@denx.de \
--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