diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-23 14:33:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-23 15:57:21 -0400 |
commit | 76fbc263ff7e42ce8b21b8aee176e3c74b45f81a (patch) | |
tree | 7866077c7b014be1bd9f69110d04432b6b6cf868 /drivers/pci/setup-bus.c | |
parent | 9bf8a1a79d549a0cf3b26c88d1ac8cdf07deafee (diff) |
pci: debug extra pci bus resources
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8ddb918f5f57..c74a2bce083d 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -537,6 +537,36 @@ void __ref pci_bus_assign_resources(struct pci_bus *bus) | |||
537 | } | 537 | } |
538 | EXPORT_SYMBOL(pci_bus_assign_resources); | 538 | EXPORT_SYMBOL(pci_bus_assign_resources); |
539 | 539 | ||
540 | static void pci_bus_dump_res(struct pci_bus *bus) | ||
541 | { | ||
542 | int i; | ||
543 | |||
544 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | ||
545 | struct resource *res = bus->resource[i]; | ||
546 | if (!res) | ||
547 | continue; | ||
548 | |||
549 | printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end); | ||
550 | } | ||
551 | } | ||
552 | |||
553 | static void pci_bus_dump_resources(struct pci_bus *bus) | ||
554 | { | ||
555 | struct pci_bus *b; | ||
556 | struct pci_dev *dev; | ||
557 | |||
558 | |||
559 | pci_bus_dump_res(bus); | ||
560 | |||
561 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
562 | b = dev->subordinate; | ||
563 | if (!b) | ||
564 | continue; | ||
565 | |||
566 | pci_bus_dump_resources(b); | ||
567 | } | ||
568 | } | ||
569 | |||
540 | void __init | 570 | void __init |
541 | pci_assign_unassigned_resources(void) | 571 | pci_assign_unassigned_resources(void) |
542 | { | 572 | { |
@@ -552,4 +582,9 @@ pci_assign_unassigned_resources(void) | |||
552 | pci_bus_assign_resources(bus); | 582 | pci_bus_assign_resources(bus); |
553 | pci_enable_bridges(bus); | 583 | pci_enable_bridges(bus); |
554 | } | 584 | } |
585 | |||
586 | /* dump the resource on buses */ | ||
587 | list_for_each_entry(bus, &pci_root_buses, node) { | ||
588 | pci_bus_dump_resources(bus); | ||
589 | } | ||
555 | } | 590 | } |