From patchwork Mon Apr 22 23:12:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 238694 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9B8162C014B for ; Tue, 23 Apr 2013 09:12:31 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753950Ab3DVXMb (ORCPT ); Mon, 22 Apr 2013 19:12:31 -0400 Received: from mail-ie0-f176.google.com ([209.85.223.176]:41584 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874Ab3DVXMa (ORCPT ); Mon, 22 Apr 2013 19:12:30 -0400 Received: by mail-ie0-f176.google.com with SMTP id x14so12907ief.35 for ; Mon, 22 Apr 2013 16:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=7J0RiQD//tqTgDUVh15g+wc5O+rVEt+wApsV7topEJE=; b=j2LlLLGaiAEXqvxOn2h7Ypy64IypCkiB5dM1nlhoG4MGCqSutlHVemR4Shw+XsJ0LC x8rpbk1d++04VGECJhNI9NDAinZynRrYIJWIQIkykI2EqkNgaZ58TgZhCL8u+XXkUSxI IDlq5n3xgyoeBLJHtDJFNI+v/fPDWorxZc4p+/QQm3P4Y6jKQNXcFfcolAOZtPteu1m1 Ey/ledM4osbAWkm4If1wP/hEUP5RhCy7HJaZ96ymAE0e6DD99FAJd9NkTwPKu68JzHgt Ug2gFPHjwpKfHT8141n2HYI6prunbJST5iYuX32VyLUV840Z7pngeTQ9fLSp0224QsXo Ab6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=7J0RiQD//tqTgDUVh15g+wc5O+rVEt+wApsV7topEJE=; b=LiMJRwEbUG+ziUCgdxVVy3l/ttnN2Em6rfYW4o53aYsCA/4z9uyl8Cwpa3YZC5P2ZL Q27MNl6DghsS+IYt+hHCwP+hLqESdZFNAC2dBgs5T6Urw6uh/OJfpqY6pAV/sIFfxYsM ieqHlmsoRdbHva6XqVFpopazZSAPvFcTxQjduHztN8FB2WTctme3iil5t38fEOuWVfjn Z3FBvtgx9kxFs2oERntTx9ei7gYAWjTdYcoWKLs4pBgaTHabnb0gONhpnwisOZlPFvku Hgd7RoJxfhhO7muskjfBmNpToSMuNmtVFznoe6gGh/s7VP44jtCCF22ywqpagnl9Bq4o ro5Q== X-Received: by 10.50.50.162 with SMTP id d2mr12314619igo.76.1366672350197; Mon, 22 Apr 2013 16:12:30 -0700 (PDT) Received: from localhost ([172.29.120.215]) by mx.google.com with ESMTPS id dy5sm19737478igc.1.2013.04.22.16.12.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 16:12:29 -0700 (PDT) Subject: [PATCH v4 20/22] xen/pci: Used cached MSI-X capability offset To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Gavin Shan , Konrad Rzeszutek Wilk Date: Mon, 22 Apr 2013 17:12:28 -0600 Message-ID: <20130422231228.32621.88310.stgit@bhelgaas-glaptop> In-Reply-To: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> References: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmf5dlVAilcSLMfsPFnmHEaAnCd1xnwdDhrJACv4HG1jrYOjxoCKSDRt1bcO9SUD35HqEToHMwYywn+uGxnS818hCgHGXw80AHWMip8ZEuD4s0+T+9N+JhaUg2Sqo3cdQJbWNcbbuWJJCJ+JQ3x42izSwRhuPwFvOE+bmffksZDMSSU//x6OFmHbgZ7RxNcJIQsvH9Uu4viOJuafck6mjNwWSh30sGV8ynYWYTWINRlTt4B7l0= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org We now cache the MSI-X capability offset in the struct pci_dev, so no need to find the capability again. Signed-off-by: Bjorn Helgaas CC: Konrad Rzeszutek Wilk --- arch/x86/pci/xen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index b9d1ff2..7b521ef 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -295,8 +295,7 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) int pos; u32 table_offset, bir; - pos = pci_find_capability(dev, PCI_CAP_ID_MSIX); - + pos = dev->msix_cap; pci_read_config_dword(dev, pos + PCI_MSIX_TABLE, &table_offset); bir = (u8)(table_offset & PCI_MSIX_TABLE_BIR);