From patchwork Fri Sep 5 10:10:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 36791 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B09F0206A0 for ; Fri, 5 Sep 2014 09:49:44 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id et14sf101792962pad.6 for ; Fri, 05 Sep 2014 02:49:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=25uP5vO1nQPEKYKmgz2r+LWqW+i6pWUCePEZHWq6gGc=; b=jFhgRJ/DvgmN8ENzw6LYkw9fBRxOoI60Sj1qMRjMzMyw4aFbvY8EHLEh34Gn0om2J+ zbfw7n2PkJLvIG6SAI0OEKasM/uFfg46EpFvUm2f0+FUffXTNhAUBTK6j5bsasVu6PQi hQRsxcijrQs9UkBBo9WvIgzyYyaQcEn3iT3NuQfC4c5B3OWDipP+VmmNjJejDypn57fR o6sghIqxsdpppQAZE8rcxmEn9UdFk02B/u942Rjl0u6YRiQemw2+2neGg2vENCSRpGEP 0F6j1zhO4b1dC0+wmrLvd6isZzbcDQbmsaLZt+C4yQcgyML3TSf0p4wLZ8qO+/jnVkOm 2BNw== X-Gm-Message-State: ALoCoQm/kLkL6xqmLdjLLdBVMZXpOAOoNXb2zHCd2mnukdQTI3B4+jZ7Zw21C+6ZxrgxV3AL0OX8 X-Received: by 10.66.141.70 with SMTP id rm6mr6331592pab.37.1409910580759; Fri, 05 Sep 2014 02:49:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.19.203 with SMTP id 69ls600247qgh.27.gmail; Fri, 05 Sep 2014 02:49:40 -0700 (PDT) X-Received: by 10.52.148.2 with SMTP id to2mr458843vdb.38.1409910580653; Fri, 05 Sep 2014 02:49:40 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id sz12si848726vdb.57.2014.09.05.02.49.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 02:49:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id id10so12003757vcb.2 for ; Fri, 05 Sep 2014 02:49:40 -0700 (PDT) X-Received: by 10.52.148.2 with SMTP id to2mr458837vdb.38.1409910580563; Fri, 05 Sep 2014 02:49:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp56780vcb; Fri, 5 Sep 2014 02:49:40 -0700 (PDT) X-Received: by 10.52.94.108 with SMTP id db12mr7802783vdb.8.1409910580236; Fri, 05 Sep 2014 02:49:40 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id vx5si275890vcb.0.2014.09.05.02.49.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 02:49:40 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XPq8L-0005Pe-3Q; Fri, 05 Sep 2014 09:48:45 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XPq8J-0005P7-UA for xen-devel@lists.xenproject.org; Fri, 05 Sep 2014 09:48:44 +0000 Received: from [85.158.143.35:33452] by server-2.bemta-4.messagelabs.com id 06/35-04525-BF689045; Fri, 05 Sep 2014 09:48:43 +0000 X-Env-Sender: wangyijing@huawei.com X-Msg-Ref: server-12.tower-21.messagelabs.com!1409910516!11863979!1 X-Originating-IP: [119.145.14.64] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NCA9PiA4MDE5MQ==\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19444 invoked from network); 5 Sep 2014 09:48:40 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (119.145.14.64) by server-12.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 5 Sep 2014 09:48:40 -0000 Received: from 172.24.2.119 (EHLO szxeml419-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CBG93476; Fri, 05 Sep 2014 17:46:06 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml419-hub.china.huawei.com (10.82.67.158) with Microsoft SMTP Server id 14.3.158.1; Fri, 5 Sep 2014 17:45:56 +0800 From: Yijing Wang To: Bjorn Helgaas Date: Fri, 5 Sep 2014 18:10:03 +0800 Message-ID: <1409911806-10519-19-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Bharat.Bhushan@freescale.com, Yijing Wang , sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Russell King , Joerg Roedel , x86@kernel.org, Sebastian Ott , Benjamin Herrenschmidt , xen-devel@lists.xenproject.org, arnab.basu@freescale.com, Arnd Bergmann , Chris Metcalf , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Xinwei Hu , Tony Luck , Ralf Baechle , iommu@lists.linux-foundation.org, Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Subject: [Xen-devel] [PATCH v1 18/21] IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangyijing@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Use MSI chip framework instead of arch MSI functions to configure MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework. Signed-off-by: Yijing Wang --- arch/ia64/kernel/msi_ia64.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index 4efe748..55ac859 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c @@ -112,15 +112,15 @@ static struct irq_chip ia64_msi_chip = { }; -int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) +static int arch_ia64_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) { if (platform_setup_msi_irq) - return platform_setup_msi_irq(pdev, desc); + return platform_setup_msi_irq(dev, desc); - return ia64_setup_msi_irq(pdev, desc); + return ia64_setup_msi_irq(dev, desc); } -void arch_teardown_msi_irq(unsigned int irq) +static void arch_ia64_teardown_msi_irq(unsigned int irq) { if (platform_teardown_msi_irq) return platform_teardown_msi_irq(irq); @@ -128,6 +128,16 @@ void arch_teardown_msi_irq(unsigned int irq) return ia64_teardown_msi_irq(irq); } +static struct msi_chip chip = { + .setup_irq = arch_ia64_setup_msi_irq, + .teardown_irq = arch_ia64_teardown_msi_irq, +}; + +struct msi_chip *arch_find_msi_chip(struct pci_dev *dev) +{ + return &chip; +} + #ifdef CONFIG_INTEL_IOMMU #ifdef CONFIG_SMP static int dmar_msi_set_affinity(struct irq_data *data,