public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: Blacklist AMD Stoney GPU devices for ATS
@ 2017-03-28 12:16 Joerg Roedel
  2017-03-28 20:18 ` Deucher, Alexander
  2017-04-04 16:43 ` Bjorn Helgaas
  0 siblings, 2 replies; 13+ messages in thread
From: Joerg Roedel @ 2017-03-28 12:16 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, linux-kernel, Joerg Roedel, Daniel Drake,
	Alexander Deucher

From: Joerg Roedel <jroedel@suse.de>

ATS is broken on these devices. Under invalidation load, the
GPU does not reply to invalidations anymore, causing
Completion-wait loop timeouts on the AMD IOMMU driver side.
Fix it by not enabling ATS on these devices.

Note that below mentioned commit is not broken, it just
triggers the issue because it might cause invalidation
storms on devices.

Fixes: b1516a14657a ('iommu/amd: Implement flush queue')
Reported-by: Daniel Drake <drake@endlessm.com>
Cc: Daniel Drake <drake@endlessm.com>
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/pci/ats.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
index eeb9fb2..711bdb2 100644
--- a/drivers/pci/ats.c
+++ b/drivers/pci/ats.c
@@ -17,10 +17,18 @@
 
 #include "pci.h"
 
+static const struct pci_device_id broken_ats_tbl[] = {
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x98e4) }, /* AMD Stoney GPU part */
+	{ 0 }
+};
+
 void pci_ats_init(struct pci_dev *dev)
 {
 	int pos;
 
+	if (pci_match_id(broken_ats_tbl, dev))
+		return;
+
 	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ATS);
 	if (!pos)
 		return;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-04-07 12:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 12:16 [PATCH] PCI: Blacklist AMD Stoney GPU devices for ATS Joerg Roedel
2017-03-28 20:18 ` Deucher, Alexander
2017-03-28 20:28   ` Joerg Roedel
2017-03-28 20:37     ` Deucher, Alexander
2017-03-28 20:56       ` 'Joerg Roedel'
2017-03-28 21:13         ` Deucher, Alexander
2017-03-28 22:26           ` 'Joerg Roedel'
2017-03-29  7:15             ` Nath, Arindam
2017-03-29  9:42               ` 'Joerg Roedel'
2017-03-29  9:47                 ` Nath, Arindam
2017-03-29 16:21             ` Deucher, Alexander
2017-04-04 16:43 ` Bjorn Helgaas
2017-04-07 12:34   ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox