From: Nicolin Chen <nicolinc@nvidia.com>
To: <will@kernel.org>, <jgg@nvidia.com>
Cc: <jean-philippe@linaro.org>, <robin.murphy@arm.com>,
<joro@8bytes.org>, <balbirs@nvidia.com>,
<miko.lenczewski@arm.com>, <peterz@infradead.org>,
<kevin.tian@intel.com>, <praan@google.com>,
<linux-arm-kernel@lists.infradead.org>, <iommu@lists.linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/7] iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array
Date: Thu, 16 Oct 2025 14:31:54 -0700 [thread overview]
Message-ID: <aPFkSn9Ta6koq91Q@Asurada-Nvidia> (raw)
In-Reply-To: <345bb7703ebd19992694758b47e371900267fa0e.1760555863.git.nicolinc@nvidia.com>
On Wed, Oct 15, 2025 at 12:42:48PM -0700, Nicolin Chen wrote:
> +size_t arm_smmu_invs_unref(struct arm_smmu_invs *invs,
> + struct arm_smmu_invs *to_unref,
> + void (*flush_fn)(struct arm_smmu_inv *inv))
> +{
> + unsigned long flags;
> + size_t num_trashes = 0;
> + size_t num_invs = 0;
> + size_t i, j;
> +
> + for (i = j = 0; i != invs->num_invs || j != to_unref->num_invs;) {
> + int cmp;
> +
> + /* Skip any existing trash entry */
> + if (cmp <= 0 && !refcount_read(&invs->inv[i].users)) {
> + num_trashes++;
> + i++;
> + continue;
> + }
> +
> + cmp = arm_smmu_invs_cmp(invs, i, to_unref, j);
This should be moved upwards to "int cmp" before if.
Will fix in v4.
Nicolin
next prev parent reply other threads:[~2025-10-16 21:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 19:42 [PATCH v3 0/7] iommu/arm-smmu-v3: Introduce an RCU-protected invalidation array Nicolin Chen
2025-10-15 19:42 ` [PATCH v3 1/7] iommu/arm-smmu-v3: Explicitly set smmu_domain->stage for SVA Nicolin Chen
2025-10-15 19:42 ` [PATCH v3 2/7] iommu/arm-smmu-v3: Add an inline arm_smmu_domain_free() Nicolin Chen
2025-10-15 19:42 ` [PATCH v3 3/7] iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array Nicolin Chen
2025-10-16 19:18 ` kernel test robot
2025-10-16 21:31 ` Nicolin Chen [this message]
2025-10-17 13:47 ` kernel test robot
2025-10-17 20:12 ` Nicolin Chen
2025-10-20 12:10 ` Jason Gunthorpe
2025-10-20 19:16 ` Nicolin Chen
2025-10-27 12:06 ` kernel test robot
2025-10-27 16:38 ` Nicolin Chen
2025-10-15 19:42 ` [PATCH v3 4/7] iommu/arm-smmu-v3: Pre-allocate a per-master invalidation array Nicolin Chen
2025-10-15 19:42 ` [PATCH v3 5/7] iommu/arm-smmu-v3: Populate smmu_domain->invs when attaching masters Nicolin Chen
2025-10-17 16:03 ` kernel test robot
2025-10-17 21:11 ` Nicolin Chen
2025-10-20 12:12 ` Jason Gunthorpe
2025-10-20 19:05 ` Nicolin Chen
2025-10-15 19:42 ` [PATCH v3 6/7] iommu/arm-smmu-v3: Add arm_smmu_invs based arm_smmu_domain_inv_range() Nicolin Chen
2025-10-15 19:42 ` [PATCH v3 7/7] iommu/arm-smmu-v3: Perform per-domain invalidations using arm_smmu_invs 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=aPFkSn9Ta6koq91Q@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=jean-philippe@linaro.org \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miko.lenczewski@arm.com \
--cc=peterz@infradead.org \
--cc=praan@google.com \
--cc=robin.murphy@arm.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;
as well as URLs for NNTP newsgroup(s).