From patchwork Tue Mar 28 12:16:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 9648963 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 03FB5602C8 for ; Tue, 28 Mar 2017 12:17:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A1E91FFB7 for ; Tue, 28 Mar 2017 12:17:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F258D22B1F; Tue, 28 Mar 2017 12:17:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 387DA1FFB7 for ; Tue, 28 Mar 2017 12:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751960AbdC1MRJ (ORCPT ); Tue, 28 Mar 2017 08:17:09 -0400 Received: from 8bytes.org ([81.169.241.247]:48387 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751834AbdC1MRI (ORCPT ); Tue, 28 Mar 2017 08:17:08 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 62081233; Tue, 28 Mar 2017 14:16:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1490703411; bh=KaRgeOwyLSWDvCDEUF1Xi7cXXgKZUvW0zRd7uiKBANM=; h=From:To:Cc:Subject:Date:From; b=GJUuvhBYVbnd1Ik9sSL2yZdjf/1dJqZWn2YLeqo8zXr1svGNKhUxUv7+PpPnzTW2h f86eotH/F92JOaZCM4JTp5yOwz9/mmog37ioqFSwPRNlNYeqn979ZPZFHc43M8JRi2 SdLCvNCUEY3rk3oviLnftBKzjhXt55bGeEa2CCKjfd80haBC7f0g4W6cBrunWQHfmQ hq5/vuuUCnpNIx9TWCmeNes0Fc7tYmVIYzx1S+W+nJYAjSwj5T0FKNmjyve1WFUzwH fL3gmYI7m0qUvvEsH6iM31JBN3bJSzEusiYJfaSS/yZOi8qNzBpQOGrIP3zoXp3UrE S8FJu1o+8wp3Q== From: Joerg Roedel To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Joerg Roedel , Daniel Drake , Alexander Deucher Subject: [PATCH] PCI: Blacklist AMD Stoney GPU devices for ATS Date: Tue, 28 Mar 2017 14:16:44 +0200 Message-Id: <1490703404-4944-1-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Joerg Roedel 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 Cc: Daniel Drake Cc: Alexander Deucher Signed-off-by: Joerg Roedel Acked-by: Alex Deucher --- 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;