From patchwork Tue Aug 12 07:26:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 35226 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DADB4203C5 for ; Tue, 12 Aug 2014 07:03:41 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 9sf29393391ykp.7 for ; Tue, 12 Aug 2014 00:03:41 -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=MYfyAIf3hKICc8e48rWD25Qt/uO5HIm8riFP3CQB6S0=; b=R4FP5VQTP2vV1ijqnWsNPtfyrfetLov03nUvv0m4hbuOGfvjafmm4d/3eJae4tuMZ+ 1XQffCYckkhkSR61TsXFKMVU/CurPatu3GZaFbv/XLQk0iRw8cSJdaoSihab6bEkF3tt 9jcAvz/8+gyRYevzDhSh7nTctb2wgmhNTwG4fjR8VO47gqhC5FhGFb+fn6HLjZDXUzGz tlFDvVCqYZWXFOiVl9kzw0mVia7PnVMpOzK9JmmDQ2HHl1sDYDqj1LPk9gfr9gySLXNw IGbrHHrtE8V2MAmmWAtIHyJ+ffaeemBpz5K1e4qsp8e0d33sVBLHYQLcriPAgdYsArHB 5qTw== X-Gm-Message-State: ALoCoQnvy4uh+MXa7VY+79cv0JjKxst/We6pHynwWK6ZadSn/zBO5SHgYNfpf8djoXOmTkb1r8NZ X-Received: by 10.236.126.103 with SMTP id a67mr17023466yhi.4.1407827021667; Tue, 12 Aug 2014 00:03:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.230 with SMTP id j93ls18950qgf.31.gmail; Tue, 12 Aug 2014 00:03:41 -0700 (PDT) X-Received: by 10.52.234.228 with SMTP id uh4mr12938603vdc.34.1407827021587; Tue, 12 Aug 2014 00:03:41 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id zb2si7756075vdb.17.2014.08.12.00.03.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 00:03:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so12952550vcb.13 for ; Tue, 12 Aug 2014 00:03:41 -0700 (PDT) X-Received: by 10.220.144.147 with SMTP id z19mr2179373vcu.26.1407827021504; Tue, 12 Aug 2014 00:03:41 -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.37.5 with SMTP id tc5csp224500vcb; Tue, 12 Aug 2014 00:03:40 -0700 (PDT) X-Received: by 10.70.56.101 with SMTP id z5mr2573093pdp.47.1407827020511; Tue, 12 Aug 2014 00:03:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3si11785246pdc.120.2014.08.12.00.03.39 for ; Tue, 12 Aug 2014 00:03:40 -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 S1754177AbaHLHDh (ORCPT + 26 others); Tue, 12 Aug 2014 03:03:37 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:42417 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753820AbaHLHD0 (ORCPT ); Tue, 12 Aug 2014 03:03:26 -0400 Received: from 172.24.2.119 (EHLO szxeml421-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CAE07889; Tue, 12 Aug 2014 15:03:00 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml421-hub.china.huawei.com (10.82.67.160) with Microsoft SMTP Server id 14.3.158.1; Tue, 12 Aug 2014 15:02:47 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , Xinwei Hu , Wuyun , , Marc Zyngier , , Russell King , , , "Arnd Bergmann" , Thomas Gleixner , "H. Peter Anvin" , Konrad Rzeszutek Wilk , , Joerg Roedel , , , "Benjamin Herrenschmidt" , , , Sebastian Ott , "Tony Luck" , , "David S. Miller" , , Chris Metcalf , Yijing Wang Subject: [RFC PATCH 15/20] s390/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X Date: Tue, 12 Aug 2014 15:26:08 +0800 Message-ID: <1407828373-24322-16-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1407828373-24322-1-git-send-email-wangyijing@huawei.com> References: <1407828373-24322-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected 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.220.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: , Introduce a new struct msi_chip zpci_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang --- arch/s390/pci/pci.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 9ddc51e..ee7b05c 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -398,8 +398,9 @@ 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 device *dev, int nvec, int type) { + struct pci_dev *pdev = to_pci_dev(dev); struct zpci_dev *zdev = get_zdev(pdev); unsigned int hwirq, msi_vecs; unsigned long aisb; @@ -474,8 +475,9 @@ out: return rc; } -void arch_teardown_msi_irqs(struct pci_dev *pdev) +void zpci_teardown_msi_irqs(struct device *dev) { + struct pci_dev *pdev = to_pci_dev(dev); struct zpci_dev *zdev = get_zdev(pdev); struct msi_desc *msi; int rc; @@ -501,6 +503,16 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev) airq_iv_free_bit(zpci_aisb_iv, zdev->aisb); } +struct msi_chip zpci_msi_chip = { + .setup_irqs = zpci_setup_msi_irqs, + .teardown_irqs = zpci_teardown_msi_irqs, +}; + +struct msi_chip *arch_get_match_msi_chip(struct device *dev) +{ + return &zpci_msi_chip; +} + static void zpci_map_resources(struct zpci_dev *zdev) { struct pci_dev *pdev = zdev->pdev;