From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:32809 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382Ab1LHQWO (ORCPT ); Thu, 8 Dec 2011 11:22:14 -0500 Message-ID: <4EE0E42E.9000200@redhat.com> Date: Thu, 08 Dec 2011 11:22:06 -0500 From: Don Dutile MIME-Version: 1.0 To: Ram Pai CC: Yinghai Lu , Jesse Barnes , linux-pci@vger.kernel.org, Benjamin Herrenschmidt , Bjorn Helgaas , Nishanth Aravamudan , prarit@redhat.com, brking@linux.vnet.ibm.com Subject: Re: [RFC PATCH 1/1]PCI: defer enablement of SRIOV BARS References: <20111008075353.GK2980@ram-ThinkPad-T61> <1318060793.29415.347.camel@pasglop> <20111102140325.004b9dad@jbarnes-desktop> <20111103013014.GB393@ram-ThinkPad-T61> <20111106023310.GA2383@ram-ThinkPad-T61> <20111205103202.29faf6e1@jbarnes-desktop> <20111207092531.GF19129@ram-ThinkPad-T61> <4EDFCB4A.60106@redhat.com> <20111208025039.GH19129@ram-ThinkPad-T61> In-Reply-To: <20111208025039.GH19129@ram-ThinkPad-T61> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-pci-owner@vger.kernel.org List-ID: On 12/07/2011 09:50 PM, Ram Pai wrote: > On Wed, Dec 07, 2011 at 03:11:56PM -0800, Yinghai Lu wrote: >> On Wed, Dec 7, 2011 at 12:23 PM, Don Dutile wrote: >>> why not something more explicit like: >>> >>> for (i = 0; i< DEVICE_COUNT_RESOURCE; i++) { >>> if ((i>= PCI_IOV_RESOURCES)&& (i<= PCI_IOV_RESOURCE_END)) >>> continue; /* skip sriov related resources */ >>> >>> if (dev->resource[i].flags& flags) >>> bars |= (1<< i); >>> } > > I like this approach too. Offcourse the SRIOV skipping has to be one under #ifdef CONFIG_PCI_IOV. > +1. Sorry, I forgot that the kernel can be built w/o SRIOV support. > Yinghai/Jesse, do you want to make a patch on top of the current jesse's to-linus > tree or want to revert my patch and apply your fix? If it is the former, do you want me > to make the patch? > > RP > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html