dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Vinod Koul <vkoul@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	dmaengine@vger.kernel.org,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] dmaengine: Create symlinks between DMA channels and slaves
Date: Thu, 30 Jan 2020 09:30:38 +0100	[thread overview]
Message-ID: <CAMuHMdXds2HuBAnLXmLVaCWKX77iZGvNSnD35-ysY9AnG9TKMw@mail.gmail.com> (raw)
In-Reply-To: <fde812a2-aea6-c16e-5ed7-ab5195b1259f@samsung.com>

Hi Marek,

On Wed, Jan 29, 2020 at 6:47 PM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> On 17.01.2020 16:30, Geert Uytterhoeven wrote:
> > Currently it is not easy to find out which DMA channels are in use, and
> > which slave devices are using which channels.
> >
> > Fix this by creating two symlinks between the DMA channel and the actual
> > slave device when a channel is requested:
> >    1. A "slave" symlink from DMA channel to slave device,
> >    2. A "dma:<name>" symlink slave device to DMA channel.
> > When the channel is released, the symlinks are removed again.
> > The latter requires keeping track of the slave device and the channel
> > name in the dma_chan structure.
> >
> > Note that this is limited to channel request functions for requesting an
> > exclusive slave channel that take a device pointer (dma_request_chan()
> > and dma_request_slave_channel*()).
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
>
> This patch breaks booting on almost all Exynos based boards:
>
> https://lore.kernel.org/linux-samsung-soc/20200129161113.GE3928@sirena.org.uk/T/#u

Sorry for the breakage.

> I've already sent a fix:
>
> https://lkml.org/lkml/2020/1/29/498

Thanks a lot!

> BTW, this patch reminds me some of my earlier work:
>
> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1329778.html
>
> I had similar need to keep a client's struct device pointer for every
> requested channel, but it turned out to be much more complicated than
> I've initially thought. I've abandoned that, due to lack of time, but
> maybe some of that discussion and concerns are still valid (I hope that
> links to earlier versions are still working)...

Oh right, Runtime PM for DMA channels.

As several DMA calls can be made from atomic context, probably the API
should be split in a non-atomic and an atomic part, cfr. the difference
between clk_prepare() and clk_enable().  Still, DMA slave drivers would need
to be modified, to call the "prepare" to make use of this...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2020-01-30  8:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 15:30 [PATCH v2] dmaengine: Create symlinks between DMA channels and slaves Geert Uytterhoeven
2020-01-17 16:26 ` Niklas Söderlund
2020-01-17 20:10 ` Peter Ujfalusi
2020-01-20  9:01   ` Geert Uytterhoeven
2020-01-20 10:16     ` Peter Ujfalusi
2020-01-20 10:51       ` Geert Uytterhoeven
2020-01-20 12:06         ` Peter Ujfalusi
2020-01-21 20:22           ` Geert Uytterhoeven
2020-01-22  9:40             ` Vinod Koul
2020-01-24  6:13               ` Vinod Koul
2020-01-24  7:31                 ` Peter Ujfalusi
2020-01-27  5:08                   ` Vinod Koul
     [not found] ` <CGME20200129174723eucas1p1fe4f76325f463fc9e3645ce18740d2eb@eucas1p1.samsung.com>
2020-01-29 17:47   ` Marek Szyprowski
2020-01-30  8:30     ` Geert Uytterhoeven [this message]
2020-01-30 10:33       ` Marek Szyprowski
2020-01-30 10:47         ` Geert Uytterhoeven
2020-01-30  9:43 ` Peter Ujfalusi
2020-01-30  9:51   ` Geert Uytterhoeven
2020-01-30 10:22     ` Peter Ujfalusi

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=CAMuHMdXds2HuBAnLXmLVaCWKX77iZGvNSnD35-ysY9AnG9TKMw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --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;
as well as URLs for NNTP newsgroup(s).