[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211007204131.GC20821@Asurada-Nvidia>
Date: Thu, 7 Oct 2021 13:41:31 -0700
From: Nicolin Chen <nicoleotsuka@...il.com>
To: Thierry Reding <thierry.reding@...il.com>
Cc: joro@...tes.org, will@...nel.org, vdumpa@...dia.com,
jonathanh@...dia.com, linux-tegra@...r.kernel.org,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
digetx@...il.com
Subject: Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to
debugfs
On Thu, Oct 07, 2021 at 07:13:25PM +0200, Thierry Reding wrote:
> > @@ -496,6 +506,8 @@ static void tegra_smmu_as_unprepare(struct tegra_smmu *smmu,
> > mutex_unlock(&smmu->lock);
> > }
> >
> > +static const struct file_operations tegra_smmu_debugfs_mappings_fops;
>
> Could the implementation be moved up here to avoid the forward
> declaration?
I thought that keeping all debugfs fops together would be preferable.
But yes, I will move it if you prefer no-additional forward declare.
> > + seq_printf(s, "\nSWGROUP: %s\n", swgrp->name);
> > + seq_printf(s, "as->id: %d\nas->attr: %c|%c|%s\nas->pd_dma: %pad\n", as->id,
> > + as->attr & SMMU_PD_READABLE ? 'R' : '-',
> > + as->attr & SMMU_PD_WRITABLE ? 'W' : '-',
> > + as->attr & SMMU_PD_NONSECURE ? "NS" : "S",
> > + &as->pd_dma);
> > + seq_puts(s, "{\n");
>
> Maybe this can be more compact by putting the name, ID, attributes and
> base address onto a single line? Maybe also use "'-' : 'S'" for the
> non-secure attribute to keep in line with what you've done for readable
> and writable attributes.
Okay. Will change that.
> Then again, this is going to be very verbose output anyway, so maybe it
> isn't worth it.
Are you saying the whole debugfs thing or just attributes? Yet, for
either case, I don't think so, as mappings info would help for sure
from our past experience while the attributes are just one line...
Powered by blists - more mailing lists