]> git.hungrycats.org Git - linux/commitdiff
iommu/amd: Remove redundant check in irq_remapping_select()
authorVasant Hegde <vasant.hegde@amd.com>
Fri, 11 Sep 2026 08:33:51 +0000 (08:33 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 11 Sep 2026 15:27:21 +0000 (17:27 +0200)
The amd_iommu_irq_remap flag is already validated during irq remapping
domain creation (before calling amd_iommu_create_irq_domain()). The
duplicate check in irq_remapping_select() is unnecessary and can be
removed.

Additionally, mark amd_iommu_irq_remap as static.

No functional changes.

Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/init.c
drivers/iommu/amd/iommu.c

index 3dbe20023456b4d81b36b01e82846ba52b9b76ea..bce5027388b9c1ce8099300b024898223e3c58f4 100644 (file)
@@ -434,9 +434,6 @@ struct irq_remap_table {
        u32 *table;
 };
 
-/* Interrupt remapping feature used? */
-extern bool amd_iommu_irq_remap;
-
 extern const struct iommu_ops amd_iommu_ops;
 
 /* IVRS indicates that pre-boot remapping was enabled */
index edcc187b8f14fe5357ca2963f6d3c27779962454..8a410d4aa3704be6bc758b23714888f664d2b4ff 100644 (file)
@@ -152,7 +152,7 @@ struct ivmd_header {
 } __attribute__((packed));
 
 bool amd_iommu_dump;
-bool amd_iommu_irq_remap __read_mostly;
+static bool amd_iommu_irq_remap __read_mostly;
 
 enum protection_domain_mode amd_iommu_pgtable = PD_MODE_V1;
 /* Virtual address size */
index 4dc306a4b5c6209a019af626a3c07fc81036ea9b..67a86b9e1eca1f92f6fc1e039df012cf17af7852 100644 (file)
@@ -3976,9 +3976,6 @@ static int irq_remapping_select(struct irq_domain *d, struct irq_fwspec *fwspec,
        struct amd_iommu *iommu;
        int devid = -1;
 
-       if (!amd_iommu_irq_remap)
-               return 0;
-
        if (x86_fwspec_is_ioapic(fwspec))
                devid = get_ioapic_devid(fwspec->param[0]);
        else if (x86_fwspec_is_hpet(fwspec))