From patchwork Thu Jun 3 20:43:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai X-Patchwork-Id: 104168 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o53Kid8Y002623 for ; Thu, 3 Jun 2010 20:44:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755329Ab0FCUoj (ORCPT ); Thu, 3 Jun 2010 16:44:39 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:44368 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753072Ab0FCUoi (ORCPT ); Thu, 3 Jun 2010 16:44:38 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o53KiVg3013533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Jun 2010 20:44:34 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o53CBPRJ032745; Thu, 3 Jun 2010 20:44:29 GMT Received: from abhmt019.oracle.com by acsmt353.oracle.com with ESMTP id 295042591275597843; Thu, 03 Jun 2010 13:44:03 -0700 Received: from [10.6.76.26] (/10.6.76.26) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 03 Jun 2010 13:44:03 -0700 Message-ID: <4C0813D7.7080900@oracle.com> Date: Thu, 03 Jun 2010 13:43:03 -0700 From: Yinghai Lu User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Jesse Barnes CC: Bjorn Helgaas , Yannick Roehlly , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH -v2] pci: clear bridge resource size if BIOS assign bad one References: <201005191637.13177.bjorn.helgaas@hp.com> <201005202236.20444.bjorn.helgaas@hp.com> <201006021536.43333.bjorn.helgaas@hp.com> <4C070ECA.2020309@oracle.com> In-Reply-To: <4C070ECA.2020309@oracle.com> X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090205.4C081432.01C8:SCFMA922111,ss=1,fgs=0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 03 Jun 2010 20:44:40 +0000 (UTC) Index: linux-2.6/arch/x86/pci/i386.c =================================================================== --- linux-2.6.orig/arch/x86/pci/i386.c +++ linux-2.6/arch/x86/pci/i386.c @@ -136,6 +136,7 @@ static void __init pcibios_allocate_bus_ * child resource allocations in this * range. */ + r->start = r->end = 0; r->flags = 0; } } Index: linux-2.6/arch/microblaze/pci/pci-common.c =================================================================== --- linux-2.6.orig/arch/microblaze/pci/pci-common.c +++ linux-2.6/arch/microblaze/pci/pci-common.c @@ -1277,6 +1277,7 @@ void pcibios_allocate_bus_resources(stru printk(KERN_WARNING "PCI: Cannot allocate resource region " "%d of PCI bridge %d, will remap\n", i, bus->number); clear_resource: + res->start = res->end = 0; res->flags = 0; } Index: linux-2.6/arch/mn10300/unit-asb2305/pci-asb2305.c =================================================================== --- linux-2.6.orig/arch/mn10300/unit-asb2305/pci-asb2305.c +++ linux-2.6/arch/mn10300/unit-asb2305/pci-asb2305.c @@ -117,6 +117,7 @@ static void __init pcibios_allocate_bus_ * Invalidate the resource to prevent * child resource allocations in this * range. */ + r->start = r->end = 0; r->flags = 0; } } Index: linux-2.6/arch/powerpc/kernel/pci-common.c =================================================================== --- linux-2.6.orig/arch/powerpc/kernel/pci-common.c +++ linux-2.6/arch/powerpc/kernel/pci-common.c @@ -1309,6 +1309,7 @@ void pcibios_allocate_bus_resources(stru printk(KERN_WARNING "PCI: Cannot allocate resource region " "%d of PCI bridge %d, will remap\n", i, bus->number); clear_resource: + res->start = res->end = 0; res->flags = 0; }