diff options
| author | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2026-01-15 06:08:03 +0000 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2026-01-18 10:56:10 +0100 |
| commit | 5335fc1657493f352fd90121fcb4e5ff2e2fc796 (patch) | |
| tree | 98f5927f8941e0416bd9c15987d4ebf422d72077 | |
| parent | 7d8b06ecc45bd679dec58d2cc2bd86223d4e076d (diff) | |
| download | linux-5335fc1657493f352fd90121fcb4e5ff2e2fc796.tar.gz linux-5335fc1657493f352fd90121fcb4e5ff2e2fc796.zip | |
iommu/amd: Rename DEV_DOMID_MASK to DTE_DOMID_MASK
Also change the define to use GENMASK_ULL instead.
There is no functional change.
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| -rw-r--r-- | drivers/iommu/amd/amd_iommu_types.h | 2 | ||||
| -rw-r--r-- | drivers/iommu/amd/init.c | 2 | ||||
| -rw-r--r-- | drivers/iommu/amd/iommu.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h index 320733e7d8b4..14801d734684 100644 --- a/drivers/iommu/amd/amd_iommu_types.h +++ b/drivers/iommu/amd/amd_iommu_types.h @@ -358,7 +358,7 @@ #define DTE_FLAG_IOTLB BIT_ULL(32) #define DTE_FLAG_MASK (0x3ffULL << 32) -#define DEV_DOMID_MASK 0xffffULL +#define DTE_DOMID_MASK GENMASK_ULL(15, 0) #define DTE_GCR3_14_12 GENMASK_ULL(60, 58) #define DTE_GCR3_30_15 GENMASK_ULL(31, 16) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 384c90b4f90a..cfbc9ff105c3 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -1179,7 +1179,7 @@ static bool __reuse_device_table(struct amd_iommu *iommu) for (devid = 0; devid <= pci_seg->last_bdf; devid++) { old_dev_tbl_entry = &pci_seg->old_dev_tbl_cpy[devid]; dte_v = FIELD_GET(DTE_FLAG_V, old_dev_tbl_entry->data[0]); - dom_id = FIELD_GET(DEV_DOMID_MASK, old_dev_tbl_entry->data[1]); + dom_id = FIELD_GET(DTE_DOMID_MASK, old_dev_tbl_entry->data[1]); if (!dte_v || !dom_id) continue; diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index d550a7e431ac..e3d9215244ea 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2120,7 +2120,7 @@ static void set_dte_entry(struct amd_iommu *iommu, if (dev_data->ats_enabled) new.data[1] |= DTE_FLAG_IOTLB; - old_domid = READ_ONCE(dte->data[1]) & DEV_DOMID_MASK; + old_domid = READ_ONCE(dte->data[1]) & DTE_DOMID_MASK; new.data[1] |= domid; /* |
