From patchwork Fri Sep 5 10:09:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 36810 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D09E6202A1 for ; Fri, 5 Sep 2014 10:14:42 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id y10sf67428183pdj.0 for ; Fri, 05 Sep 2014 03:14:38 -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=lYHR38z9q9+KxM324OJbM0bsYt4pBpobS0Ff+n0lZSyNRVC+iAWO+8uk14PS72LcfB pswY70NVVA8HDSAneNpYTxfsNm76WnipxGs0zxSkg8R1zi0AqzQS23qyP8k839Rw0xEH DxPohFyNRG4sqksXHOABi+bfA6tQHo0lu3ARXSY3dtkUGao87Fr/gR8FEte22p9l+qhS uyHzkNz0plAUbUIRGaUnKuGWi4JDHhXukHU8XHUQUOYO1VGlS24cJudqSWvlhf79iBCq qdwpmuvEFBUaedH0vxNQoE40wIaGaLeSnUf8ou9z1xBWgy4/dJ7Tkro4PYX2gJZ9poyP qmsQ== X-Gm-Message-State: ALoCoQnCaIXthzRFOPe9eoER8XJZ5Q7J14SdHOJhd1THdSn4eCnLqBs5fE+LHbbVUjng4rs/0CsX X-Received: by 10.66.187.8 with SMTP id fo8mr6419690pac.32.1409910590055; Fri, 05 Sep 2014 02:49:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.70 with SMTP id g64ls697351qgf.85.gmail; Fri, 05 Sep 2014 02:49:49 -0700 (PDT) X-Received: by 10.52.164.199 with SMTP id ys7mr248232vdb.42.1409910589928; Fri, 05 Sep 2014 02:49:49 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id yw7si843259vdb.63.2014.09.05.02.49.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 02:49:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hq11so12070477vcb.36 for ; Fri, 05 Sep 2014 02:49:49 -0700 (PDT) X-Received: by 10.221.64.205 with SMTP id xj13mr764435vcb.18.1409910589858; Fri, 05 Sep 2014 02:49:49 -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 uj3csp56794vcb; Fri, 5 Sep 2014 02:49:49 -0700 (PDT) X-Received: by 10.52.87.144 with SMTP id ay16mr21024vdb.43.1409910589527; Fri, 05 Sep 2014 02:49:49 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id wb9si239065vcb.88.2014.09.05.02.49.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 02:49:49 -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 1XPq8O-0005Qt-8G; Fri, 05 Sep 2014 09:48:48 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XPq8M-0005QH-A4 for xen-devel@lists.xenproject.org; Fri, 05 Sep 2014 09:48:46 +0000 Received: from [85.158.139.211:20380] by server-11.bemta-5.messagelabs.com id 33/43-11011-DF689045; Fri, 05 Sep 2014 09:48:45 +0000 X-Env-Sender: wangyijing@huawei.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1409910521!12658437!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.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6305 invoked from network); 5 Sep 2014 09:48:44 -0000 Received: from szxga02-in.huawei.com (HELO szxga02-in.huawei.com) (119.145.14.65) by server-5.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 5 Sep 2014 09:48:44 -0000 Received: from 172.24.2.119 (EHLO szxeml419-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BZB92844; Fri, 05 Sep 2014 17:45:59 +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:48 +0800 From: Yijing Wang To: Bjorn Helgaas Date: Fri, 5 Sep 2014 18:09:58 +0800 Message-ID: <1409911806-10519-14-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 13/21] 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.220.177 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;