]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/amd: Remove unused GCR3 table parameters from struct protection_domain
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Mon, 5 Feb 2024 11:56:14 +0000 (11:56 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Feb 2024 12:16:30 +0000 (13:16 +0100)
Since they are moved to struct iommu_dev_data, and the driver has been
ported to use them.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240205115615.6053-17-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/iommu.c

index aed3e88d23c7ffee7a7146fdd450a5ac880a65a8..43f0f1b13f2d9774e099f9277b87522efc3fb311 100644 (file)
 
 #define MAX_DOMAIN_ID 65536
 
-/* Protection domain flags */
-#define PD_DMA_OPS_MASK                BIT(0) /* domain used for dma_ops */
-#define PD_DEFAULT_MASK                BIT(1) /* domain is a default dma_ops
-                                             domain for an IOMMU */
-#define PD_PASSTHROUGH_MASK    BIT(2) /* domain has no page
-                                             translation */
-#define PD_IOMMUV2_MASK                BIT(3) /* domain has gcr3 table */
-#define PD_GIOV_MASK           BIT(4) /* domain enable GIOV support */
-
 /* Timeout stuff */
 #define LOOP_TIMEOUT           100000
 #define MMIO_STATUS_TIMEOUT    2000000
@@ -563,10 +554,7 @@ struct protection_domain {
        struct amd_io_pgtable iop;
        spinlock_t lock;        /* mostly used to lock the page table*/
        u16 id;                 /* the domain id written to the device table */
-       int glx;                /* Number of levels for GCR3 table */
        int nid;                /* Node ID */
-       u64 *gcr3_tbl;          /* Guest CR3 table */
-       unsigned long flags;    /* flags to find out type of domain */
        enum protection_domain_mode pd_mode; /* Track page table type */
        bool dirty_tracking;    /* dirty tracking is enabled in the domain */
        unsigned dev_cnt;       /* devices assigned to this domain */
index d3ea4de9033ae4817851d5c657b6d4ebadce0e4f..ab6af861a3f14eb5d75d7d2688c0da537a8770e3 100644 (file)
@@ -86,7 +86,7 @@ static void set_dte_entry(struct amd_iommu *iommu,
 
 static inline bool pdom_is_v2_pgtbl_mode(struct protection_domain *pdom)
 {
-       return (pdom && (pdom->flags & PD_IOMMUV2_MASK));
+       return (pdom && (pdom->pd_mode == PD_MODE_V2));
 }
 
 static inline int get_acpihid_device_id(struct device *dev,