Skip to content

Commit c2a6af5

Browse files
ssuthiku-amdjoergroedel
authored andcommitted
iommu/amd: Remove unused GCR3 table parameters from struct protection_domain
Since they are moved to struct iommu_dev_data, and the driver has been ported to use them. Signed-off-by: Suravee Suthikulpanit <[email protected]> Signed-off-by: Vasant Hegde <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent a7b2aff commit c2a6af5

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

drivers/iommu/amd/amd_iommu_types.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -453,15 +453,6 @@
453453

454454
#define MAX_DOMAIN_ID 65536
455455

456-
/* Protection domain flags */
457-
#define PD_DMA_OPS_MASK BIT(0) /* domain used for dma_ops */
458-
#define PD_DEFAULT_MASK BIT(1) /* domain is a default dma_ops
459-
domain for an IOMMU */
460-
#define PD_PASSTHROUGH_MASK BIT(2) /* domain has no page
461-
translation */
462-
#define PD_IOMMUV2_MASK BIT(3) /* domain has gcr3 table */
463-
#define PD_GIOV_MASK BIT(4) /* domain enable GIOV support */
464-
465456
/* Timeout stuff */
466457
#define LOOP_TIMEOUT 100000
467458
#define MMIO_STATUS_TIMEOUT 2000000
@@ -563,10 +554,7 @@ struct protection_domain {
563554
struct amd_io_pgtable iop;
564555
spinlock_t lock; /* mostly used to lock the page table*/
565556
u16 id; /* the domain id written to the device table */
566-
int glx; /* Number of levels for GCR3 table */
567557
int nid; /* Node ID */
568-
u64 *gcr3_tbl; /* Guest CR3 table */
569-
unsigned long flags; /* flags to find out type of domain */
570558
enum protection_domain_mode pd_mode; /* Track page table type */
571559
bool dirty_tracking; /* dirty tracking is enabled in the domain */
572560
unsigned dev_cnt; /* devices assigned to this domain */

drivers/iommu/amd/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static void set_dte_entry(struct amd_iommu *iommu,
8686

8787
static inline bool pdom_is_v2_pgtbl_mode(struct protection_domain *pdom)
8888
{
89-
return (pdom && (pdom->flags & PD_IOMMUV2_MASK));
89+
return (pdom && (pdom->pd_mode == PD_MODE_V2));
9090
}
9191

9292
static inline int get_acpihid_device_id(struct device *dev,

0 commit comments

Comments
 (0)