From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>, Bodo Eggert <7eggert@gmx.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] x86/PCI: Don't try to move IORESOURCE_PCI_FIXED resources
Date: Fri, 25 Apr 2014 11:16:31 -0600 [thread overview]
Message-ID: <20140425171631.312.6079.stgit@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20140425171144.312.9601.stgit@bhelgaas-glaptop.roam.corp.google.com>
Don't attempt to move resource marked IORESOURCE_PCI_FIXED, even if
pci_claim_resource() fails. In some cases, these are legacy resources that
cannot be moved.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
arch/x86/pci/i386.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index db6b1ab43255..6db58d68feb5 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -271,11 +271,16 @@ static void pcibios_allocate_dev_resources(struct pci_dev *dev, int pass)
"BAR %d: reserving %pr (d=%d, p=%d)\n",
idx, r, disabled, pass);
if (pci_claim_resource(dev, idx) < 0) {
- /* We'll assign a new address later */
- pcibios_save_fw_addr(dev,
- idx, r->start);
- r->end -= r->start;
- r->start = 0;
+ if (r->flags & IORESOURCE_PCI_FIXED) {
+ dev_info(&dev->dev, "BAR %d %pR is immovable\n",
+ idx, r);
+ } else {
+ /* We'll assign a new address later */
+ pcibios_save_fw_addr(dev,
+ idx, r->start);
+ r->end -= r->start;
+ r->start = 0;
+ }
}
}
}
next prev parent reply other threads:[~2014-04-25 17:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 17:16 [PATCH 0/4] x86/PCI HPET bugfix and other cleanups Bjorn Helgaas
2014-04-25 17:16 ` Bjorn Helgaas [this message]
2014-04-25 17:16 ` [PATCH 2/4] x86/PCI: Mark HPET BAR as IORESOURCE_PCI_FIXED Bjorn Helgaas
2014-04-25 17:16 ` [PATCH 3/4] x86/PCI: Move pcibios_assign_resources() annotation to definition Bjorn Helgaas
2014-04-25 17:16 ` [PATCH 4/4] x86/gart: Tidy messages and add bridge device info Bjorn Helgaas
2014-04-26 6:01 ` Ingo Molnar
2014-04-28 23:22 ` Bjorn Helgaas
2014-05-07 18:00 ` Ingo Molnar
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=20140425171631.312.6079.stgit@bhelgaas-glaptop.roam.corp.google.com \
--to=bhelgaas@google.com \
--cc=7eggert@gmx.de \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®