[PATCH v6 3/6] iommu/arm-smmu-v3: Add feature detection for HTTU

Nicolin Chen nicolinc at nvidia.com
Thu Jun 13 10:50:16 PDT 2024


On Thu, Jun 13, 2024 at 03:41:46PM +0100, Shameer Kolothum wrote:
> From: Jean-Philippe Brucker <jean-philippe at linaro.org>
> 
> If the SMMU supports it and the kernel was built with HTTU support,
> Probe support for Hardware Translation Table Update (HTTU) which is
> essentially to enable hardware update of access and dirty flags.
> 
> Probe and set the smmu::features for Hardware Dirty and Hardware Access
> bits. This is in preparation, to enable it on the context descriptors of
> stage 1 format.
> 
> Signed-off-by: Jean-Philippe Brucker <jean-philippe at linaro.org>
> Signed-off-by: Joao Martins <joao.m.martins at oracle.com>
> Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
> Reviewed-by: Ryan Roberts <ryan.roberts at arm.com>
> Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>

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

> +static void arm_smmu_get_httu(struct arm_smmu_device *smmu, u32 reg)
> +{
> +       u32 fw_features = smmu->features & (ARM_SMMU_FEAT_HA | ARM_SMMU_FEAT_HD);
> +       u32 httu = FIELD_GET(IDR0_HTTU, reg);
> +       u32 hw_features = 0;
> +
> +       switch (httu) {

It seems that we can drop the httu variable too. But it's quite
unimportant, so let's have it as-is if there is no other reason
to respin the series.



More information about the linux-arm-kernel mailing list