From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: linux-arch@vger.kernel.org, Chris Zankel <chris@zankel.net>
Subject: [RFC PATCH v1 17/18] xtensa/PCI: get rid of device resource fixups
Date: Mon, 30 Jan 2012 09:58:36 -0700 [thread overview]
Message-ID: <20120130165836.3231.1159.stgit@bhelgaas.mtv.corp.google.com> (raw)
In-Reply-To: <20120130165430.3231.97740.stgit@bhelgaas.mtv.corp.google.com>
Tell the PCI core about host bridge address translation so it can take
care of bus-to-resource conversion for us.
CC: Chris Zankel <chris@zankel.net>
---
arch/xtensa/kernel/pci.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index 61045c1..eb30e35 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -153,7 +153,7 @@ static void __init pci_controller_apertures(struct pci_controller *pci_ctrl,
}
res->start += io_offset;
res->end += io_offset;
- pci_add_resource(resources, res);
+ pci_add_resource_offset(resources, res, io_offset);
for (i = 0; i < 3; i++) {
res = &pci_ctrl->mem_resources[i];
@@ -200,24 +200,9 @@ subsys_initcall(pcibios_init);
void __init pcibios_fixup_bus(struct pci_bus *bus)
{
- struct pci_controller *pci_ctrl = bus->sysdata;
- struct resource *res;
- unsigned long io_offset;
- int i;
-
- io_offset = (unsigned long)pci_ctrl->io_space.base;
if (bus->parent) {
/* This is a subordinate bridge */
pci_read_bridge_bases(bus);
-
- for (i = 0; i < 4; i++) {
- if ((res = bus->resource[i]) == NULL || !res->flags)
- continue;
- if (io_offset && (res->flags & IORESOURCE_IO)) {
- res->start += io_offset;
- res->end += io_offset;
- }
- }
}
}
next prev parent reply other threads:[~2012-01-30 16:58 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 16:57 [RFC PATCH v1 00/18] add PCI bus-to-resource offset support in core Bjorn Helgaas
2012-01-30 16:57 ` Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 01/18] PCI: don't publish new root bus until it's fully initialized Bjorn Helgaas
2012-01-30 16:57 ` Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 02/18] PCI: add struct pci_host_bridge and a list of all bridges found Bjorn Helgaas
2012-01-30 16:57 ` Bjorn Helgaas
2012-01-30 20:52 ` Yinghai Lu
2012-01-30 20:52 ` Yinghai Lu
2012-01-30 22:00 ` Bjorn Helgaas
2012-01-30 22:00 ` Bjorn Helgaas
2012-01-30 22:29 ` Yinghai Lu
2012-01-30 22:29 ` Yinghai Lu
2012-01-30 16:57 ` [RFC PATCH v1 03/18] PCI: add struct pci_host_bridge_window with CPU/bus address offset Bjorn Helgaas
2012-01-30 16:57 ` Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 04/18] PCI: convert bus addresses to resource when reading BARs Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 05/18] PCI: add generic pcibios_resource_to_bus() Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 06/18] alpha/PCI: get rid of device resource fixups Bjorn Helgaas
2012-01-30 16:57 ` Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 07/18] arm/PCI: " Bjorn Helgaas
2012-01-30 16:57 ` Bjorn Helgaas
2012-02-03 16:01 ` Russell King - ARM Linux
2012-02-03 16:01 ` Russell King - ARM Linux
2012-02-03 16:12 ` Bjorn Helgaas
2012-02-03 16:55 ` Russell King - ARM Linux
2012-02-03 16:55 ` Russell King - ARM Linux
2012-02-03 17:51 ` Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 08/18] ia64/PCI: SN: convert to pci_scan_root_bus() for correct root bus resources Bjorn Helgaas
2012-01-30 16:57 ` [RFC PATCH v1 09/18] ia64/PCI: get rid of device resource fixups Bjorn Helgaas
2012-01-30 16:57 ` Bjorn Helgaas
2012-01-30 16:58 ` [RFC PATCH v1 10/18] microblaze/PCI: " Bjorn Helgaas
2012-01-30 16:58 ` Bjorn Helgaas
2012-02-02 10:50 ` Michal Simek
2012-02-02 10:50 ` Michal Simek
2012-02-03 11:46 ` Benjamin Herrenschmidt
2012-02-03 11:46 ` Benjamin Herrenschmidt
2012-01-30 16:58 ` [RFC PATCH v1 11/18] mips/PCI: " Bjorn Helgaas
2012-01-30 16:58 ` Bjorn Helgaas
2012-01-31 2:42 ` Yoichi Yuasa
2012-01-31 2:42 ` Yoichi Yuasa
2012-01-31 3:54 ` Bjorn Helgaas
2012-01-31 3:54 ` Bjorn Helgaas
2012-02-08 2:56 ` Bjorn Helgaas
2012-02-08 2:56 ` Bjorn Helgaas
[not found] ` <20120208132234.710f19be.yuasa@linux-mips.org>
2012-02-08 21:16 ` Bjorn Helgaas
2012-01-30 16:58 ` [RFC PATCH v1 12/18] mn10300/PCI: " Bjorn Helgaas
2012-01-30 16:58 ` Bjorn Helgaas
2012-01-30 16:58 ` [RFC PATCH v1 13/18] parisc/PCI: " Bjorn Helgaas
2012-01-30 16:58 ` Bjorn Helgaas
2012-01-30 16:58 ` [RFC PATCH v1 14/18] powerpc/PCI: " Bjorn Helgaas
2012-01-30 20:49 ` Benjamin Herrenschmidt
2012-01-30 21:46 ` Bjorn Helgaas
2012-01-30 21:46 ` Bjorn Helgaas
2012-01-30 16:58 ` [RFC PATCH v1 15/18] sh/PCI: " Bjorn Helgaas
2012-01-30 16:58 ` [RFC PATCH v1 16/18] sparc/PCI: " Bjorn Helgaas
2012-01-30 16:58 ` Bjorn Helgaas [this message]
2012-01-30 16:58 ` [RFC PATCH v1 17/18] xtensa/PCI: " Bjorn Helgaas
2012-01-30 16:58 ` [RFC PATCH v1 18/18] PCI: collapse pcibios_resource_to_bus Bjorn Helgaas
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=20120130165836.3231.1159.stgit@bhelgaas.mtv.corp.google.com \
--to=bhelgaas@google.com \
--cc=chris@zankel.net \
--cc=linux-arch@vger.kernel.org \
--cc=linux-pci@vger.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