From patchwork Wed Oct 15 03:06:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 38751 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 089EC20973 for ; Wed, 15 Oct 2014 02:31:48 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id n3sf273689wiv.0 for ; Tue, 14 Oct 2014 19:31: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=nSk/dHjJbHpFol5ArlEusxRr9Iu2+6c8uy2i5j9Ohl0=; b=i3WK9Q0xG0kIO9r5xO4FXsuytjJ62JH5FSrmPmjldQBnR96fnVqE8aZxg9l41Vchgx GaCa32O+ukCfUpJLgdnf/RWOispQfw0T7syK+lF0gXfDYO8NrL3Dl1Il74Lomifm/ftm 9BPrEMKrbN79cWzHjbgQO6VDR90EpNuLJM56wbCF+BSRf9vC1q/jzNeqATZ4UYUl669E vBElFmFCE4qgiswmcq96zuFqRE0Lg9D6VnnMHZW277S5YuJwojoTtE0RS2Eopx0NQMWg axaDLXpUeuMxQrQPOCRGgecFZ8GHn3j5VtNr9YA1guCtk+Bo0I3uTmfSo258vLGsTe8U S77g== X-Gm-Message-State: ALoCoQmwkDw6hEc8Yw197qnZhpgKojxskBh0s4GuRLUJiZY45o4VZXpIKWJGmUnfb3f7psA4Zp1K X-Received: by 10.181.27.135 with SMTP id jg7mr1577680wid.5.1413340308181; Tue, 14 Oct 2014 19:31:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.39 with SMTP id y7ls10475lag.0.gmail; Tue, 14 Oct 2014 19:31:47 -0700 (PDT) X-Received: by 10.112.12.35 with SMTP id v3mr3601169lbb.80.1413340307925; Tue, 14 Oct 2014 19:31:47 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id ks12si28780042lac.5.2014.10.14.19.31.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 19:31:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id q1so248865lam.22 for ; Tue, 14 Oct 2014 19:31:47 -0700 (PDT) X-Received: by 10.112.167.130 with SMTP id zo2mr9299184lbb.4.1413340307813; Tue, 14 Oct 2014 19:31:47 -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 c5csp517728lbz; Tue, 14 Oct 2014 19:31:46 -0700 (PDT) X-Received: by 10.66.218.7 with SMTP id pc7mr7394016pac.133.1413340305984; Tue, 14 Oct 2014 19:31:45 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ee3si14497171pbb.67.2014.10.14.19.31.45 for ; Tue, 14 Oct 2014 19:31:45 -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 S932785AbaJOC0B (ORCPT + 27 others); Tue, 14 Oct 2014 22:26:01 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:39160 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932669AbaJOCZr (ORCPT ); Tue, 14 Oct 2014 22:25:47 -0400 Received: from 172.24.2.119 (EHLO szxeml412-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CAT35349; Wed, 15 Oct 2014 10:25:32 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml412-hub.china.huawei.com (10.82.67.91) with Microsoft SMTP Server id 14.3.158.1; Wed, 15 Oct 2014 10:25:26 +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" , Liviu Dudau , Yijing Wang Subject: [PATCH v3 09/27] arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus() Date: Wed, 15 Oct 2014 11:06:57 +0800 Message-ID: <1413342435-7876-10-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1413342435-7876-1-git-send-email-wangyijing@huawei.com> References: <1413342435-7876-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.49 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: , MSI chip will be saved in pci_sys_data, now we can clean up pcibios_add_bus() and pcibios_remove_bus() in arm, and use pci_find_msi_chip() to get msi chip in core MSI code. Signed-off-by: Yijing Wang --- arch/arm/include/asm/mach/pci.h | 4 ---- arch/arm/kernel/bios32.c | 16 ---------------- drivers/pci/msi.c | 11 +++-------- 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 59b0d87..230b2c9 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h @@ -39,8 +39,6 @@ struct hw_pci { resource_size_t start, resource_size_t size, resource_size_t align); - void (*add_bus)(struct pci_bus *bus); - void (*remove_bus)(struct pci_bus *bus); }; /* @@ -71,8 +69,6 @@ struct pci_sys_data { resource_size_t start, resource_size_t size, resource_size_t align); - void (*add_bus)(struct pci_bus *bus); - void (*remove_bus)(struct pci_bus *bus); void *private_data; /* platform controller private data */ }; diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index a19038d..b1b872e 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -360,20 +360,6 @@ void pcibios_fixup_bus(struct pci_bus *bus) } EXPORT_SYMBOL(pcibios_fixup_bus); -void pcibios_add_bus(struct pci_bus *bus) -{ - struct pci_sys_data *sys = bus->sysdata; - if (sys->add_bus) - sys->add_bus(bus); -} - -void pcibios_remove_bus(struct pci_bus *bus) -{ - struct pci_sys_data *sys = bus->sysdata; - if (sys->remove_bus) - sys->remove_bus(bus); -} - /* * Swizzle the device pin each time we cross a bridge. If a platform does * not provide a swizzle function, we perform the standard PCI swizzling. @@ -478,8 +464,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw, sys->swizzle = hw->swizzle; sys->map_irq = hw->map_irq; sys->align_resource = hw->align_resource; - sys->add_bus = hw->add_bus; - sys->remove_bus = hw->remove_bus; INIT_LIST_HEAD(&sys->resources); if (hw->private_data) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index f11108c..56e54ad 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -32,12 +32,10 @@ int pci_msi_ignore_mask; int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) { - struct msi_chip *chip = dev->bus->msi; + struct msi_chip *chip; int err; - if (!chip) - chip = pci_msi_chip(dev->bus); - + chip = pci_msi_chip(dev->bus); if (!chip || !chip->setup_irq) return -EINVAL; @@ -51,10 +49,7 @@ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) void __weak arch_teardown_msi_irq(unsigned int irq) { struct msi_desc *entry = irq_get_msi_desc(irq); - struct msi_chip *chip = entry->dev->bus->msi; - - if (!chip) - chip = pci_msi_chip(entry->dev->bus); + struct msi_chip *chip = pci_msi_chip(entry->dev->bus); if (!chip || !chip->teardown_irq) return;