Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ioat/dca: Update DCA BIOS workarounds to use TAINT_FIRMWARE_WORKAROUND

This patch is meant to be a follow-up for a patch originally submitted under
the title "ioat: Do not enable DCA if tag map is invalid". It was brought to
my attention that the preferred approach for BIOS workarounds is to set the
taint flag for TAINT_FIRMWARE_WORKAROUND for systems that require BIOS
workarounds.

This change makes it so that the DCA workarounds for broken BIOSes will now
use WARN_TAINT_ONCE(1, TAINT_FIRMWARE_WORKAROUND, ...) instead of just
printing a message via dev_err.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexander Duyck and committed by
David S. Miller
f3c78f85 ea3d1cc2

+8 -3
+8 -3
drivers/dma/ioat/dca.c
··· 470 470 } 471 471 472 472 if (!dca2_tag_map_valid(ioatdca->tag_map)) { 473 - dev_err(&pdev->dev, "APICID_TAG_MAP set incorrectly by BIOS, " 474 - "disabling DCA\n"); 473 + WARN_TAINT_ONCE(1, TAINT_FIRMWARE_WORKAROUND, 474 + "%s %s: APICID_TAG_MAP set incorrectly by BIOS, disabling DCA\n", 475 + dev_driver_string(&pdev->dev), 476 + dev_name(&pdev->dev)); 475 477 free_dca_provider(dca); 476 478 return NULL; 477 479 } ··· 691 689 } 692 690 693 691 if (dca3_tag_map_invalid(ioatdca->tag_map)) { 694 - dev_err(&pdev->dev, "APICID_TAG_MAP set incorrectly by BIOS, disabling DCA\n"); 692 + WARN_TAINT_ONCE(1, TAINT_FIRMWARE_WORKAROUND, 693 + "%s %s: APICID_TAG_MAP set incorrectly by BIOS, disabling DCA\n", 694 + dev_driver_string(&pdev->dev), 695 + dev_name(&pdev->dev)); 695 696 free_dca_provider(dca); 696 697 return NULL; 697 698 }