Commit

3ba149029a4389d1723194ebe34a63aedbc6a610

Revert "iommu/amd: Remove redundant check in irq_remapping_select()"

This reverts commit 5e1afd4ea1d6a9bbaecf3e28707dac9c8b56bd45.

This commit caused a regression with GPU devices on some platforms.
Revert it for now.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

Joerg Roedel <joerg.roedel@amd.com> · 2026-10-14 13:39 UTC

Browse files
3 files changed, +7 −1
modified drivers/iommu/amd/amd_iommu_types.h
@@ -421,6 +421,9 @@ struct irq_remap_table {
421 421 u32 *table;
422 422 };
423 423
424 + /* Interrupt remapping feature used? */
425 + extern bool amd_iommu_irq_remap;
426 +
424 427 extern const struct iommu_ops amd_iommu_ops;
425 428
426 429 /* IVRS indicates that pre-boot remapping was enabled */
modified drivers/iommu/amd/init.c
@@ -152,7 +152,7 @@ struct ivmd_header {
152 152 } __attribute__((packed));
153 153
154 154 bool amd_iommu_dump;
155 - static bool amd_iommu_irq_remap __read_mostly;
155 + bool amd_iommu_irq_remap __read_mostly;
156 156
157 157 enum protection_domain_mode amd_iommu_pgtable = PD_MODE_V1;
158 158 /* Virtual address size */
modified drivers/iommu/amd/iommu.c
@@ -3973,6 +3973,9 @@ static int irq_remapping_select(struct irq_domain *d, struct irq_fwspec *fwspec,
3973 3973 struct amd_iommu *iommu;
3974 3974 int devid = -1;
3975 3975
3976 + if (!amd_iommu_irq_remap)
3977 + return 0;
3978 +
3976 3979 if (x86_fwspec_is_ioapic(fwspec))
3977 3980 devid = get_ioapic_devid(fwspec->param[0]);
3978 3981 else if (x86_fwspec_is_hpet(fwspec))