[PATCH v2 07/19] iommu/arm-smmu-v3: Move the STE generation for S1 and S2 domains into functions
Nicolin Chen
nicolinc at nvidia.com
Mon Dec 4 17:55:03 PST 2023
On Mon, Nov 13, 2023 at 01:53:14PM -0400, Jason Gunthorpe wrote:
> This is preparation to move the STE calculation higher up in to the call
> chain and remove arm_smmu_write_strtab_ent(). These new functions will be
> called directly from attach_dev.
>
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
> +static void arm_smmu_make_cdtable_ste(struct arm_smmu_ste *target,
> + struct arm_smmu_master *master,
> + struct arm_smmu_ctx_desc_cfg *cd_table)
> +{
> + struct arm_smmu_device *smmu = master->smmu;
> +
> + memset(target, 0, sizeof(*target));
> + target->data[0] = cpu_to_le64(
Nit: can add a line in-between like arm_smmu_make_s2_domain_ste does?
Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>
> +static void arm_smmu_make_s2_domain_ste(struct arm_smmu_ste *target,
> + struct arm_smmu_master *master,
> + struct arm_smmu_domain *smmu_domain)
> +{
> + struct arm_smmu_s2_cfg *s2_cfg = &smmu_domain->s2_cfg;
> +
> + memset(target, 0, sizeof(*target));
> +
> + target->data[0] = cpu_to_le64(
More information about the linux-arm-kernel
mailing list