Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316487
b: refs/heads/master
c: 1693c42
h: refs/heads/master
i:
  316485: f4c6cad
  316483: 594681f
  316479: b7a6977
v: v3
  • Loading branch information
Bjorn Helgaas committed Jun 22, 2012
1 parent 1b6b767 commit 1b2ec69
Show file tree
Hide file tree
Showing 61 changed files with 841 additions and 426 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0233ed4b3f74cf4c129d73c27af8ee057ced1ca
refs/heads/master: 1693c4276d768464058f191998e035e09ceb9e65
11 changes: 4 additions & 7 deletions trunk/arch/alpha/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@ struct pci_controller *pci_isa_hose;
* Quirks.
*/

static void __init
quirk_isa_bridge(struct pci_dev *dev)
static void __devinit quirk_isa_bridge(struct pci_dev *dev)
{
dev->class = PCI_CLASS_BRIDGE_ISA << 8;
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge);

static void __init
quirk_cypress(struct pci_dev *dev)
static void __devinit quirk_cypress(struct pci_dev *dev)
{
/* The Notorious Cy82C693 chip. */

Expand Down Expand Up @@ -106,8 +104,7 @@ quirk_cypress(struct pci_dev *dev)
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress);

/* Called for each device after PCI setup is done. */
static void __init
pcibios_fixup_final(struct pci_dev *dev)
static void __devinit pcibios_fixup_final(struct pci_dev *dev)
{
unsigned int class = dev->class >> 8;

Expand Down Expand Up @@ -359,7 +356,7 @@ common_init_pci(void)
hose, &resources);
hose->bus = bus;
hose->need_domain_info = need_domain_info;
next_busno = bus->subordinate + 1;
next_busno = bus->busn_res.end + 1;
/* Don't allow 8-bit bus number overflow inside the hose -
reserve some space for bridges. */
if (next_busno > 224) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/kernel/bios32.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693);

static void __init pci_fixup_it8152(struct pci_dev *dev)
static void __devinit pci_fixup_it8152(struct pci_dev *dev)
{
int i;
/* fixup for ITE 8152 devices */
Expand Down Expand Up @@ -461,7 +461,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head)
if (!sys->bus)
panic("PCI: unable to scan bus!");

busnr = sys->bus->subordinate + 1;
busnr = sys->bus->busn_res.end + 1;

list_add(&sys->node, head);
} else {
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/frv/mb93090-mb00/pci-vdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static void __init pci_fixup_umc_ide(struct pci_dev *d)
d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
}

static void __init pci_fixup_ide_bases(struct pci_dev *d)
static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
{
int i;

Expand All @@ -287,7 +287,7 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d)
}
}

static void __init pci_fixup_ide_trash(struct pci_dev *d)
static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
{
int i;

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/ia64/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
#endif

INIT_LIST_HEAD(&info.resources);
/* insert busn resource at first */
pci_add_resource(&info.resources, &root->secondary);
acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
&windows);
if (windows) {
Expand Down Expand Up @@ -384,7 +386,7 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
return NULL;
}

pbus->subordinate = pci_scan_child_bus(pbus);
pci_scan_child_bus(pbus);
return pbus;

out3:
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/microblaze/pci/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,10 +1506,10 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose)
pci_free_resource_list(&resources);
return;
}
bus->secondary = hose->first_busno;
bus->busn_res.start = hose->first_busno;
hose->bus = bus;

hose->last_busno = bus->subordinate;
hose->last_busno = bus->busn_res.end;
}

