From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: linux-arch@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
Jack Steiner <steiner@sgi.com>
Subject: [PATCH v2 08/18] ia64/PCI: SN: convert to pci_scan_root_bus() for correct root bus resources
Date: Thu, 09 Feb 2012 19:37:02 -0700 [thread overview]
Message-ID: <20120210023702.10311.31450.stgit@bhelgaas.mtv.corp.google.com> (raw)
In-Reply-To: <20120210023424.10311.82445.stgit@bhelgaas.mtv.corp.google.com>
Convert from pci_scan_bus() to pci_scan_root_bus(). Supply the root
bus resources from bussoft. When we move the resource adjustment from
pcibios_fixup_resources() to the PCI core, it will be important to have
the root bus resources correct from the beginning.
CC: Tony Luck <tony.luck@intel.com>
CC: Jack Steiner <steiner@sgi.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
arch/ia64/sn/kernel/io_init.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 0a36f08..c99c2ca 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -297,7 +297,8 @@ sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
s64 status = 0;
struct pci_controller *controller;
struct pcibus_bussoft *prom_bussoft_ptr;
-
+ LIST_HEAD(resources);
+ int i;
status = sal_get_pcibus_info((u64) segment, (u64) busnum,
(u64) ia64_tpa(&prom_bussoft_ptr));
@@ -315,7 +316,13 @@ sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
*/
controller->platform_data = prom_bussoft_ptr;
- bus = pci_scan_bus(busnum, &pci_root_ops, controller);
+ sn_legacy_pci_window_fixup(controller,
+ prom_bussoft_ptr->bs_legacy_io,
+ prom_bussoft_ptr->bs_legacy_mem);
+ for (i = 0; i < controller->windows; i++)
+ pci_add_resource(&resources, &controller->window[i].resource);
+ bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, controller,
+ &resources);
if (bus == NULL)
goto error_return; /* error, or bus already scanned */
@@ -348,9 +355,6 @@ sn_bus_fixup(struct pci_bus *bus)
return;
}
sn_common_bus_fixup(bus, prom_bussoft_ptr);
- sn_legacy_pci_window_fixup(PCI_CONTROLLER(bus),
- prom_bussoft_ptr->bs_legacy_io,
- prom_bussoft_ptr->bs_legacy_mem);
}
list_for_each_entry(pci_dev, &bus->devices, bus_list) {
sn_io_slot_fixup(pci_dev);
next prev parent reply other threads:[~2012-02-10 2:37 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 2:36 [PATCH v2 00/18] add PCI bus-to-resource offset support in core Bjorn Helgaas
2012-02-10 2:36 ` [PATCH v2 01/18] PCI: don't publish new root bus until it's fully initialized Bjorn Helgaas
2012-02-10 2:36 ` [PATCH v2 02/18] PCI: add struct pci_host_bridge and a list of all bridges found Bjorn Helgaas
2012-02-10 3:47 ` Yinghai Lu
2012-02-10 3:47 ` Yinghai Lu
2012-02-10 4:16 ` Bjorn Helgaas
2012-02-10 2:36 ` [PATCH v2 03/18] PCI: add struct pci_host_bridge_window with CPU/bus address offset Bjorn Helgaas
2012-02-10 2:36 ` Bjorn Helgaas
2012-02-10 3:49 ` Yinghai Lu
2012-02-10 4:37 ` Bjorn Helgaas
2012-02-10 2:36 ` [PATCH v2 04/18] PCI: convert bus addresses to resource when reading BARs Bjorn Helgaas
2012-02-10 2:36 ` [PATCH v2 05/18] PCI: add generic pcibios_resource_to_bus() Bjorn Helgaas
2012-02-10 2:36 ` [PATCH v2 06/18] alpha/PCI: get rid of device resource fixups Bjorn Helgaas
2012-02-10 2:36 ` [PATCH v2 07/18] arm/PCI: " Bjorn Helgaas
2012-02-10 2:36 ` Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas [this message]
2012-02-10 2:46 ` [PATCH v2 08/18] ia64/PCI: SN: convert to pci_scan_root_bus() for correct root bus resources Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 09/18] ia64/PCI: get rid of device resource fixups Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 10/18] microblaze/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 11/18] mips/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas
2012-02-10 2:43 ` Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 12/18] mn10300/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 13/18] parisc/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 14/18] powerpc/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 15/18] sh/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 16/18] sparc/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 17/18] xtensa/PCI: " Bjorn Helgaas
2012-02-10 2:37 ` [PATCH v2 18/18] PCI: collapse pcibios_resource_to_bus Bjorn Helgaas
2012-02-10 2:37 ` Bjorn Helgaas
2012-02-10 4:03 ` [PATCH v2 00/18] add PCI bus-to-resource offset support in core Yinghai Lu
2012-02-10 4:34 ` Bjorn Helgaas
2012-02-10 4:50 ` Yinghai Lu
2012-02-10 16:55 ` Bjorn Helgaas
2012-02-10 17:20 ` Yinghai Lu
2012-02-10 17:24 ` Bjorn Helgaas
2012-02-10 20:25 ` Yinghai Lu
2012-02-10 20:25 ` Yinghai Lu
2012-02-10 22:37 ` 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=20120210023702.10311.31450.stgit@bhelgaas.mtv.corp.google.com \
--to=bhelgaas@google.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=steiner@sgi.com \
--cc=tony.luck@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;
as well as URLs for NNTP newsgroup(s).