From patchwork Fri Aug 15 03:14:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 4726091 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 19E4D9F38C for ; Fri, 15 Aug 2014 02:51:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4378D201D5 for ; Fri, 15 Aug 2014 02:51:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68CAC201BF for ; Fri, 15 Aug 2014 02:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753405AbaHOCvU (ORCPT ); Thu, 14 Aug 2014 22:51:20 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:20793 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753135AbaHOCvU (ORCPT ); Thu, 14 Aug 2014 22:51:20 -0400 Received: from 172.24.2.119 (EHLO szxeml401-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CAI22404; Fri, 15 Aug 2014 10:49:20 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml401-hub.china.huawei.com (10.82.67.31) with Microsoft SMTP Server id 14.3.158.1; Fri, 15 Aug 2014 10:49:12 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , Yijing Wang , "Konrad Rzeszutek Wilk" , Subject: [PATCH 3/3] xen/MSI: Retrieve MSI msg from cached msi_desc->msg Date: Fri, 15 Aug 2014 11:14:37 +0800 Message-ID: <1408072477-10008-1-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We had cached the MSI msg in __write_msi_msg(), so we should retrieve the cached MSI msg directly, not to access the MSI address/data hardware registers again. Signed-off-by: Yijing Wang CC: Konrad Rzeszutek Wilk CC: xen-devel@lists.xenproject.org --- arch/x86/pci/xen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 4656099..7a74404 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -228,7 +228,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) return 1; list_for_each_entry(msidesc, &dev->msi_list, list) { - read_msi_msg(msidesc, &msg); + get_cached_msi_msg(msidesc, &msg); pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) | ((msg.address_lo >> MSI_ADDR_DEST_ID_SHIFT) & 0xff); if (msg.data != XEN_PIRQ_MSI_DATA ||