static int __init pcibios_init(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose)
need_domain_info = need_domain_info || hose->index;
hose->need_domain_info = need_domain_info;
if (bus) {
next_busno = bus->subordinate + 1;
next_busno = bus->busn_res.end + 1;
/* Don't allow 8-bit bus number overflow inside the hose -
reserve some space for bridges. */
if (next_busno > 224) {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/include/asm/pci-bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct pci_controller {
int first_busno;
int last_busno;
int self_busno;
struct resource busn;

void __iomem *io_base_virt;
#ifdef CONFIG_PPC64
Expand Down
17 changes: 11 additions & 6 deletions trunk/arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,11 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
/* Wire up PHB bus resources */
pcibios_setup_phb_resources(hose, &resources);

hose->busn.start = hose->first_busno;
hose->busn.end = hose->last_busno;
hose->busn.flags = IORESOURCE_BUS;
pci_add_resource(&resources, &hose->busn);

/* Create an empty bus for the toplevel */
bus = pci_create_root_bus(hose->parent, hose->first_busno,
hose->ops, hose, &resources);
Expand All @@ -1646,21 +1651,21 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose)
pci_free_resource_list(&resources);
return;
}
bus->secondary = hose->first_busno;
hose->bus = bus;

/* Get probe mode and perform scan */
mode = PCI_PROBE_NORMAL;
if (node && ppc_md.pci_probe_mode)
mode = ppc_md.pci_probe_mode(bus);
pr_debug(" probe mode: %d\n", mode);
if (mode == PCI_PROBE_DEVTREE) {
bus->subordinate = hose->last_busno;
if (mode == PCI_PROBE_DEVTREE)
of_scan_bus(node, bus);
}

if (mode == PCI_PROBE_NORMAL)
hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
if (mode == PCI_PROBE_NORMAL) {
pci_bus_update_busn_res_end(bus, 255);
hose->last_busno = pci_scan_child_bus(bus);
pci_bus_update_busn_res_end(bus, hose->last_busno);
}

/* Platform gets a chance to do some global fixups before
* we proceed to resource allocation
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/pci_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,

for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
bus = pci_bus_b(ln);
if (in_bus >= bus->number && in_bus <= bus->subordinate)
if (in_bus >= bus->number && in_bus <= bus->busn_res.end)
break;
bus = NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/pci_of_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev)
}

bus->primary = dev->bus->number;
bus->subordinate = busrange[1];
pci_bus_insert_busn_res(bus, busrange[0], busrange[1]);
bus->bridge_ctl = 0;

/* parse ranges property */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/85xx/tqm85xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m)
seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
}

static void __init tqm85xx_ti1520_fixup(struct pci_dev *pdev)
static void __devinit tqm85xx_ti1520_fixup(struct pci_dev *pdev)
{
unsigned int val;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/86xx/gef_ppc9a.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static void gef_ppc9a_show_cpuinfo(struct seq_file *m)
gef_ppc9a_get_vme_is_syscon() ? "yes" : "no");
}

static void __init gef_ppc9a_nec_fixup(struct pci_dev *pdev)
static void __devinit gef_ppc9a_nec_fixup(struct pci_dev *pdev)
{
unsigned int val;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/86xx/gef_sbc310.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static void gef_sbc310_show_cpuinfo(struct seq_file *m)

}

static void __init gef_sbc310_nec_fixup(struct pci_dev *pdev)
static void __devinit gef_sbc310_nec_fixup(struct pci_dev *pdev)
{
unsigned int val;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/86xx/gef_sbc610.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m)
seq_printf(m, "SVR\t\t: 0x%x\n", svid);
}

