From patchwork Sun May 26 15:53:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2616581 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 3D1A8DFB79 for ; Sun, 26 May 2013 16:01:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754368Ab3EZP5y (ORCPT ); Sun, 26 May 2013 11:57:54 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:33972 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754367Ab3EZP5w (ORCPT ); Sun, 26 May 2013 11:57:52 -0400 Received: by mail-pd0-f176.google.com with SMTP id r11so5747664pdi.7 for ; Sun, 26 May 2013 08:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=YPFsDgs1Ci0ycMjiBcSarMIBmxSZzf/SWRzcrYvbNx4=; b=qq50MZg0KbVEHegQGNDVamkHIMtWqpvKL4N9IqrEZjRDiyFh3XTRHlV45is9untn4/ Iy5LyOpjDIZ+RERLSXfv8vhhIOkWRnbrIiq+fDfbqJc1hZKFbF9D+kzfcMxTEqf534Ne UP3hwU3gw1ucLWvGGqFBGyeAAvPH9f0bpRo2Z1TaGP3OxS+kQbC20+8pbUKZogso9h3k 4A6WvpHL9YGYhSLuQiVAOR0gXJby4+8ra2sUYWDoMbom1BMNWcg0bZnTKee4llSThP9c slkKkscov+mdi+710kKfeNUPUjFDqEpA5B+4jCYrPhe/uvEshsc3JOuXW4bYS7dkCKRV HikQ== X-Received: by 10.66.102.3 with SMTP id fk3mr26191961pab.192.1369583872363; Sun, 26 May 2013 08:57:52 -0700 (PDT) Received: from localhost.localdomain ([111.196.197.202]) by mx.google.com with ESMTPSA id ze11sm26603189pab.22.2013.05.26.08.57.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 May 2013 08:57:51 -0700 (PDT) From: Jiang Liu To: Bjorn Helgaas , Yinghai Lu Cc: Jiang Liu , "Rafael J . Wysocki" , Greg Kroah-Hartman , Gu Zheng , Toshi Kani , Myron Stowe , Yijing Wang , Jiang Liu , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , Grant Likely , Hiroo MATSUMOTO , microblaze-uclinux@itee.uq.edu.au Subject: [PATCH v3, part2 08/20] PCI, Microblaze: use hotplug-safe iterators to walk PCI buses Date: Sun, 26 May 2013 23:53:05 +0800 Message-Id: <1369583597-3801-9-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1369583597-3801-1-git-send-email-jiang.liu@huawei.com> References: <1369583597-3801-1-git-send-email-jiang.liu@huawei.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Enhance Microblaze architecture specific code to use hotplug-safe iterators to walk PCI buses. Signed-off-by: Jiang Liu Cc: Michal Simek Cc: Bjorn Helgaas Cc: Greg Kroah-Hartman Cc: Grant Likely Cc: Hiroo MATSUMOTO Cc: microblaze-uclinux@itee.uq.edu.au Cc: linux-kernel@vger.kernel.org --- arch/microblaze/pci/pci-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index bdb8ea1..a35caa3 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c @@ -1317,7 +1317,7 @@ void __init pcibios_resource_survey(void) /* Allocate and assign resources. If we re-assign everything, then * we skip the allocate phase */ - list_for_each_entry(b, &pci_root_buses, node) + for_each_pci_root_bus(b) pcibios_allocate_bus_resources(b); pcibios_allocate_resources(0); @@ -1327,7 +1327,7 @@ void __init pcibios_resource_survey(void) * the low IO area and the VGA memory area if they intersect the * bus available resources to avoid allocating things on top of them */ - list_for_each_entry(b, &pci_root_buses, node) + for_each_pci_root_bus(b) pcibios_reserve_legacy_regions(b); /* Now proceed to assigning things that were left unassigned */