From f7ff3298d05479f34463b409e1cbcec396621b71 Mon Sep 17 00:00:00 2001 From: leixiang Date: Fri, 25 Apr 2025 12:18:42 +0800 Subject: [PATCH] iommu/amd: Remove unnecessary break statements As CMPXCHG16B feature has already been checked separately before enabling the GA, XT, and GAM modes, there is unnecessary need a break in init_iommu_one at case 0x40. Fixes: e52d58d54a321 ("iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE") Signed-off-by: leixiang --- drivers/iommu/amd/init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index dd9e26b7b718..5fb5a4d7c142 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -1790,10 +1790,8 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h, iommu->mmio_phys_end = MMIO_CNTR_CONF_OFFSET; /* XT and GAM require GA mode. */ - if ((h->efr_reg & (0x1 << IOMMU_EFR_GASUP_SHIFT)) == 0) { + if ((h->efr_reg & (0x1 << IOMMU_EFR_GASUP_SHIFT)) == 0) amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY; - break; - } if (h->efr_reg & BIT(IOMMU_EFR_XTSUP_SHIFT)) amd_iommu_xt_mode = IRQ_REMAP_X2APIC_MODE; -- 2.43.0