public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Yu Zhao <yu.zhao@intel.com>,
	Matthew Wilcox <willy@linux.intel.com>
Subject: [PATCH] x86/pci: claim SR-IOV bar in pcibios_allocate_resource
Date: Sat, 14 Nov 2009 23:46:46 -0800	[thread overview]
Message-ID: <4AFFB1E6.9040300@kernel.org> (raw)


so use correct allocation from BIOS, instead of later assign another one.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 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;

             reply	other threads:[~2009-11-15  7:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-15  7:46 Yinghai Lu [this message]
2009-11-24 21:19 ` [PATCH] x86/pci: claim SR-IOV bar in pcibios_allocate_resource Jesse Barnes
2009-11-24 21:21   ` Yinghai Lu
2009-11-24 21:40     ` Jesse Barnes
2009-11-25  2:05       ` [PATCH] x86/pci: claim SR-IOV bar in pcibios_allocate_resource -v2 Yinghai Lu
2009-12-05  0:00         ` Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AFFB1E6.9040300@kernel.org \
    --to=yinghai@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=willy@linux.intel.com \
    --cc=yu.zhao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox