From patchwork Mon Oct 27 13:22:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 39613 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0825F2118A for ; Mon, 27 Oct 2014 12:42:11 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id d17sf719528eek.11 for ; Mon, 27 Oct 2014 05:42:10 -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=bawwaVT8zFw1JkKL96Q8E6G/uVKTeWTP+eJAhxex9YM=; b=D6vrNh0Q/USoxVACFfu3HdCubKvB9i64w50zRlRzgUFtLOtPLQ5FBpYDtxhd833WIS 5FL0EsJQUP/oRoYcAwhqoENluijbRKH98/NBVMn5wddyutOmBr4jziiCnrQ/pOHYAyJD 6Cwon6aWdzck5nBcq75Y/zIJzWTMPUaVlr+f8Y8/zyqJWrVv5rZimFE2KYWmoRyKuoZ/ ASSet30CW9u2giQtLC3ikZC6sE6nmaPA832pcJiwu39AvLxwko6fmOwQNx4BtSVZwYOU pqEqiVQbLnDXy6h5+yo4I1yl9blSRQ199rU/FQOrJcX0HlXJUEiMb0OgLFJU1+SMhNh7 J5aw== X-Gm-Message-State: ALoCoQn1l/svC9wSAmiW/s5yYwp5wd9PBVd+1ZWN+YOeKjoPrKHu90uvocrJ2fQhCIcAAaLiEd5x X-Received: by 10.112.138.202 with SMTP id qs10mr5415603lbb.5.1414413730478; Mon, 27 Oct 2014 05:42:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.5 with SMTP id w5ls716997law.71.gmail; Mon, 27 Oct 2014 05:42:10 -0700 (PDT) X-Received: by 10.152.43.197 with SMTP id y5mr22483659lal.82.1414413730297; Mon, 27 Oct 2014 05:42:10 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id g1si6300887lag.126.2014.10.27.05.42.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 05:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id hz20so5651457lab.25 for ; Mon, 27 Oct 2014 05:42:09 -0700 (PDT) X-Received: by 10.153.8.164 with SMTP id dl4mr23421796lad.29.1414413729776; Mon, 27 Oct 2014 05:42:09 -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.84.229 with SMTP id c5csp281648lbz; Mon, 27 Oct 2014 05:42:08 -0700 (PDT) X-Received: by 10.68.183.34 with SMTP id ej2mr23572472pbc.75.1414413727654; Mon, 27 Oct 2014 05:42:07 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fk2si10346974pdb.228.2014.10.27.05.42.06 for ; Mon, 27 Oct 2014 05:42:07 -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 S1753019AbaJ0MmC (ORCPT + 26 others); Mon, 27 Oct 2014 08:42:02 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:28070 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533AbaJ0Mlm (ORCPT ); Mon, 27 Oct 2014 08:41:42 -0400 Received: from 172.24.2.119 (EHLO szxeml404-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CBJ49235; Mon, 27 Oct 2014 20:41:30 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml404-hub.china.huawei.com (10.82.67.59) with Microsoft SMTP Server id 14.3.158.1; Mon, 27 Oct 2014 20:41:20 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , , Xinwei Hu , Wuyun , , Russell King , , 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 05/16] x86/MSI: Remove unused MSI weak arch functions Date: Mon, 27 Oct 2014 21:22:11 +0800 Message-ID: <1414416142-31239-6-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1414416142-31239-1-git-send-email-wangyijing@huawei.com> References: <1414416142-31239-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.215.52 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: , Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang --- arch/x86/include/asm/pci.h | 5 +---- arch/x86/include/asm/x86_init.h | 4 ---- arch/x86/kernel/apic/io_apic.c | 21 +++++---------------- arch/x86/kernel/x86_init.c | 24 ------------------------ 4 files changed, 6 insertions(+), 48 deletions(-) diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 1af3d77..21fe24f 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -99,14 +99,11 @@ extern void pci_iommu_alloc(void); #ifdef CONFIG_PCI_MSI /* implemented in arch/x86/kernel/apic/io_apic. */ struct msi_desc; -int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); -void native_teardown_msi_irq(unsigned int irq); -void native_restore_msi_irqs(struct pci_dev *dev); +void native_teardown_msi_irq(struct msi_controller *ctrl, unsigned int irq); int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, unsigned int irq_base, unsigned int irq_offset); extern struct msi_controller *x86_msi_ctrl; #else -#define native_setup_msi_irqs NULL #define native_teardown_msi_irq NULL #endif diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index f58a9c7..2514f67 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -174,13 +174,9 @@ struct pci_dev; struct msi_msg; struct x86_msi_ops { - int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type); void (*compose_msi_msg)(struct pci_dev *dev, unsigned int irq, unsigned int dest, struct msi_msg *msg, u8 hpet_id); - void (*teardown_msi_irq)(unsigned int irq); - void (*teardown_msi_irqs)(struct pci_dev *dev); - void (*restore_msi_irqs)(struct pci_dev *dev); int (*setup_hpet_msi)(unsigned int irq, unsigned int id); }; diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 8b8c671..04bf011 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -3207,7 +3207,8 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, return 0; } -int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) +static int native_setup_msi_irqs(struct msi_controller *ctrl, + struct pci_dev *dev, int nvec, int type) { struct msi_desc *msidesc; unsigned int irq; @@ -3234,26 +3235,14 @@ int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) return 0; } -static int __native_setup_msi_irqs(struct msi_controller *ctrl, - struct pci_dev *dev, int nvec, int type) -{ - return native_setup_msi_irqs(dev, nvec, type); -} - -void native_teardown_msi_irq(unsigned int irq) +void native_teardown_msi_irq(struct msi_controller *ctrl, unsigned int irq) { irq_free_hwirq(irq); } -static void __native_teardown_msi_irq(struct msi_controller *ctrl, - unsigned int irq) -{ - native_teardown_msi_irq(irq); -} - static struct msi_controller native_msi_ctrl = { - .setup_irqs = __native_setup_msi_irqs, - .teardown_irq = __native_teardown_msi_irq, + .setup_irqs = native_setup_msi_irqs, + .teardown_irq = native_teardown_msi_irq, }; struct msi_controller *pcibios_msi_controller(struct pci_bus *bus) diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 234b072..cc32568 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -110,34 +110,10 @@ EXPORT_SYMBOL_GPL(x86_platform); #if defined(CONFIG_PCI_MSI) struct x86_msi_ops x86_msi = { - .setup_msi_irqs = native_setup_msi_irqs, .compose_msi_msg = native_compose_msi_msg, - .teardown_msi_irq = native_teardown_msi_irq, - .teardown_msi_irqs = default_teardown_msi_irqs, - .restore_msi_irqs = default_restore_msi_irqs, .setup_hpet_msi = default_setup_hpet_msi, }; -/* MSI arch specific hooks */ -int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) -{ - return x86_msi.setup_msi_irqs(dev, nvec, type); -} - -void arch_teardown_msi_irqs(struct pci_dev *dev) -{ - x86_msi.teardown_msi_irqs(dev); -} - -void arch_teardown_msi_irq(unsigned int irq) -{ - x86_msi.teardown_msi_irq(irq); -} - -void arch_restore_msi_irqs(struct pci_dev *dev) -{ - x86_msi.restore_msi_irqs(dev); -} #endif struct x86_io_apic_ops x86_io_apic_ops = {