linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	dan.j.williams@intel.com, geert@linux-m68k.org
Subject: Re: [PATCH v3] dmaengine: Add basic debugfs support
Date: Fri, 28 Feb 2020 15:56:30 +0530	[thread overview]
Message-ID: <20200228102630.GB4148@vkoul-mobl> (raw)
In-Reply-To: <970899d9-1491-78e8-1e7a-14e40915d061@ti.com>

On 28-02-20, 12:01, Peter Ujfalusi wrote:
> Hi Vinod,
> 
> On 28/02/2020 6.47, Vinod Koul wrote:
> > Hi Peter,
> > 
> > On 26-02-20, 14:10, Peter Ujfalusi wrote:
> > 
> >>>  do we really want a custom dbg_show()..? Drivers can add their own
> >>> files...
> >>
> >> They could do that already ;)
> >>
> >> With the custom dbg_show() DMA drivers can save on the surrounding
> >> code and just fill in the information regarding to their HW.
> >> Again, on am654 the default information is:
> >> # cat /sys/kernel/debug/dmaengine 
> >> dma0 (285c0000.dma-controller): number of channels: 96
> >>
> >> dma1 (31150000.dma-controller): number of channels: 267
> >>  dma1chan0    | 2b00000.mcasp:tx
> >>  dma1chan1    | 2b00000.mcasp:rx
> >>  dma1chan2    | in-use
> >>  dma1chan3    | in-use
> >>  dma1chan4    | in-use
> >>  dma1chan5    | in-use
> >>
> >> With my current .dbg_show implementation for k3-udma:
> >> # cat /sys/kernel/debug/dmaengine 
> >> dma0 (285c0000.dma-controller): number of channels: 96
> >>
> >> dma1 (31150000.dma-controller): number of channels: 267
> >>  dma1chan0    | 2b00000.mcasp:tx (MEM_TO_DEV, tchan8 [0x1008 -> 0xc400], PDMA, TR mode)
> >>  dma1chan1    | 2b00000.mcasp:rx (DEV_TO_MEM, rchan8 [0x4400 -> 0x9008], PDMA, TR mode)
> >>  dma1chan2    | in-use (MEM_TO_MEM, chan2 pair [0x1002 -> 0x9002], PSI-L Native, TR mode)
> >>  dma1chan3    | in-use (MEM_TO_MEM, chan3 pair [0x1003 -> 0x9003], PSI-L Native, TR mode)
> >>  dma1chan4    | in-use (MEM_TO_MEM, chan4 pair [0x1004 -> 0x9004], PSI-L Native, TR mode)
> >>  dma1chan5    | in-use (MEM_TO_MEM, chan5 pair [0x1005 -> 0x9005], PSI-L Native, TR mode)
> >>
> >> For me this makes a huge difference.
> > 
> > Ok
> > 
> >>>> +DEFINE_SHOW_ATTRIBUTE(dmaengine_debugfs);
> >>>> +
> >>>> +static int __init dmaengine_debugfs_init(void)
> >>>> +{
> >>>> +	/* /sys/kernel/debug/dmaengine */
> >>>> +	debugfs_create_file("dmaengine", 0444, NULL, NULL,
> >>>> +			    &dmaengine_debugfs_fops);
> >>>
> >>> Should we add a directory? That way we can keep adding stuff into that
> >>> one
> >>
> >> and have this file as 'summary' underneath?
> > 
> > Correct
> 
> /sys/kernel/debug/dmaengine/summary, right?

Yup!

> 
> >> I like the fact hat I can get all the information via one file.
> >> Saves a lot of time (and explaining to users) on finding the correct
> >> one to cat...
> > 
> > But am sure we can come with more data to show, so having a directory
> > helps :)
> 
> OK, so we need to store the dbgfs rootdir and add an API so DMA drivers
> can get the dentry of it, so they can implement their custom
> files/directories underneath.

Correct

-- 
~Vinod

      reply	other threads:[~2020-02-28 10:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 11:15 [PATCH v3] dmaengine: Add basic debugfs support Peter Ujfalusi
2020-02-24 16:37 ` Vinod Koul
2020-02-26 12:10   ` Peter Ujfalusi
2020-02-28  4:47     ` Vinod Koul
2020-02-28 10:01       ` Peter Ujfalusi
2020-02-28 10:26         ` Vinod Koul [this message]

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=20200228102630.GB4148@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    /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).