From patchwork Thu Jul 20 23:33:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 9855817 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 2AA3D602BA for ; Thu, 20 Jul 2017 23:28:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BF36286D4 for ; Thu, 20 Jul 2017 23:28:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10DC9286F7; Thu, 20 Jul 2017 23:28:03 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 E40D2286D9 for ; Thu, 20 Jul 2017 23:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934454AbdGTX2A (ORCPT ); Thu, 20 Jul 2017 19:28:00 -0400 Received: from mga03.intel.com ([134.134.136.65]:26275 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934727AbdGTX2A (ORCPT ); Thu, 20 Jul 2017 19:28:00 -0400 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2017 16:27:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,386,1496127600"; d="scan'208";a="129949380" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.96]) by fmsmga006.fm.intel.com with ESMTP; 20 Jul 2017 16:27:58 -0700 From: Keith Busch To: linux-pci@vger.kernel.org, Bjorn Helgaas Cc: Scott Bauer , Jonathan Derrick , Keith Busch Subject: [PATCH 2/2] vmd: Assign vector zero to all bridges Date: Thu, 20 Jul 2017 19:33:54 -0400 Message-Id: <1500593634-4558-2-git-send-email-keith.busch@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1500593634-4558-1-git-send-email-keith.busch@intel.com> References: <1500593634-4558-1-git-send-email-keith.busch@intel.com> 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 We don't want slower IRQ handlers impacting faster devices that happen to be assigned the same VMD interrupt vector. The driver was trying to separate such devices by checking if MSI-x wasn't used, but really we just don't want to end devices to share with bridges. Most bridges may use MSI currently, so that criteria happened to work, but newer ones may use MSI-x, so this patch explicity checks the device type when choosing a vector. Signed-off-by: Keith Busch --- drivers/pci/host/vmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/vmd.c b/drivers/pci/host/vmd.c index 8cddf30..031eef2 100644 --- a/drivers/pci/host/vmd.c +++ b/drivers/pci/host/vmd.c @@ -183,7 +183,7 @@ static struct vmd_irq_list *vmd_next_irq(struct vmd_dev *vmd, struct msi_desc *d int i, best = 1; unsigned long flags; - if (!desc->msi_attrib.is_msix || vmd->msix_count == 1) + if (pci_is_bridge(msi_desc_to_pci_dev(desc)) || vmd->msix_count == 1) return &vmd->irqs[0]; raw_spin_lock_irqsave(&list_lock, flags);