From patchwork Thu Sep 25 03:14:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 37890 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 542E520063 for ; Thu, 25 Sep 2014 02:52:50 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf4498211eek.9 for ; Wed, 24 Sep 2014 19:52:48 -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:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=F71cJQ0cUybwvSr99FJ31BC7qtVcNZKVOpkG7yIGsqU=; b=cP0mhsh5a+OXnMii8H2iwXXMhokR/g3H9I7sIl4SteScHt/lNaGo/H2wYLQcDfoOlE nO088xVezmsYb2LcKuZBEOD+nKVmBJog6NlTM9GXuAJ7eTUr2y24HCQTdWaq4qWy8RJs fSHDcG4pwJGaOWJVarkVPtao1e4uDX591JiFMwAvSdEpa0btepE1wr4/2zbJ05cjwagW r0QimIbuPC9dEJJCU+dFC88YdZlzbXfeOEvF7nlEO0W8MQpSeqzLMvq8JwvEdYI0fclB cdaPZk9NLFMVt/mFmXhSISdLOyyWqMDcI0dsOueY+dvTzQhdHucC+5IPu3k945LKtPse OZbQ== X-Gm-Message-State: ALoCoQmvyyjEP5jjVdJ5R9/ia+a/DRa9j+qUPtAymff1DH2kuR09mjmwkR34ZYEZkxNBKinVqiKp X-Received: by 10.112.131.33 with SMTP id oj1mr1615078lbb.7.1411613568868; Wed, 24 Sep 2014 19:52:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.99 with SMTP id x3ls221209laj.90.gmail; Wed, 24 Sep 2014 19:52:48 -0700 (PDT) X-Received: by 10.152.18.130 with SMTP id w2mr373641lad.89.1411613568613; Wed, 24 Sep 2014 19:52:48 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx.google.com with ESMTPS id lj3si1033581lab.102.2014.09.24.19.52.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 19:52:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id z11so61673lbi.13 for ; Wed, 24 Sep 2014 19:52:48 -0700 (PDT) X-Received: by 10.112.128.135 with SMTP id no7mr9185827lbb.74.1411613568518; Wed, 24 Sep 2014 19:52:48 -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 of9csp683320lbb; Wed, 24 Sep 2014 19:52:47 -0700 (PDT) X-Received: by 10.70.98.201 with SMTP id ek9mr19282047pdb.150.1411613566922; Wed, 24 Sep 2014 19:52:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si1249552pas.88.2014.09.24.19.52.46 for ; Wed, 24 Sep 2014 19:52:46 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328AbaIYCwn (ORCPT + 27 others); Wed, 24 Sep 2014 22:52:43 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:62182 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686AbaIYCu7 (ORCPT ); Wed, 24 Sep 2014 22:50:59 -0400 Received: from 172.24.2.119 (EHLO szxeml409-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AUU79147; Thu, 25 Sep 2014 10:50:53 +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:44 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , , Xinwei Hu , Wuyun , , Russell King , , , , , Arnd Bergmann , Thomas Gleixner , "Konrad Rzeszutek Wilk" , , Joerg Roedel , , , Benjamin Herrenschmidt , , , Sebastian Ott , "Tony Luck" , , "David S. Miller" , , Chris Metcalf , Ralf Baechle , Lucas Stach , David Vrabel , "Sergei Shtylyov" , Michael Ellerman , Thierry Reding , "Thomas Petazzoni" , Yijing Wang Subject: [PATCH v2 17/22] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq Date: Thu, 25 Sep 2014 11:14:27 +0800 Message-ID: <1411614872-4009-18-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 X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020209.5423830E.001C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 890479f62c42a883b34244d909f528c3 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.182 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-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Acked-by: Sebastian Ott --- arch/s390/pci/pci.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 552b990..da5316e 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -358,7 +358,7 @@ static void zpci_irq_handler(struct airq_struct *airq) } } -int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) +int zpci_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) { struct zpci_dev *zdev = get_zdev(pdev); unsigned int hwirq, msi_vecs; @@ -434,7 +434,7 @@ out: return rc; } -void arch_teardown_msi_irqs(struct pci_dev *pdev) +static void zpci_teardown_msi_irqs(struct pci_dev *pdev) { struct zpci_dev *zdev = get_zdev(pdev); struct msi_desc *msi; @@ -464,6 +464,16 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev) airq_iv_free_bit(zpci_aisb_iv, zdev->aisb); } +static struct msi_chip zpci_msi_chip = { + .setup_irqs = zpci_setup_msi_irqs, + .teardown_irqs = zpci_teardown_msi_irqs, +}; + +struct msi_chip *arch_find_msi_chip(struct pci_dev *dev) +{ + return &zpci_msi_chip; +} + static void zpci_map_resources(struct zpci_dev *zdev) { struct pci_dev *pdev = zdev->pdev;