* [PATCH] iommu/amd: Remove unnecessary break statements
@ 2025-04-25 5:16 leixiang
0 siblings, 0 replies; only message in thread
From: leixiang @ 2025-04-25 5:16 UTC (permalink / raw)
To: suravee.suthikulpanit
Cc: boris.ostrovsky, iommu, james.puthukattukaran, joao.m.martins,
jon.grimm, joro, linux-kernel, sean.m.osborne
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 0001-iommu-amd-Remove-unnecessary-break-statements.patch --]
[-- Type: text/x-patch, Size: 1254 bytes --]
From f7ff3298d05479f34463b409e1cbcec396621b71 Mon Sep 17 00:00:00 2001
From: leixiang <leixiang@kylinos.cn>
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 <leixiang@kylinos.cn>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-25 5:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-25 5:16 [PATCH] iommu/amd: Remove unnecessary break statements leixiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®