From patchwork Wed Nov 19 07:32:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 41100 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F269A20CBB for ; Wed, 19 Nov 2014 06:54:52 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf272269wib.10 for ; Tue, 18 Nov 2014 22:54:52 -0800 (PST) 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:subject:date:message-id :in-reply-to:references:mime-version:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=IZLtHJwGU/UlnDL5474qFnNiXLg3jktIFQsI3Y4uLic=; b=Q2HptYDlclzACEsqzNwNKwZFfPGNUPL3/KIK89FoTApGO1IEM1taPDbHWCxLzyAZqu OY5jhWcGJC5AGaZZmeF3fjoEGBeMNB/cV7Zias2YXcrOoas6DVHeAkqb+74h5cVLTI29 hqGlOFjVoAySrmhYW32JUs/AHCkG+rHoB7ksB5O9JWFZPZX1YpM9kU4/itEkXd77tAih DLdC3eCRfPDXW/QNxIseEvqpFBqRWETUASxs6qTieIsY25PCUM6YI3yrwahILMjvRsXM iBZ4iY3btMHNcWHp72vrMonClCLAiJeOtttPbvHtmsyqLTKQDlOS/wF7dTrJPvtUA0Cy a22A== X-Gm-Message-State: ALoCoQkMq4LRiqW6C6OAUm0KFAw9x3dU9sHbVfUpeaWZAA0xsB4FXdHBkgZU2V4oMofqEDKP1Tlu X-Received: by 10.180.182.164 with SMTP id ef4mr377539wic.0.1416380092296; Tue, 18 Nov 2014 22:54:52 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.97 with SMTP id r1ls1101354lar.0.gmail; Tue, 18 Nov 2014 22:54:52 -0800 (PST) X-Received: by 10.152.9.225 with SMTP id d1mr3647223lab.38.1416380092038; Tue, 18 Nov 2014 22:54:52 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id xk6si838651lbb.22.2014.11.18.22.54.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Nov 2014 22:54:52 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id z12so11602667lbi.8 for ; Tue, 18 Nov 2014 22:54:52 -0800 (PST) X-Received: by 10.112.161.202 with SMTP id xu10mr159685lbb.94.1416380091944; Tue, 18 Nov 2014 22:54:51 -0800 (PST) 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.184.201 with SMTP id ew9csp37187lbc; Tue, 18 Nov 2014 22:54:51 -0800 (PST) X-Received: by 10.67.16.106 with SMTP id fv10mr44002629pad.47.1416380090317; Tue, 18 Nov 2014 22:54:50 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id pl6si1032806pdb.123.2014.11.18.22.54.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Nov 2014 22:54:50 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xqz8t-0003LZ-3x; Wed, 19 Nov 2014 06:53:31 +0000 Received: from szxga01-in.huawei.com ([119.145.14.64]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xqz8R-0003GP-TR for linux-arm-kernel@lists.infradead.org; Wed, 19 Nov 2014 06:53:05 +0000 Received: from 172.24.2.119 (EHLO szxeml450-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CEQ74320; Wed, 19 Nov 2014 14:51:51 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml450-hub.china.huawei.com (10.82.67.193) with Microsoft SMTP Server id 14.3.158.1; Wed, 19 Nov 2014 14:51:41 +0800 From: Yijing Wang To: Bjorn Helgaas Subject: [PATCH 3/5] PCI: Use pci_scan_bus_simple() in simple scene. Date: Wed, 19 Nov 2014 15:32:47 +0800 Message-ID: <1416382369-13587-4-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1416382369-13587-1-git-send-email-wangyijing@huawei.com> References: <1416382369-13587-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141118_225304_341540_77CB29BE X-CRM114-Status: GOOD ( 12.52 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [119.145.14.64 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [119.145.14.64 listed in wl.mailspike.net] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Liviu Dudau , Tony Luck , Russell King , Arnd Bergmann , linux-pci@vger.kernel.org, x86@kernel.org, Geert Uytterhoeven , Yijing Wang , linux-ia64@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.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.177 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 Use pci_scan_bus_simple() to scan pci buses with the default IO/MEM/BUS resources. Use it instead of pci_scan_bus() and pci_scan_bus_parented(). Signed-off-by: Yijing Wang --- arch/alpha/kernel/sys_nautilus.c | 2 +- arch/m68k/coldfire/pci.c | 2 +- arch/sparc/kernel/pcic.c | 3 ++- arch/unicore32/kernel/pci.c | 4 ++-- drivers/pci/hotplug/ibmphp_core.c | 3 ++- drivers/pci/xen-pcifront.c | 2 +- include/linux/pci.h | 2 ++ 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c index 4ae4a40..a4f190b 100644 --- a/arch/alpha/kernel/sys_nautilus.c +++ b/arch/alpha/kernel/sys_nautilus.c @@ -206,7 +206,7 @@ nautilus_init_pci(void) unsigned long memtop = max_low_pfn << PAGE_SHIFT; /* Scan our single hose. */ - bus = pci_scan_bus(0, alpha_mv.pci_ops, hose); + bus = pci_scan_bus_simple(NULL, 0, alpha_mv.pci_ops, hose); hose->bus = bus; pcibios_claim_one_bus(bus); diff --git a/arch/m68k/coldfire/pci.c b/arch/m68k/coldfire/pci.c index d45f087..9f423d5 100644 --- a/arch/m68k/coldfire/pci.c +++ b/arch/m68k/coldfire/pci.c @@ -312,7 +312,7 @@ static int __init mcf_pci_init(void) set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(200)); - rootbus = pci_scan_bus(0, &mcf_pci_ops, NULL); + rootbus = pci_scan_bus_simple(NULL, 0, &mcf_pci_ops, NULL); rootbus->resource[0] = &mcf_pci_io; rootbus->resource[1] = &mcf_pci_mem; diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 7a82fe2..9665e03 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c @@ -390,7 +390,8 @@ static void __init pcic_pbm_scan_bus(struct linux_pcic *pcic) { struct linux_pbm_info *pbm = &pcic->pbm; - pbm->pci_bus = pci_scan_bus(pbm->pci_first_busno, &pcic_ops, pbm); + pbm->pci_bus = pci_scan_bus_simple(NULL, + pbm->pci_first_busno, &pcic_ops, pbm); if (pbm->pci_bus) pci_bus_add_devices(pbm->pci_bus); #if 0 /* deadwood transplanted from sparc64 */ diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c index 3d82024..f290a3d 100644 --- a/arch/unicore32/kernel/pci.c +++ b/arch/unicore32/kernel/pci.c @@ -258,8 +258,8 @@ static int __init pci_common_init(void) pci_puv3_preinit(); - puv3_bus = pci_scan_bus(0, &pci_puv3_ops, NULL); - + puv3_bus = pci_scan_bus_simple(NULL, 0, + &pci_puv3_ops, NULL); if (!puv3_bus) panic("PCI: unable to scan bus!"); diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index db0f2e8..9190cb1 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c @@ -767,7 +767,8 @@ static u8 bus_structure_fixup(u8 busno) (l != 0x0000) && (l != 0xffff)) { debug("%s - Inside bus_structure_fixup()\n", __func__); - b = pci_scan_bus(busno, ibmphp_pci_bus->ops, NULL); + b = pci_scan_bus_simple(NULL, busno, + ibmphp_pci_bus->ops, NULL); if (b) pci_bus_add_devices(b); break; diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index b1ffebe..364aaf4 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -474,7 +474,7 @@ static int pcifront_scan_root(struct pcifront_device *pdev, pci_lock_rescan_remove(); - b = pci_scan_bus_parented(&pdev->xdev->dev, bus, + b = pci_scan_bus_simple(&pdev->xdev->dev, bus, &pcifront_bus_ops, sd); if (!b) { dev_err(&pdev->xdev->dev, diff --git a/include/linux/pci.h b/include/linux/pci.h index 90a5fde..befefbd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -769,6 +769,8 @@ struct pci_bus *pci_find_bus(int domain, int busnr); void pci_bus_add_devices(const struct pci_bus *bus); struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata); +struct pci_bus *pci_scan_bus_simple(struct device *parent, int bus, + struct pci_ops *ops, void *sysdata); struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata); struct pci_bus *pci_create_root_bus(struct device *parent, int bus, struct pci_ops *ops, void *sysdata,