mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 11:40:19 -04:00
iommu/amd: Remove the unused struct amd_ir_data.ref
Since the amd_iommu_update_ga() has been switched to use the modify_irte_ga() helper function to update the IRTE, the parameter is no longer needed. Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Suggested-by: Vasant Hegde <vasant.hegde@amd.com> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20230530141137.14376-3-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
committed by
Joerg Roedel
parent
a42f0c7a41
commit
74a37817bd
@@ -1001,7 +1001,6 @@ struct amd_ir_data {
|
||||
struct irq_2_irte irq_2_irte;
|
||||
struct msi_msg msi_entry;
|
||||
void *entry; /* Pointer to union irte or struct irte_ga */
|
||||
void *ref; /* Pointer to the actual irte */
|
||||
|
||||
/**
|
||||
* Store information for activate/de-activate
|
||||
|
||||
@@ -3001,7 +3001,7 @@ static int alloc_irq_index(struct amd_iommu *iommu, u16 devid, int count,
|
||||
}
|
||||
|
||||
static int modify_irte_ga(struct amd_iommu *iommu, u16 devid, int index,
|
||||
struct irte_ga *irte, struct amd_ir_data *data)
|
||||
struct irte_ga *irte)
|
||||
{
|
||||
bool ret;
|
||||
struct irq_remap_table *table;
|
||||
@@ -3028,9 +3028,6 @@ static int modify_irte_ga(struct amd_iommu *iommu, u16 devid, int index,
|
||||
*/
|
||||
WARN_ON(!ret);
|
||||
|
||||
if (data)
|
||||
data->ref = entry;
|
||||
|
||||
raw_spin_unlock_irqrestore(&table->lock, flags);
|
||||
|
||||
iommu_flush_irt(iommu, devid);
|
||||
@@ -3119,7 +3116,7 @@ static void irte_ga_activate(struct amd_iommu *iommu, void *entry, u16 devid, u1
|
||||
struct irte_ga *irte = (struct irte_ga *) entry;
|
||||
|
||||
irte->lo.fields_remap.valid = 1;
|
||||
modify_irte_ga(iommu, devid, index, irte, NULL);
|
||||
modify_irte_ga(iommu, devid, index, irte);
|
||||
}
|
||||
|
||||
static void irte_deactivate(struct amd_iommu *iommu, void *entry, u16 devid, u16 index)
|
||||
@@ -3135,7 +3132,7 @@ static void irte_ga_deactivate(struct amd_iommu *iommu, void *entry, u16 devid,
|
||||
struct irte_ga *irte = (struct irte_ga *) entry;
|
||||
|
||||
irte->lo.fields_remap.valid = 0;
|
||||
modify_irte_ga(iommu, devid, index, irte, NULL);
|
||||
modify_irte_ga(iommu, devid, index, irte);
|
||||
}
|
||||
|
||||
static void irte_set_affinity(struct amd_iommu *iommu, void *entry, u16 devid, u16 index,
|
||||
@@ -3159,7 +3156,7 @@ static void irte_ga_set_affinity(struct amd_iommu *iommu, void *entry, u16 devid
|
||||
APICID_TO_IRTE_DEST_LO(dest_apicid);
|
||||
irte->hi.fields.destination =
|
||||
APICID_TO_IRTE_DEST_HI(dest_apicid);
|
||||
modify_irte_ga(iommu, devid, index, irte, NULL);
|
||||
modify_irte_ga(iommu, devid, index, irte);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3510,7 +3507,7 @@ int amd_iommu_activate_guest_mode(void *data)
|
||||
entry->lo.fields_vapic.ga_tag = ir_data->ga_tag;
|
||||
|
||||
return modify_irte_ga(ir_data->iommu, ir_data->irq_2_irte.devid,
|
||||
ir_data->irq_2_irte.index, entry, ir_data);
|
||||
ir_data->irq_2_irte.index, entry);
|
||||
}
|
||||
EXPORT_SYMBOL(amd_iommu_activate_guest_mode);
|
||||
|
||||
@@ -3540,7 +3537,7 @@ int amd_iommu_deactivate_guest_mode(void *data)
|
||||
APICID_TO_IRTE_DEST_HI(cfg->dest_apicid);
|
||||
|
||||
return modify_irte_ga(ir_data->iommu, ir_data->irq_2_irte.devid,
|
||||
ir_data->irq_2_irte.index, entry, ir_data);
|
||||
ir_data->irq_2_irte.index, entry);
|
||||
}
|
||||
EXPORT_SYMBOL(amd_iommu_deactivate_guest_mode);
|
||||
|
||||
@@ -3721,7 +3718,7 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
|
||||
entry->lo.fields_vapic.is_run = is_run;
|
||||
|
||||
return modify_irte_ga(ir_data->iommu, ir_data->irq_2_irte.devid,
|
||||
ir_data->irq_2_irte.index, entry, ir_data);
|
||||
ir_data->irq_2_irte.index, entry);
|
||||
}
|
||||
EXPORT_SYMBOL(amd_iommu_update_ga);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user