public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Nicolin Chen <nicoleotsuka@gmail.com>,
	joro@8bytes.org, thierry.reding@gmail.com, will@kernel.org
Cc: vdumpa@nvidia.com, jonathanh@nvidia.com,
	linux-tegra@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iommu/tegra-smmu: Add pagetable mappings to debugfs
Date: Wed, 10 Mar 2021 23:38:47 +0300	[thread overview]
Message-ID: <cc5dca8f-e9b0-a845-1af4-e762782d5441@gmail.com> (raw)
In-Reply-To: <20210310033614.16772-1-nicoleotsuka@gmail.com>

10.03.2021 06:36, Nicolin Chen пишет:
> This patch dumps all active mapping entries from pagetable
> to a debugfs directory named "mappings".
> 
> Ataching an example:
> 
> SWGROUP: hc
> ASID: 0
> reg: 0x250
> PTB_ASID: 0xe0080004
> as->pd_dma: 0x80004000
> {
>         [1023] 0xf0080013 (1)
>         {
>                 PTE RANGE       PHYS           IOVA        SIZE        ATTR
>                 #1023 - #1023   0x122e5e000    0xfffff000  0x1000      0x5
>         }
> }
> Total PDE count: 1
> Total PTE count: 1

Addresses are 32bit on ARM32, please fix the formatting. The phys_addr_t
and dma_addr_t have special printk specifiers [1].

[1]
https://www.kernel.org/doc/html/latest/core-api/printk-formats.html?highlight=printk#physical-address-types-phys-addr-t

as->pd_dma: 0xc026e81b0000026c
{
        [0] 0xf0082848 (1024)
        {
                PTE RANGE       PHYS           IOVA        SIZE
ATTR
                #0    - #15     0xc0f9fc40bfde0000 0x0         0x10000
   0x7
                #16   - #47     0xc0f9fc40bfdc0000 0x10000     0x20000
   0x7
                #48   - #111    0xc0f9fc40bfd80000 0x30000     0x40000
   0x7
                #112  - #239    0xc0f9fc40bfd00000 0x70000     0x80000
   0x7
                #240  - #495    0xc0f9fc40bfc00000 0xf0000     0x100000
   0x7
                #496  - #999    0xc0f9fc40bf400000 0x1f0000    0x1f8000
   0x7
                #1000 - #1000   0xc0f9fc40acc40000 0x3e8000    0x1000
   0x7
                #1001 - #1001   0xc0f9fc40bbb95000 0x3e9000    0x1000
   0x7
                #1002 - #1002   0xc0f9fc40bbb97000 0x3ea000    0x1000
   0x7
                #1003 - #1003   0xc0f9fc40bbb91000 0x3eb000    0x1000
   0x7
                #1004 - #1005   0xc0f9fc40bb455000 0x3ec000    0x2000
   0x7
                #1006 - #1006   0xc0f9fc40bee9c000 0x3ee000    0x1000
   0x7
                #1007 - #1007   0xc0f9fc40bed20000 0x3ef000    0x1000
   0x7
                #1008 - #1008   0xc0f9fc40bbde0000 0x3f0000    0x1000
   0x7
                #1009 - #1009   0xc0f9fc40be465000 0x3f1000    0x1000
   0x7
                #1010 - #1010   0xc0f9fc40bb505000 0x3f2000    0x1000
   0x7
                #1011 - #1011   0xc0f9fc40bdcb9000 0x3f3000    0x1000
   0x7
                #1012 - #1012   0xc0f9fc40bcdf9000 0x3f4000    0x1000
   0x7
                #1013 - #1013   0xc0f9fc40bb6ce000 0x3f5000    0x1000
   0x7
                #1014 - #1014   0xc0f9fc40bcd74000 0x3f6000    0x1000
   0x7
                #1015 - #1015   0xc0f9fc40bd0d0000 0x3f7000    0x1000
   0x7
                #1016 - #1016   0xc0f9fc40bb6c5000 0x3f8000    0x1000
   0x7
                #1017 - #1017   0xc0f9fc40bd121000 0x3f9000    0x1000
   0x7
                #1018 - #1018   0xc0f9fc40bb6df000 0x3fa000    0x1000
   0x7
                #1019 - #1020   0xc0f9fc40bb6e9000 0x3fb000    0x2000
   0x7
                #1021 - #1021   0xc0f9fc40bb713000 0x3fd000    0x1000
   0x7
                #1022 - #1022   0xc0f9fc40bb738000 0x3fe000    0x1000
   0x7
                #1023 - #1023   0xc0f9fc40be444000 0x3ff000    0x1000
   0x7
        }

  reply	other threads:[~2021-03-10 20:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  3:36 [PATCH v2] iommu/tegra-smmu: Add pagetable mappings to debugfs Nicolin Chen
2021-03-10 20:38 ` Dmitry Osipenko [this message]
2021-03-10 22:08   ` Nicolin Chen
2021-03-11 14:04 ` Dmitry Osipenko
2021-03-12  1:09   ` Nicolin Chen

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=cc5dca8f-e9b0-a845-1af4-e762782d5441@gmail.com \
    --to=digetx@gmail.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=vdumpa@nvidia.com \
    --cc=will@kernel.org \
    /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