From patchwork Tue Aug 12 07:26:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 35229 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0A761203C5 for ; Tue, 12 Aug 2014 07:04:32 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id nu7sf42558723obb.11 for ; Tue, 12 Aug 2014 00:04:31 -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=AOSnCza4ZakajaTlLx0KT54S2yCCjPNREd0TIQY45Ck=; b=NFi87yxjAJkMZoPkJQMukMJs4apmL6yl9OfCLGlWe8M91ihw+4KAwv7xD+0toBk1ni TM6iDzJGJSMz3vc8I3sKP2vtgB8z9l7EA6PMwdfGJM9aZafFj5j8LLqGOalXoW/E3GkF NH2bj612wYmJlBgkyyM8GczgAGVW0CPDyQ4B17hugRTQOgcrYy4AalissLA+Z4fm0A7a aGNLrymt3X4wwpFxH6i++u5rYzlFofOeAbSuS5N39WEKmQKBx7cgLTBwAP2EGC4avKr+ scv8c4ZDNLeyAqch6u3CIMqkreOBv6+xlKX6W/FqWXauj+gOE2o5kowABbWZpoSsbOQI gBJA== X-Gm-Message-State: ALoCoQl1LzGUq7YCOxW2WpEpnP3a1kTzAqmxv23uZJKJ+HDSalUi2xb1p5ZeI2wrM1+GDJ4vlB75 X-Received: by 10.50.103.66 with SMTP id fu2mr13648444igb.7.1407827071622; Tue, 12 Aug 2014 00:04:31 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.84 with SMTP id 78ls3513qgk.79.gmail; Tue, 12 Aug 2014 00:04:31 -0700 (PDT) X-Received: by 10.221.49.133 with SMTP id va5mr2159223vcb.37.1407827071414; Tue, 12 Aug 2014 00:04:31 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id wk17si7769387vcb.9.2014.08.12.00.04.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 00:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id hy10so12781382vcb.18 for ; Tue, 12 Aug 2014 00:04:31 -0700 (PDT) X-Received: by 10.220.110.77 with SMTP id m13mr2199422vcp.35.1407827071310; Tue, 12 Aug 2014 00:04:31 -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 tc5csp224550vcb; Tue, 12 Aug 2014 00:04:30 -0700 (PDT) X-Received: by 10.70.29.3 with SMTP id f3mr377108pdh.142.1407827070328; Tue, 12 Aug 2014 00:04:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si11775549pdj.39.2014.08.12.00.04.29 for ; Tue, 12 Aug 2014 00:04:30 -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 S1754080AbaHLHDd (ORCPT + 26 others); Tue, 12 Aug 2014 03:03:33 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:42415 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753794AbaHLHD0 (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 CAE07916; Tue, 12 Aug 2014 15:03:01 +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:51 +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 17/20] IA64/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X Date: Tue, 12 Aug 2014 15:26:10 +0800 Message-ID: <1407828373-24322-18-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.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-Post: , List-Help: , List-Archive: List-Unsubscribe: , Introduce a new struct msi_chip ia64_msi_chip instead of weak arch functions to configure MSI/MSI-X. 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 c430f91..6e527c4 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 device *dev, struct msi_desc *desc) { if (platform_setup_msi_irq) - return platform_setup_msi_irq(pdev, desc); + return platform_setup_msi_irq(to_pci_dev(dev), desc); - return ia64_setup_msi_irq(pdev, desc); + return ia64_setup_msi_irq(to_pci_dev(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_get_match_msi_chip(struct device *dev) +{ + return &chip; +} + #ifdef CONFIG_INTEL_IOMMU #ifdef CONFIG_SMP static int dmar_msi_set_affinity(struct irq_data *data,