[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BYAPR12MB2710AF5DDCB687C7E78362E5B3BD0@BYAPR12MB2710.namprd12.prod.outlook.com>
Date: Fri, 30 Aug 2019 18:05:19 +0000
From: Krishna Reddy <vdumpa@...dia.com>
To: Robin Murphy <robin.murphy@....com>
CC: Sachin Nikam <Snikam@...dia.com>,
"Thomas Zeng (SW-TEGRA)" <thomasz@...dia.com>,
Juha Tukkinen <jtukkinen@...dia.com>,
Mikko Perttunen <mperttunen@...dia.com>,
Pritesh Raithatha <praithatha@...dia.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Timo Alho <talho@...dia.com>, Yu-Huan Hsu <YHsu@...dia.com>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
Thierry Reding <treding@...dia.com>,
Alexander Van Brunt <avanbrunt@...dia.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"will.deacon@....com" <will.deacon@....com>,
"joro@...tes.org" <joro@...tes.org>
Subject: RE: [PATCH 3/7] iommu/arm-smmu: Add tlb_sync implementation hook
>> + for (i = 0; i < to_nsmmu(smmu)->num_inst; i++)
>It might make more sense to make this the innermost loop, i.e.:
for (i = 0; i < nsmmu->num_inst; i++)
reg &= readl_relaxed(nsmmu_page(smmu, i, page)...
>since polling the instances in parallel rather than in series seems like it might be a bit more efficient.
Sync register is programmed at the same time for both instances. The status check is serialized.
I can update it to check status of both at the same time.
>> + if (smmu->impl->tlb_sync) {
>> + smmu->impl->tlb_sync(smmu, page, sync, status);
>What I'd hoped is that rather than needing a hook for this, you could just override smmu_domain->tlb_ops from .init_context to wire up the alternate .sync method directly. That would save this extra level of indirection.
With arm_smmu_domain now available in arm-smmu.h, arm-smmu-nvidia.c can directly update the tlb_ops->tlb_sync and avoid indirection.
Will update in next version.
-KR
Powered by blists - more mailing lists