From patchwork Sun Nov 9 15:10:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 5261371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B134C11AC for ; Sun, 9 Nov 2014 15:14:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 39EAA20122 for ; Sun, 9 Nov 2014 15:14:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6393220115 for ; Sun, 9 Nov 2014 15:14:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XnU90-0007km-DV; Sun, 09 Nov 2014 15:11:10 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XnU7y-0005UQ-Vx for linux-arm-kernel@lists.infradead.org; Sun, 09 Nov 2014 15:10:08 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 09 Nov 2014 07:07:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,346,1413270000"; d="scan'208";a="604933294" Received: from gerry-dev.bj.intel.com ([10.238.158.52]) by orsmga001.jf.intel.com with ESMTP; 09 Nov 2014 07:09:41 -0800 From: Jiang Liu To: Bjorn Helgaas , Benjamin Herrenschmidt , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "Rafael J. Wysocki" , Randy Dunlap , Yinghai Lu , Borislav Petkov , Grant Likely , Marc Zyngier , Yingjoe Chen , Konrad Rzeszutek Wilk , x86@kernel.org, Matthias Brugger , Jiang Liu , Yijing Wang , Alexander Gordeev Subject: [RFC Part4 v1 12/17] PCI, MSI: Rename __write_msi_msg() as __pci_write_msi_msg() Date: Sun, 9 Nov 2014 23:10:34 +0800 Message-Id: <1415545839-28263-13-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1415545839-28263-1-git-send-email-jiang.liu@linux.intel.com> References: <1415545839-28263-1-git-send-email-jiang.liu@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141109_071007_772025_2C2E59E4 X-CRM114-Status: GOOD ( 13.90 ) X-Spam-Score: -5.3 (-----) Cc: Tony Luck , Greg Kroah-Hartman , Joerg Roedel , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Andrew Morton , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_RHS_DOB autolearn=unavailable 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 Rename __write_msi_msg() as __pci_write_msi_msg() to mark it as PCI specific. Also define pci_write_msi_msg() as write_msi_msg() for easy transition. Signed-off-by: Jiang Liu --- arch/x86/pci/xen.c | 2 +- drivers/pci/msi.c | 9 ++++----- include/linux/msi.h | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index a48ca2f8b93e..1cfbe32c4b1c 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -240,7 +240,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) goto error; } xen_msi_compose_msg(dev, pirq, &msg); - __write_msi_msg(msidesc, &msg); + __pci_write_msi_msg(msidesc, &msg); dev_dbg(&dev->dev, "xen: msi bound to pirq=%d\n", pirq); } else { dev_dbg(&dev->dev, diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 6011dfb475a1..80be534df522 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -27,7 +27,6 @@ static int pci_msi_enable = 1; #define msix_table_size(flags) ((flags & PCI_MSIX_FLAGS_QSIZE) + 1) - /* Arch hooks */ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) @@ -115,7 +114,7 @@ static void default_restore_msi_irq(struct pci_dev *dev, int irq) } if (entry) - __write_msi_msg(entry, &entry->msg); + __pci_write_msi_msg(entry, &entry->msg); } void __weak arch_restore_msi_irqs(struct pci_dev *dev) @@ -273,7 +272,7 @@ void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) } } -void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) +void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) { if (entry->dev->current_state != PCI_D0) { /* Don't touch the hardware now */ @@ -314,7 +313,7 @@ void write_msi_msg(unsigned int irq, struct msi_msg *msg) { struct msi_desc *entry = irq_get_msi_desc(irq); - __write_msi_msg(entry, msg); + __pci_write_msi_msg(entry, msg); } EXPORT_SYMBOL_GPL(write_msi_msg); @@ -1085,7 +1084,7 @@ void pci_msi_write_msg(struct irq_data *irq_data, struct msi_msg *msg) * MSI message denotes a contiguous group of IRQs, written for 0th IRQ. */ if (desc->irq == irq_data->irq) - __write_msi_msg(desc, msg); + __pci_write_msi_msg(desc, msg); } /* diff --git a/include/linux/msi.h b/include/linux/msi.h index 4b0d070ff481..5639970db71d 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -62,8 +62,9 @@ void msi_domain_deactivate(struct irq_domain *domain, #ifdef CONFIG_PCI_MSI /* Helper functions */ void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); -void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); +void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); void write_msi_msg(unsigned int irq, struct msi_msg *msg); +#define pci_write_msi_msg write_msi_msg /* * The arch hooks to setup up msi irqs. Those functions are