lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Feb 2020 10:17:04 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     Peter Ujfalusi <peter.ujfalusi@...com>
Cc:     dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        dan.j.williams@...el.com, geert@...ux-m68k.org
Subject: Re: [PATCH v3] dmaengine: Add basic debugfs support

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

> 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 :)

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