From patchwork Thu Sep 25 03:14:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 37900 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 409CE20063 for ; Thu, 25 Sep 2014 02:54:42 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id l4sf5993039lbv.0 for ; Wed, 24 Sep 2014 19:54: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: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=YIxffbn7o7knPjD9rPhuE+HisOfAkd0Cr3pL6poQJr0=; b=hTDM0WzpSgaR39fH1L1+PdRqUsv0QseGVw2a185rwtagVCjI6pIjd71XjaPiWjesbO yCdAA6K39ym3M9BJxH8kx9horL3Xrz0SrxGsILbCj3Bk+JoXn6El7/X879XfSUjzpLgA RNlLQh/52Oq6vNuujmpPGdcJZw14dQiB2ecaaGghECGQzn10UFhD4fjgYm6GPTEeDFHa mP2dfmobKTb7xOwCT4kFvHwOZxNmtB9SOmLQ5bh2TZlS2cejTovFUJgh+btCyDydZTv7 +CVHFqZbEUtRNzpBP3LGphohV3MuLOo1fiCdKr2HDhOlYOpLCE7/pQJA/GttKKJt/BiH C+0w== X-Gm-Message-State: ALoCoQl67kjFpKYfgMxPb0nB/rlO5o71+t8s1cTtavQM9IO+I1DI3nqWfF4jHqzaz/ekygT3JrRO X-Received: by 10.112.62.130 with SMTP id y2mr343227lbr.4.1411613681101; Wed, 24 Sep 2014 19:54:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.50 with SMTP id t18ls210611lal.104.gmail; Wed, 24 Sep 2014 19:54:40 -0700 (PDT) X-Received: by 10.112.78.98 with SMTP id a2mr9357645lbx.48.1411613680958; Wed, 24 Sep 2014 19:54:40 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by mx.google.com with ESMTPS id pg10si1000479lbb.127.2014.09.24.19.54.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 19:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id b6so6691952lbj.12 for ; Wed, 24 Sep 2014 19:54:40 -0700 (PDT) X-Received: by 10.112.78.38 with SMTP id y6mr351237lbw.94.1411613680889; Wed, 24 Sep 2014 19:54:40 -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 of9csp683460lbb; Wed, 24 Sep 2014 19:54:40 -0700 (PDT) X-Received: by 10.221.23.198 with SMTP id rb6mr8901191vcb.19.1411613678217; Wed, 24 Sep 2014 19:54:38 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id yk10si511732vdb.49.2014.09.24.19.54.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Sep 2014 19:54:38 -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 1XWzBP-0004dX-Pf; Thu, 25 Sep 2014 02:53:27 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWzBN-0004Xl-3F for xen-devel@lists.xenproject.org; Thu, 25 Sep 2014 02:53:25 +0000 Received: from [193.109.254.147:52467] by server-1.bemta-14.messagelabs.com id 90/AC-24760-4A383245; Thu, 25 Sep 2014 02:53:24 +0000 X-Env-Sender: wangyijing@huawei.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1411613599!12846144!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.12.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3472 invoked from network); 25 Sep 2014 02:53:22 -0000 Received: from szxga02-in.huawei.com (HELO szxga02-in.huawei.com) (119.145.14.65) by server-9.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 25 Sep 2014 02:53:22 -0000 Received: from 172.24.2.119 (EHLO szxeml409-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BZX30365; Thu, 25 Sep 2014 10:50:42 +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:35 +0800 From: Yijing Wang To: Bjorn Helgaas Date: Thu, 25 Sep 2014 11:14:21 +0800 Message-ID: <1411614872-4009-12-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 Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-pci@vger.kernel.org, Bharat.Bhushan@freescale.com, Yijing Wang , Thierry Reding , sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Russell King , Michael Ellerman , 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, Thomas Petazzoni , Xinwei Hu , Tony Luck , Sergei Shtylyov , linux-kernel@vger.kernel.org, Ralf Baechle , iommu@lists.linux-foundation.org, David Vrabel , Wuyun , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Lucas Stach Subject: [Xen-devel] [PATCH v2 11/22] x86/MSI: Remove unused MSI weak arch functions 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.217.181 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: Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang --- arch/x86/include/asm/pci.h | 3 --- arch/x86/include/asm/x86_init.h | 4 ---- arch/x86/kernel/apic/io_apic.c | 2 +- arch/x86/kernel/x86_init.c | 24 ------------------------ drivers/iommu/irq_remapping.c | 1 - 5 files changed, 1 insertions(+), 33 deletions(-) diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 878a06d..34f9676 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -96,14 +96,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); int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, unsigned int irq_base, unsigned int irq_offset); extern struct msi_chip *x86_msi_chip; #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 882b95e..f998192 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -3200,7 +3200,7 @@ 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 pci_dev *dev, int nvec, int type) { struct msi_desc *msidesc; unsigned int irq; 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 = { diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index 7929590..99b1c0f 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c @@ -170,7 +170,6 @@ static void __init irq_remapping_modify_x86_ops(void) x86_io_apic_ops.set_affinity = set_remapped_irq_affinity; x86_io_apic_ops.setup_entry = setup_ioapic_remapped_entry; x86_io_apic_ops.eoi_ioapic_pin = eoi_ioapic_pin_remapped; - x86_msi.setup_msi_irqs = irq_remapping_setup_msi_irqs; x86_msi.setup_hpet_msi = setup_hpet_msi_remapped; x86_msi.compose_msi_msg = compose_remapped_msi_msg; x86_msi_chip = &remap_msi_chip;