From patchwork Fri Dec 11 23:35:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 66849 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBBNePpm001983 for ; Fri, 11 Dec 2009 23:40:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935015AbZLKXjv (ORCPT ); Fri, 11 Dec 2009 18:39:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934999AbZLKXjs (ORCPT ); Fri, 11 Dec 2009 18:39:48 -0500 Received: from hera.kernel.org ([140.211.167.34]:57337 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934973AbZLKXhK (ORCPT ); Fri, 11 Dec 2009 18:37:10 -0500 Received: from [10.6.76.26] (sca-ea-fw-1.Sun.COM [192.18.43.225]) (authenticated bits=0) by hera.kernel.org (8.14.3/8.14.3) with ESMTP id nBBNaIxZ011182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Dec 2009 23:36:19 GMT Message-ID: <4B22D741.4060309@kernel.org> Date: Fri, 11 Dec 2009 15:35:29 -0800 From: Yinghai Lu User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Ingo Molnar , Jesse Barnes , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton CC: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Gertjan van Wingerde Subject: [PATCH 4/7] x86/pci: amd one chain system to use pci read out res References: <4B22D4DA.2000104@kernel.org> In-Reply-To: <4B22D4DA.2000104@kernel.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Index: linux-2.6/arch/x86/pci/amd_bus.c =================================================================== --- linux-2.6.orig/arch/x86/pci/amd_bus.c +++ linux-2.6/arch/x86/pci/amd_bus.c @@ -87,11 +87,12 @@ static int __init early_fill_mp_bus_info struct range range[RANGE_NUM]; u64 val; u32 address; + int found; if (!early_pci_allowed()) return -1; - found_all_numa_early = 0; + found = 0; for (i = 0; i < ARRAY_SIZE(pci_probes); i++) { u32 id; u16 device; @@ -105,12 +106,12 @@ static int __init early_fill_mp_bus_info device = (id>>16) & 0xffff; if (pci_probes[i].vendor == vendor && pci_probes[i].device == device) { - found_all_numa_early = 1; + found = 1; break; } } - if (!found_all_numa_early) + if (!found) return 0; pci_root_num = 0; Index: linux-2.6/arch/x86/pci/bus_numa.c =================================================================== --- linux-2.6.orig/arch/x86/pci/bus_numa.c +++ linux-2.6/arch/x86/pci/bus_numa.c @@ -5,7 +5,6 @@ int pci_root_num; struct pci_root_info pci_root_info[PCI_ROOT_NR]; -int found_all_numa_early; void x86_pci_root_bus_res_quirks(struct pci_bus *b) { @@ -21,10 +20,6 @@ void x86_pci_root_bus_res_quirks(struct if (!pci_root_num) return; - /* for amd, if only one root bus, don't need to do anything */ - if (pci_root_num < 2 && found_all_numa_early) - return; - for (i = 0; i < pci_root_num; i++) { if (pci_root_info[i].bus_min == b->number) break; Index: linux-2.6/arch/x86/pci/bus_numa.h =================================================================== --- linux-2.6.orig/arch/x86/pci/bus_numa.h +++ linux-2.6/arch/x86/pci/bus_numa.h @@ -20,7 +20,6 @@ struct pci_root_info { #define PCI_ROOT_NR 4 extern int pci_root_num; extern struct pci_root_info pci_root_info[PCI_ROOT_NR]; -extern int found_all_numa_early; extern void update_res(struct pci_root_info *info, resource_size_t start, resource_size_t end, unsigned long flags, int merge);