Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-10-07 Thread Nicolin Chen
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(>lock); > > } > > > > +static const struct file_operations tegra_smmu_debugfs_mappings_fops; > > Could the

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-10-07 Thread Thierry Reding
On Mon, Sep 13, 2021 at 06:38:58PM -0700, Nicolin Chen wrote: > This patch dumps all active mapping entries from pagetable > to a debugfs directory named "mappings". > > Attaching an example: > > SWGROUP: hc > as->id: 0 > as->attr: R|W|N > as->pd_dma: 0x80c03000 > { > [index:

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-15 Thread Nicolin Chen
On Wed, Sep 15, 2021 at 03:09:48PM +0300, Dmitry Osipenko wrote: > 15.09.2021 07:38, Nicolin Chen пишет: > > On Tue, Sep 14, 2021 at 10:20:30PM +0300, Dmitry Osipenko wrote: > >> 14.09.2021 21:49, Nicolin Chen пишет: > >>> On Tue, Sep 14, 2021 at 04:29:15PM +0300, Dmitry Osipenko wrote: >

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-15 Thread Dmitry Osipenko
15.09.2021 15:09, Dmitry Osipenko пишет: > 15.09.2021 07:38, Nicolin Chen пишет: >> On Tue, Sep 14, 2021 at 10:20:30PM +0300, Dmitry Osipenko wrote: >>> 14.09.2021 21:49, Nicolin Chen пишет: On Tue, Sep 14, 2021 at 04:29:15PM +0300, Dmitry Osipenko wrote: > 14.09.2021 04:38, Nicolin Chen

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-15 Thread Dmitry Osipenko
15.09.2021 07:38, Nicolin Chen пишет: > On Tue, Sep 14, 2021 at 10:20:30PM +0300, Dmitry Osipenko wrote: >> 14.09.2021 21:49, Nicolin Chen пишет: >>> On Tue, Sep 14, 2021 at 04:29:15PM +0300, Dmitry Osipenko wrote: 14.09.2021 04:38, Nicolin Chen пишет: > +static unsigned long

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-14 Thread Nicolin Chen
On Tue, Sep 14, 2021 at 10:20:30PM +0300, Dmitry Osipenko wrote: > 14.09.2021 21:49, Nicolin Chen пишет: > > On Tue, Sep 14, 2021 at 04:29:15PM +0300, Dmitry Osipenko wrote: > >> 14.09.2021 04:38, Nicolin Chen пишет: > >>> +static unsigned long pd_pt_index_iova(unsigned int pd_index, unsigned >

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-14 Thread Dmitry Osipenko
14.09.2021 21:49, Nicolin Chen пишет: > On Tue, Sep 14, 2021 at 04:29:15PM +0300, Dmitry Osipenko wrote: >> 14.09.2021 04:38, Nicolin Chen пишет: >>> +static unsigned long pd_pt_index_iova(unsigned int pd_index, unsigned int >>> pt_index) >>> +{ >>> + return ((dma_addr_t)pd_index &

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-14 Thread Nicolin Chen
On Tue, Sep 14, 2021 at 04:29:15PM +0300, Dmitry Osipenko wrote: > 14.09.2021 04:38, Nicolin Chen пишет: > > +static unsigned long pd_pt_index_iova(unsigned int pd_index, unsigned int > > pt_index) > > +{ > > + return ((dma_addr_t)pd_index & (SMMU_NUM_PDE - 1)) << SMMU_PDE_SHIFT | > > +

Re: [PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-14 Thread Dmitry Osipenko
14.09.2021 04:38, Nicolin Chen пишет: > +static unsigned long pd_pt_index_iova(unsigned int pd_index, unsigned int > pt_index) > +{ > + return ((dma_addr_t)pd_index & (SMMU_NUM_PDE - 1)) << SMMU_PDE_SHIFT | > +((dma_addr_t)pt_index & (SMMU_NUM_PTE - 1)) << SMMU_PTE_SHIFT; > +} We

[PATCH v6 6/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

2021-09-13 Thread Nicolin Chen
This patch dumps all active mapping entries from pagetable to a debugfs directory named "mappings". Attaching an example: SWGROUP: hc as->id: 0 as->attr: R|W|N as->pd_dma: 0x80c03000 { [index: 1023] 0xf0080c3e (count: 2) { PTE RANGE | ATTR | PHYS