[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXewprV/zHKQ+ra+@Asurada-Nvidia>
Date: Mon, 26 Jan 2026 10:21:26 -0800
From: Nicolin Chen <nicolinc@...dia.com>
To: Will Deacon <will@...nel.org>
CC: <jgg@...dia.com>, <robin.murphy@....com>, <bhelgaas@...gle.com>,
<joro@...tes.org>, <praan@...gle.com>, <baolu.lu@...ux.intel.com>,
<kevin.tian@...el.com>, <miko.lenczewski@....com>,
<linux-arm-kernel@...ts.infradead.org>, <iommu@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>
Subject: Re: [PATCH RFCv1 3/3] iommu/arm-smmu-v3: Allow ATS to be always on
On Mon, Jan 26, 2026 at 12:39:50PM +0000, Will Deacon wrote:
> On Fri, Jan 16, 2026 at 08:56:42PM -0800, Nicolin Chen wrote:
> > @@ -1422,7 +1422,7 @@ void arm_smmu_clear_cd(struct arm_smmu_master *master, ioasid_t ssid)
> > if (!arm_smmu_cdtab_allocated(&master->cd_table))
> > return;
> > cdptr = arm_smmu_get_cd_ptr(master, ssid);
> > - if (WARN_ON(!cdptr))
> > + if (!cdptr)
> > return;
>
> Should we still warn if !master->ats_always_on?
Hmm, yes. I'll fix this.
> > @@ -3205,7 +3222,7 @@ static void arm_smmu_attach_dev_ste(struct iommu_domain *domain,
> > struct iommu_domain *old_domain,
> > struct device *dev,
> > struct arm_smmu_ste *ste,
> > - unsigned int s1dss)
> > + unsigned int s1dss, bool ats_always_on)
> > {
> > struct arm_smmu_master *master = dev_iommu_priv_get(dev);
>
> Can we avoid the 'bool' parameter if possible, please? They tend to make the
> callsites pretty horrible to read and you're already passing the 'struct
> device *' so you should have the master in hand?
Trying to set ats_always_on=false for blocked domain here:
@@ -3260,7 +3277,8 @@ static int arm_smmu_attach_dev_identity(struct iommu_domain *domain,
arm_smmu_attach_dev_ste(domain, old_domain, dev, &ste,
STRTAB_STE_1_S1DSS_BYPASS,
master->ats_always_on);
@@ -3283,7 +3301,7 @@ static int arm_smmu_attach_dev_blocked(struct iommu_domain *domain,
arm_smmu_attach_dev_ste(domain, old_domain, dev, &ste,
STRTAB_STE_1_S1DSS_TERMINATE, false);
But I think we could do that by combining master->ats_always_on
with the s1dss. I will drop the "bool".
Thanks
Nicolin
Powered by blists - more mailing lists