lkml.org 
[lkml]   [2021]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] iommu/tegra-smmu: Add pagetable mappings to debugfs
On Mon, Mar 15, 2021 at 09:53:09PM +0300, Dmitry Osipenko wrote:
> 15.03.2021 06:35, Nicolin Chen пишет:
> > This patch dumps all active mapping entries from pagetable
> > to a debugfs directory named "mappings".
> >
> > Ataching an example:
>
> Attaching
>
> >
> > SWGROUP: hc
> > ASID: 0
> > reg: 0x250
> > PTB_ASID: 0xe0080004
> > as->pd_dma: 0x80004000
> > {
> > [1023] 0xf008000b (1)
> > {
> > PTE RANGE | ATTR | PHYS | IOVA | SIZE
> > [#1023, #1023] | 0x5 | 0x0000000111a8d000 | 0x00000000fffff000 | 0x1000
> > }
> > }
> > Total PDE count: 1
> > Total PTE count: 1
> >
> > Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
> > ---
>
> Good to me, thanks.
>
> Tested-by: Dmitry Osipenko <digetx@gmail.com>
> Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
>
> > + for (pd_index = 0; pd_index < SMMU_NUM_PDE; pd_index++) {
> > + struct page *pt_page;
> > + u32 *addr;
> > + unsigned int i;
>
> Unimportant nit: I'd keep lines arranged by length for consistency with
> the rest of the code.
>
> ...
> > + group_debug = devm_kcalloc(dev, soc->num_swgroups, sizeof(*group_debug), GFP_KERNEL);
>
> Another nit: this is a long line, I'd split it into two lines to keep
> coding style consistent and to improve readability for those who have a
> side-by-side code viewing setup.

Sending v5. Will add your Tested-by and Reviewed-by since there'd
be no functional changes. Thanks!

\
 
 \ /
  Last update: 2021-03-15 21:04    [W:0.040 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site