lkml.org 
[lkml]   [2023]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 7/8] iommu/arm-smmu-v3: Skip cd sync if CD table isn't active
On Thu, Aug 03, 2023 at 12:32:35AM +0800, Michael Shavit wrote:

> This commit explicitly keeps track of whether a CD table is installed in
> an STE so that arm_smmu_sync_cd can skip the sync when unnecessary. This
> was previously achieved through the domain->devices list, but we are
> moving to a model where arm_smmu_sync_cd directly operates on a master
> and the master's CD table instead of a domain.

> @@ -1360,6 +1363,9 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid,
> cd_table->l1_desc ?
> STRTAB_STE_0_S1FMT_64K_L2 :
> STRTAB_STE_0_S1FMT_LINEAR);
> + cd_table->installed = true;
> + } else {
> + master->cd_table.installed = false;

Before this chunk, there is another fork for "Bypass/fault", where
we could set "installed" to false too, although it doesn't seem to
cause a problem at this moment since arm_smmu_sync_cd() is called
only in the context of an ARM_SMMU_DOMAIN_S1.

Otherwise,

Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>

\
 
 \ /
  Last update: 2023-08-04 22:00    [W:0.178 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site