From patchwork Thu Sep 25 03:14:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 37895 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 82C4220063 for ; Thu, 25 Sep 2014 02:54:34 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id k14sf2370047wgh.3 for ; Wed, 24 Sep 2014 19:54:33 -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=5zTG/jM2p2V2dD+3gbX/7fSbwoBqg0Cel6rAecw1P80=; b=aq3AY5UzVCyCiFOjOCWy94qqNxcdODGP37lWFsSXVLFUU+mUCkBMLrKF/Z4rdCVNWa KUO3nmUxcXzUBFAs2/hMpbMKyM1gJO37R2l8CnOIsHBUy+JvgfjVz0IhUBAvexwtm3eX YUuVp/Qdj41ZxiEtG4q+1apbxkpxfmWKf7NgKaq3T5ihiTMIpJwIx+5XSbo2kBrNtVWz qjdoVsoRf0Q9HCrS3tm3DzXOY0GJG/cB/aviS/NLZSUi1nWiKBYbvxkz3Kwn/aYj1ltH zpyLWsDQtNH0xacMEgVuwFDhq8scp/Bon54rRi+TYlmP0laNg2quMp+jURlir8USnwHj QZ4Q== X-Gm-Message-State: ALoCoQmsGcKDTej3vaBhQc0XkpZ8Px2p6CbHoEipwNsUA5tqPIea/HLvae/AESNDPQED+cuVO9gg X-Received: by 10.112.149.67 with SMTP id ty3mr1618313lbb.1.1411613673747; Wed, 24 Sep 2014 19:54:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.131 with SMTP id f3ls203752lae.38.gmail; Wed, 24 Sep 2014 19:54:33 -0700 (PDT) X-Received: by 10.152.7.193 with SMTP id l1mr10307079laa.62.1411613673614; Wed, 24 Sep 2014 19:54:33 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx.google.com with ESMTPS id se3si1159036lbb.22.2014.09.24.19.54.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 19:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id 10so9983743lbg.4 for ; Wed, 24 Sep 2014 19:54:33 -0700 (PDT) X-Received: by 10.152.22.137 with SMTP id d9mr10144991laf.29.1411613673515; Wed, 24 Sep 2014 19:54:33 -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.112.130.169 with SMTP id of9csp683446lbb; Wed, 24 Sep 2014 19:54:32 -0700 (PDT) X-Received: by 10.224.137.3 with SMTP id u3mr4658866qat.82.1411613672446; Wed, 24 Sep 2014 19:54:32 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id b2si1112551qak.90.2014.09.24.19.54.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Sep 2014 19:54:32 -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 1XWzBM-0004Y4-Qo; Thu, 25 Sep 2014 02:53:24 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWzBK-0004Tz-G4 for xen-devel@lists.xenproject.org; Thu, 25 Sep 2014 02:53:22 +0000 Received: from [85.158.143.35:63322] by server-1.bemta-4.messagelabs.com id 12/E2-05872-1A383245; Thu, 25 Sep 2014 02:53:21 +0000 X-Env-Sender: wangyijing@huawei.com X-Msg-Ref: server-15.tower-21.messagelabs.com!1411613597!13031861!1 X-Originating-IP: [119.145.14.65] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NSA9PiA3NzQ2Mw==\n X-StarScan-Received: X-StarScan-Version: 6.12.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 24547 invoked from network); 25 Sep 2014 02:53:20 -0000 Received: from szxga02-in.huawei.com (HELO szxga02-in.huawei.com) (119.145.14.65) by server-15.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 25 Sep 2014 02:53:20 -0000 Received: from 172.24.2.119 (EHLO szxeml409-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BZX30386; Thu, 25 Sep 2014 10:50:48 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml409-hub.china.huawei.com (10.82.67.136) with Microsoft SMTP Server id 14.3.158.1; Thu, 25 Sep 2014 10:50:39 +0800 From: Yijing Wang To: Bjorn Helgaas Date: Thu, 25 Sep 2014 11:14:24 +0800 Message-ID: <1411614872-4009-15-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> References: <1411614872-4009-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 , Thierry Reding , sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Russell King , Michael Ellerman , 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, Thomas Petazzoni , Xinwei Hu , Tony Luck , Sergei Shtylyov , linux-kernel@vger.kernel.org, Ralf Baechle , iommu@lists.linux-foundation.org, David Vrabel , Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Lucas Stach Subject: [Xen-devel] [PATCH v2 14/22] MIPS/Xlp/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.217.173 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/mips/pci/msi-xlp.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/msi-xlp.c b/arch/mips/pci/msi-xlp.c index e469dc7..6b791ef 100644 --- a/arch/mips/pci/msi-xlp.c +++ b/arch/mips/pci/msi-xlp.c @@ -245,7 +245,7 @@ static struct irq_chip xlp_msix_chip = { .irq_unmask = unmask_msi_irq, }; -void arch_teardown_msi_irq(unsigned int irq) +void xlp_teardown_msi_irq(unsigned int irq) { } @@ -450,7 +450,7 @@ static int xlp_setup_msix(uint64_t lnkbase, int node, int link, return 0; } -int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) +static int xlp_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) { struct pci_dev *lnkdev; uint64_t lnkbase; @@ -472,6 +472,16 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) return xlp_setup_msi(lnkbase, node, link, desc); } +static struct msi_chip xlp_chip = { + .setup_irq = xlp_setup_msi_irq, + .teardown_irq = xlp_teardown_msi_irq, +}; + +struct msi_chip *arch_find_msi_chip(struct pci_dev *dev) +{ + return &xlp_chip; +} + void __init xlp_init_node_msi_irqs(int node, int link) { struct nlm_soc_info *nodep;