From patchwork Tue Sep 25 08:26:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 1502951 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 03D1BE011D for ; Tue, 25 Sep 2012 08:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753936Ab2IYI04 (ORCPT ); Tue, 25 Sep 2012 04:26:56 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:38899 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753929Ab2IYI0y (ORCPT ); Tue, 25 Sep 2012 04:26:54 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8P8QjHj030985 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Sep 2012 08:26:45 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8P8QieM014720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Sep 2012 08:26:44 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8P8QiW0007853; Tue, 25 Sep 2012 03:26:44 -0500 Received: from linux-siqj.site (/75.36.245.102) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 25 Sep 2012 01:26:44 -0700 From: Yinghai Lu To: Bjorn Helgaas , Len Brown Cc: linux-pci@vger.kernel.org, Yinghai Lu , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org, linux-altix@sgi.com Subject: [PATCH 21/29] PCI, ia64: kill pci_find_next_bus Date: Tue, 25 Sep 2012 01:26:22 -0700 Message-Id: <1348561590-28067-22-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1348561590-28067-1-git-send-email-yinghai@kernel.org> References: <1348561590-28067-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Yinghai Lu Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Cc: linux-altix@sgi.com --- arch/ia64/hp/common/sba_iommu.c | 7 ++++--- arch/ia64/sn/kernel/io_common.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index bcda5b2..0f27a37 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -2155,9 +2155,10 @@ sba_init(void) #ifdef CONFIG_PCI { - struct pci_bus *b = NULL; - while ((b = pci_find_next_bus(b)) != NULL) - sba_connect_bus(b); + struct pci_host_bridge *host_bridge = NULL; + + for_each_pci_host_bridge(host_bridge) + sba_connect_bus(host_bridge->bus); } #endif diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index 8630875..131938b 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c @@ -516,6 +516,7 @@ arch_initcall(sn_io_early_init); int __init sn_io_late_init(void) { + struct pci_host_bridge *host_bridge = NULL; struct pci_bus *bus; struct pcibus_bussoft *bussoft; cnodeid_t cnode; @@ -530,8 +531,8 @@ sn_io_late_init(void) * PIC, TIOCP, TIOCE (TIOCA does it during bus fixup using * info from the PROM). */ - bus = NULL; - while ((bus = pci_find_next_bus(bus)) != NULL) { + for_each_pci_host_bridge(host_bridge) { + bus = host_bridge->bus; bussoft = SN_PCIBUS_BUSSOFT(bus); nasid = NASID_GET(bussoft->bs_base); cnode = nasid_to_cnodeid(nasid);