Skip to content

Commit 81ee85d

Browse files
jwrdegoedejoergroedel
authored andcommitted
iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint
Quoting from the comment describing the WARN functions in include/asm-generic/bug.h: * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report * significant kernel issues that need prompt attention if they should ever * appear at runtime. * * Do not use these macros when checking for invalid external inputs The (buggy) firmware tables which the dmar code was calling WARN_TAINT for really are invalid external inputs. They are not under the kernel's control and the issues in them cannot be fixed by a kernel update. So logging a backtrace, which invites bug reports to be filed about this, is not helpful. Fixes: 556ab45 ("ioat2: catch and recover from broken vtd configurations v6") Signed-off-by: Hans de Goede <[email protected]> Acked-by: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=701847 Signed-off-by: Joerg Roedel <[email protected]>
1 parent 96788c7 commit 81ee85d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4261,10 +4261,11 @@ static void quirk_ioat_snb_local_iommu(struct pci_dev *pdev)
42614261

42624262
/* we know that the this iommu should be at offset 0xa000 from vtbar */
42634263
drhd = dmar_find_matched_drhd_unit(pdev);
4264-
if (WARN_TAINT_ONCE(!drhd || drhd->reg_base_addr - vtbar != 0xa000,
4265-
TAINT_FIRMWARE_WORKAROUND,
4266-
"BIOS assigned incorrect VT-d unit for Intel(R) QuickData Technology device\n"))
4264+
if (!drhd || drhd->reg_base_addr - vtbar != 0xa000) {
4265+
pr_warn_once(FW_BUG "BIOS assigned incorrect VT-d unit for Intel(R) QuickData Technology device\n");
4266+
add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
42674267
pdev->dev.archdata.iommu = DUMMY_DEVICE_DOMAIN_INFO;
4268+
}
42684269
}
42694270
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_SNB, quirk_ioat_snb_local_iommu);
42704271

0 commit comments

Comments
 (0)