From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933954AbZKXVTK (ORCPT ); Tue, 24 Nov 2009 16:19:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933487AbZKXVTJ (ORCPT ); Tue, 24 Nov 2009 16:19:09 -0500 Received: from outbound-mail-117.bluehost.com ([69.89.22.17]:57106 "HELO outbound-mail-117.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S933321AbZKXVTI (ORCPT ); Tue, 24 Nov 2009 16:19:08 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=dtmcBX3v+4T3qQHYNXcIFRmGAlrpOAzWD0cgUFMEvnE9eb5Tna3CJ4xVKipT6gTchxnk/d3xCKXFXuKTrygfO97lmMLOgiXgOslOHkvOstsgTaMjB9bYayWWVYr5yhUl; Date: Tue, 24 Nov 2009 13:19:12 -0800 From: Jesse Barnes To: Yinghai Lu Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yu Zhao , Matthew Wilcox Subject: Re: [PATCH] x86/pci: claim SR-IOV bar in pcibios_allocate_resource Message-ID: <20091124131912.2aabb852@jbarnes-piketon> In-Reply-To: <4AFFB1E6.9040300@kernel.org> References: <4AFFB1E6.9040300@kernel.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 75.111.28.251 authed with jbarnes@virtuousgeek.org} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 14 Nov 2009 23:46:46 -0800 Yinghai Lu wrote: > > so use correct allocation from BIOS, instead of later assign another > one. > > Signed-off-by: Yinghai Lu > > --- > arch/x86/pci/i386.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > 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 > @@ -155,7 +155,9 @@ static void __init pcibios_allocate_reso > > for_each_pci_dev(dev) { > pci_read_config_word(dev, PCI_COMMAND, &command); > - for (idx = 0; idx < PCI_ROM_RESOURCE; idx++) { > + for (idx = 0; idx < PCI_BRIDGE_RESOURCES; idx++) { > + if (idx == PCI_ROM_RESOURCE) > + continue; > r = &dev->resource[idx]; > if (r->parent) /* Already > allocated */ continue; I'm worried this might have side effects beyond just allocating SR-IOV BARs, since it looks like we'll walk through all the bridge resources all the time? -- Jesse Barnes, Intel Open Source Technology Center