[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdU=-Eo29=DQmq96OegdYAvW7Vw9PpgNWSTfjDWVF5jd-A@mail.gmail.com>
Date: Mon, 20 Jan 2020 11:51:01 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Peter Ujfalusi <peter.ujfalusi@...com>
Cc: Vinod Koul <vkoul@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
dmaengine@...r.kernel.org,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] dmaengine: Create symlinks between DMA channels and slaves
Hi Peter,
On Mon, Jan 20, 2020 at 11:16 AM Peter Ujfalusi <peter.ujfalusi@...com> wrote:
> On 20/01/2020 11.01, Geert Uytterhoeven wrote:
> > On Fri, Jan 17, 2020 at 9:08 PM Peter Ujfalusi <peter.ujfalusi@...com> wrote:
> >> On 1/17/20 5:30 PM, 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,
> >>
> >> Have you considered similar link name as on the slave device:
> >> slave:<name>
> >>
> >> That way it would be easier to grasp which channel is used for what
> >> purpose by only looking under /sys/class/dma/ and no need to check the
> >> slave device.
> >
> > Would this really provide more information?
> > The device name is already provided in the target of the symlink:
> >
> > root@...lsch:~# readlink
> > /sys/devices/platform/soc/e6720000.dma-controller/dma/dma1chan2/slave
> > ../../../ee140000.sd
>
> e6720000.dma-controller/dma/dma1chan2/slave -> ../../../ee140000.sd
> e6720000.dma-controller/dma/dma1chan3/slave -> ../../../ee140000.sd
>
> It is hard to tell which one is the tx and RX channel without looking
> under the ee140000.sd:
>
> ee140000.sd/dma:rx -> ../e6720000.dma-controller/dma/dma1chan3
> ee140000.sd/dma:tx -> ../e6720000.dma-controller/dma/dma1chan2
Oh, you meant the name of the channel, not the name of the device.
My mistake.
As this name is a property of the slave device, not of the DMA channel,
I don't think it belongs under dma*chan*.
> Another option would be to not have symlinks, but a debugfs file where
> this information can be extracted and would only compiled if debugfs is
> enabled.
Like /proc/interrupts?
That brings the complexity of traversing all channels etc.
What do other people think?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
Powered by blists - more mailing lists