Commit 57283776 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Len Brown

ACPI: pci_root: pass acpi_pci_root to arch-specific scan

The acpi_pci_root structure contains all the individual items (acpi_device,
domain, bus number) we pass to pci_acpi_scan_root(), so just pass the
single acpi_pci_root pointer directly.

This will make it easier to add _CBA support later.  For _CBA, we need the
entire downstream bus range, not just the base bus number.  We have that in
the acpi_pci_root structure, so passing the pointer makes it available to
the arch-specific code.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Reviewed-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 6ad95513
...@@ -335,8 +335,11 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl) ...@@ -335,8 +335,11 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
} }
struct pci_bus * __devinit struct pci_bus * __devinit
pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) pci_acpi_scan_root(struct acpi_pci_root *root)
{ {
struct acpi_device *device = root->device;
int domain = root->segment;
int bus = root->secondary.start;
struct pci_controller *controller; struct pci_controller *controller;
unsigned int windows = 0; unsigned int windows = 0;
struct pci_bus *pbus; struct pci_bus *pbus;
......
...@@ -229,8 +229,11 @@ get_current_resources(struct acpi_device *device, int busnum, ...@@ -229,8 +229,11 @@ get_current_resources(struct acpi_device *device, int busnum,
return; return;
} }
struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int domain, int busnum) struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root)
{ {
struct acpi_device *device = root->device;
int domain = root->segment;
int busnum = root->secondary.start;
struct pci_bus *bus; struct pci_bus *bus;
struct pci_sysdata *sd; struct pci_sysdata *sd;
int node; int node;
......
...@@ -498,7 +498,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) ...@@ -498,7 +498,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
* PCI namespace does not get created until this call is made (and * PCI namespace does not get created until this call is made (and
* thus the root bridge's pci_dev does not exist). * thus the root bridge's pci_dev does not exist).
*/ */
root->bus = pci_acpi_scan_root(device, segment, root->secondary.start); root->bus = pci_acpi_scan_root(root);
if (!root->bus) { if (!root->bus) {
printk(KERN_ERR PREFIX printk(KERN_ERR PREFIX
"Bus %04x:%02x not present in PCI namespace\n", "Bus %04x:%02x not present in PCI namespace\n",
......
...@@ -104,8 +104,7 @@ int acpi_pci_bind_root(struct acpi_device *device); ...@@ -104,8 +104,7 @@ int acpi_pci_bind_root(struct acpi_device *device);
/* Arch-defined function to add a bus to the system */ /* Arch-defined function to add a bus to the system */
struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root);
int bus);
void pci_acpi_crs_quirks(void); void pci_acpi_crs_quirks(void);
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment