From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030561Ab2CSFon (ORCPT ); Mon, 19 Mar 2012 01:44:43 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:28293 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030395Ab2CSFoe (ORCPT ); Mon, 19 Mar 2012 01:44:34 -0400 From: Yinghai Lu To: Jesse Barnes , Benjamin Herrenschmidt , Tony Luck , David Miller , x86 Cc: Bjorn Helgaas , Dominik Brodowski , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Yinghai Lu Subject: [PATCH -v11 11/30] x86, PCI: Add busn_res into resources list for acpi path Date: Sun, 18 Mar 2012 22:42:42 -0700 Message-Id: <1332135781-13695-12-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1332135781-13695-1-git-send-email-yinghai@kernel.org> References: <1332135781-13695-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4F66C7BB.0012,ss=1,re=0.000,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org will put it in resources list and pass it for create_root_bus -v2: Bjorn thought that we should just use that in acpi_root instead of have another one pci_root_info. Suggested-by: Bjorn Helgaas Signed-off-by: Yinghai Lu --- arch/x86/pci/acpi.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 8a17b23..da0149d 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -12,7 +12,6 @@ struct pci_root_info { char name[16]; unsigned int res_num; struct resource *res; - int busnum; struct pci_sysdata sd; }; @@ -357,7 +356,9 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device, { size_t size; + sprintf(info->name, "PCI Bus %04x:%02x", domain, busnum); info->bridge = device; + info->res_num = 0; acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_resource, info); @@ -370,8 +371,6 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device, if (!info->res) return; - sprintf(info->name, "PCI Bus %04x:%02x", domain, busnum); - acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, info); } @@ -440,9 +439,11 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) * _CRS with no apertures is normal, so only fall back to * defaults or native bridge info if we're ignoring _CRS. */ - if (pci_use_crs) + if (pci_use_crs) { + /* insert busn res at first */ + pci_add_resource(&resources, &root->secondary); add_resources(info, &resources); - else { + } else { free_pci_root_info_res(info); x86_pci_root_bus_resources(busnum, &resources); } -- 1.7.7