Skip to content

Commit 308723e

Browse files
John Garryjoergroedel
authored andcommitted
iommu: Remove mode argument from iommu_set_dma_strict()
We only ever now set strict mode enabled in iommu_set_dma_strict(), so just remove the argument. Signed-off-by: John Garry <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Reviewed-by: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 02252b3 commit 308723e

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

drivers/iommu/amd/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3099,7 +3099,7 @@ static int __init parse_amd_iommu_options(char *str)
30993099
for (; *str; ++str) {
31003100
if (strncmp(str, "fullflush", 9) == 0) {
31013101
pr_warn("amd_iommu=fullflush deprecated; use iommu.strict=1 instead\n");
3102-
iommu_set_dma_strict(true);
3102+
iommu_set_dma_strict();
31033103
}
31043104
if (strncmp(str, "force_enable", 12) == 0)
31053105
amd_iommu_force_enable = true;

drivers/iommu/intel/iommu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ static int __init intel_iommu_setup(char *str)
454454
iommu_dma_forcedac = true;
455455
} else if (!strncmp(str, "strict", 6)) {
456456
pr_warn("intel_iommu=strict deprecated; use iommu.strict=1 instead\n");
457-
iommu_set_dma_strict(true);
457+
iommu_set_dma_strict();
458458
} else if (!strncmp(str, "sp_off", 6)) {
459459
pr_info("Disable supported super page\n");
460460
intel_iommu_superpage = 0;
@@ -4394,7 +4394,7 @@ int __init intel_iommu_init(void)
43944394
*/
43954395
if (cap_caching_mode(iommu->cap)) {
43964396
pr_info_once("IOMMU batching disallowed due to virtualization\n");
4397-
iommu_set_dma_strict(true);
4397+
iommu_set_dma_strict();
43984398
}
43994399
iommu_device_sysfs_add(&iommu->iommu, NULL,
44004400
intel_iommu_groups,
@@ -5712,7 +5712,7 @@ static void quirk_calpella_no_shadow_gtt(struct pci_dev *dev)
57125712
} else if (dmar_map_gfx) {
57135713
/* we have to ensure the gfx device is idle before we flush */
57145714
pci_info(dev, "Disabling batched IOTLB flush on Ironlake\n");
5715-
iommu_set_dma_strict(true);
5715+
iommu_set_dma_strict();
57165716
}
57175717
}
57185718
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0040, quirk_calpella_no_shadow_gtt);

drivers/iommu/iommu.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,9 @@ static int __init iommu_dma_setup(char *str)
350350
}
351351
early_param("iommu.strict", iommu_dma_setup);
352352

353-
void iommu_set_dma_strict(bool strict)
353+
void iommu_set_dma_strict(void)
354354
{
355-
if (strict || !(iommu_cmd_line & IOMMU_CMD_LINE_STRICT))
356-
iommu_dma_strict = strict;
355+
iommu_dma_strict = true;
357356
}
358357

359358
bool iommu_get_dma_strict(struct iommu_domain *domain)

include/linux/iommu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ int iommu_enable_nesting(struct iommu_domain *domain);
485485
int iommu_set_pgtable_quirks(struct iommu_domain *domain,
486486
unsigned long quirks);
487487

488-
void iommu_set_dma_strict(bool val);
488+
void iommu_set_dma_strict(void);
489489
bool iommu_get_dma_strict(struct iommu_domain *domain);
490490

491491
extern int report_iommu_fault(struct iommu_domain *domain, struct device *dev,

0 commit comments

Comments
 (0)