From: Robin Murphy <robin.murphy@arm.com>
To: Qinxin Xia <xiaqinxin@huawei.com>, will@kernel.org, jpb@kernel.org
Cc: linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
wangzhou1@hisilicon.com, prime.zeng@hisilicon.com,
fanghao11@huawei.com, jonathan.cameron@huawei.com,
linuxarm@huawei.com
Subject: Re: [RFC PATCH 2/5] iommu/arm-smmu-v3: Add register display to debugfs
Date: Mon, 16 Mar 2026 16:26:00 +0000 [thread overview]
Message-ID: <e2fb2f38-2a31-473e-9ab2-efae8e7a0303@arm.com> (raw)
In-Reply-To: <1a42d502-a2c4-4c41-ba7e-4dc115159ed6@huawei.com>
On 2026-03-16 3:35 pm, Qinxin Xia wrote:
>>> + /* 32-bit control registers */
>>> + seq_printf(seq, "CR0: 0x%08x [%s%s%s]\n",
>>> + readl_relaxed(base + ARM_SMMU_CR0),
>>> + readl_relaxed(base + ARM_SMMU_CR0) & CR0_SMMUEN ?
>>> + "Enabled " : "Disabled ",
>>> + readl_relaxed(base + ARM_SMMU_CR0) & CR0_EVTQEN ?
>>> + "EventQ " : "",
>>> + readl_relaxed(base + ARM_SMMU_CR0) & CR0_CMDQEN ?
>>> + "CmdQ " : "");
>>
>> There's really no point printing these extra strings, since if any of
>> those were *not* enabled then we'd have already failed probe and never
>> created the debugfs entry. And if anyone ever were to be trying to
>> change the driver behaviour at that level, I'd very much expect them
>> to be able to be able to read the bottom 4 bits of a CR0 value in hex
>> anyway ;)
>>
>> Thanks,
>> Robin.
>>
>
> Since Kunpeng supports ECMDQ(have not been submitted upstream), the
> intention was to check whether the SMMU supports ECMDQ, and the logging
> for other queues was added incidentally. The prints for the event queue
> and command queue indeed seem unnecessary. I will remove them in the
> next version.
OK, I would make a similar argument that even then, it wouldn't make
sense to expose debugfs entries for ECMDQ_PROD registers that don't
exist or we aren't using. Thus their enabled state should similarly be
inherent in the files being present at all (but again either way, if a
developer couldn't tell the significance of 0x80xxxxxx vs. 0x00xxxxxx
already then I'd have to question their capability to usefully debug any
more subtle ECMDQ behaviour...)
Thanks,
Robin.
next prev parent reply other threads:[~2026-03-16 16:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 10:43 [RFC PATCH 0/5] Add debugfs support for ARM SMMUv3 Qinxin Xia
2026-03-13 10:43 ` [RFC PATCH 1/5] iommu/arm-smmu-v3: Add basic debugfs framework Qinxin Xia
2026-03-13 19:58 ` Nicolin Chen
2026-03-16 15:14 ` Qinxin Xia
2026-03-13 10:43 ` [RFC PATCH 2/5] iommu/arm-smmu-v3: Add register display to debugfs Qinxin Xia
2026-03-13 20:20 ` Nicolin Chen
2026-03-16 15:22 ` Qinxin Xia
2026-03-16 15:19 ` Robin Murphy
2026-03-16 15:35 ` Qinxin Xia
2026-03-16 16:26 ` Robin Murphy [this message]
2026-03-17 1:44 ` Qinxin Xia
2026-03-13 10:43 ` [RFC PATCH 3/5] iommu/arm-smmu-v3: Add Stream Table Entry " Qinxin Xia
2026-03-13 20:19 ` Nicolin Chen
2026-03-16 15:43 ` Qinxin Xia
2026-03-13 10:43 ` [RFC PATCH 4/5] iommu/arm-smmu-v3: Add stream table directory structure " Qinxin Xia
2026-03-13 20:44 ` Nicolin Chen
2026-03-16 14:57 ` Qinxin Xia
2026-03-16 16:01 ` Robin Murphy
2026-03-17 2:04 ` Qinxin Xia
2026-03-13 10:43 ` [RFC PATCH 5/5] iommu/arm-smmu-v3: Add Context Descriptor display " Qinxin Xia
2026-03-13 21:04 ` Nicolin Chen
2026-03-16 15:12 ` Qinxin Xia
2026-03-16 15:42 ` Robin Murphy
2026-03-17 2:14 ` Qinxin Xia
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=e2fb2f38-2a31-473e-9ab2-efae8e7a0303@arm.com \
--to=robin.murphy@arm.com \
--cc=fanghao11@huawei.com \
--cc=iommu@lists.linux.dev \
--cc=jonathan.cameron@huawei.com \
--cc=jpb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@hisilicon.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
--cc=xiaqinxin@huawei.com \
/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