static void __init gef_sbc610_nec_fixup(struct pci_dev *pdev)
static void __devinit gef_sbc610_nec_fixup(struct pci_dev *pdev)
{
unsigned int val;

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/platforms/powernv/pci-ioda.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb,
dcomp = OPAL_IGNORE_RID_DEVICE_NUMBER;
fcomp = OPAL_IGNORE_RID_FUNCTION_NUMBER;
parent = pe->pbus->self;
count = pe->pbus->subordinate - pe->pbus->secondary + 1;
count = pe->pbus->busn_res.end - pe->pbus->busn_res.start + 1;
switch(count) {
case 1: bcomp = OpalPciBusAll; break;
case 2: bcomp = OpalPciBus7Bits; break;
Expand Down Expand Up @@ -816,11 +816,11 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_dev *dev,
pe->pdev = NULL;
pe->tce32_seg = -1;
pe->mve_number = -1;
pe->rid = bus->secondary << 8;
pe->rid = bus->busn_res.start << 8;
pe->dma_weight = 0;

pe_info(pe, "Secondary busses %d..%d associated with PE\n",
bus->secondary, bus->subordinate);
pe_info(pe, "Secondary busses %pR associated with PE\n",
&bus->busn_res);

if (pnv_ioda_configure_pe(phb, pe)) {
/* XXX What do we do here ? */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/pseries/pci_dlpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
if (!num)
return;
pcibios_setup_bus_devices(bus);
max = bus->secondary;
max = bus->busn_res.start;
for (pass=0; pass < 2; pass++)
list_for_each_entry(dev, &bus->devices, bus_list) {
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/fsl_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

static int fsl_pcie_bus_fixup, is_mpc83xx_pci;

static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
static void __devinit quirk_fsl_pcie_header(struct pci_dev *dev)
{
u8 progif;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/mv64x60_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ subsys_initcall(mv64x60_sysfs_init);

#endif /* CONFIG_SYSFS */

static void __init mv64x60_pci_fixup_early(struct pci_dev *dev)
static void __devinit mv64x60_pci_fixup_early(struct pci_dev *dev)
{
/*
* Set the host bridge hdr_type to an invalid value so that
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/drivers/pci/fixups-dreamcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <asm/irq.h>
#include <mach/pci.h>

static void __init gapspci_fixup_resources(struct pci_dev *dev)
static void __devinit gapspci_fixup_resources(struct pci_dev *dev)
{
struct pci_channel *p = dev->sysdata;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void __devinit pcibios_scanbus(struct pci_channel *hose)
need_domain_info = need_domain_info || hose->index;
hose->need_domain_info = need_domain_info;
if (bus) {
next_busno = bus->subordinate + 1;
next_busno = bus->busn_res.end + 1;
/* Don't allow 8-bit bus number overflow inside the hose -
reserve some space for bridges. */
if (next_busno > 224) {
Expand Down
8 changes: 5 additions & 3 deletions trunk/arch/sparc/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm,
}

bus->primary = dev->bus->number;
bus->subordinate = busrange[1];
pci_bus_insert_busn_res(bus, busrange[0], busrange[1]);
bus->bridge_ctl = 0;

/* parse ranges property, or cook one up by hand for Simba */
Expand Down Expand Up @@ -685,6 +685,10 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
pbm->io_space.start);
pci_add_resource_offset(&resources, &pbm->mem_space,
pbm->mem_space.start);
pbm->busn.start = pbm->pci_first_busno;
pbm->busn.end = pbm->pci_last_busno;
pbm->busn.flags = IORESOURCE_BUS;
pci_add_resource(&resources, &pbm->busn);
bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops,
pbm, &resources);
if (!bus) {
Expand All @@ -693,8 +697,6 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
pci_free_resource_list(&resources);
return NULL;
}
bus->secondary = pbm->pci_first_busno;
bus->subordinate = pbm->pci_last_busno;

pci_of_scan_bus(pbm, node, bus);
pci_bus_add_devices(bus);
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/sparc/kernel/pci_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ struct pci_pbm_info {
/* PBM I/O and Memory space resources. */
struct resource io_space;
struct resource mem_space;
struct resource busn;

/* Base of PCI Config space, can be per-PBM or shared. */
unsigned long config_space;
Expand Down
9 changes: 6 additions & 3 deletions trunk/arch/tile/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ int __init pcibios_init(void)
if (pci_scan_flags[i] == 0 && controllers[i].ops != NULL) {
struct pci_controller *controller = &controllers[i];
struct pci_bus *bus;
LIST_HEAD(resources);

if (tile_init_irqs(i, controller)) {
pr_err("PCI: Could not initialize IRQs\n");
Expand All @@ -327,9 +328,11 @@ int __init pcibios_init(void)
* This is inlined in linux/pci.h and calls into
* pci_scan_bus_parented() in probe.c.
*/
bus = pci_scan_bus(0, controller->ops, controller);
pci_add_resource(&resources, &ioport_resource);
pci_add_resource(&resources, &iomem_resource);
bus = pci_scan_root_bus(NULL, 0, controller->ops, controller, &resources);
controller->root_bus = bus;
controller->last_busno = bus->subordinate;
controller->last_busno = bus->busn_res.end;
}
}

Expand Down Expand Up @@ -366,7 +369,7 @@ int __init pcibios_init(void)
*/
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI &&
(PCI_SLOT(dev->devfn) == 0)) {
next_bus = dev->subordinate;
next_bus = dev->busn_res.end;
controllers[i].mem_resources[0] =
*next_bus->resource[0];
controllers[i].mem_resources[1] =
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,

#if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
/* Set correct numa_node information for AMD NB functions */
static void __init quirk_amd_nb_node(struct pci_dev *dev)
static void __devinit quirk_amd_nb_node(struct pci_dev *dev)
{
struct pci_dev *nb_ht;
unsigned int devfn;
Expand Down
Loading

0 comments on commit 1b2ec69

Please sign in to comment.