public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Oops while assigning PCI resources
@ 2000-12-07 19:22 Russell King
  2000-12-07 22:50 ` Russell King
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2000-12-07 19:22 UTC (permalink / raw)
  To: linux-kernel

Hi,

Kernel is 2.4.0-test12-pre7

I'm seeing an oops while assigning PCI resources on an ARM board.  This
board as a PCI to PCI bridge on board without any devices on the second
bus.

Trace is:

Trace; c0013ac0 <pbus_assign_resources+0/e4>
Trace; c0013ba4 <pci_assign_unassigned_resources+0/98>
Trace; c0009f34 <pcibios_init+0/68>
Trace; c0012db4 <pci_init+0/44>
Trace; c00089ec <do_basic_setup+0/54>

The place which is causing the oops is in drivers/pci/setup-bus.c:

        for (ln=bus->children.next; ln != &bus->children; ln=ln->next) {
                struct pci_bus *b = pci_bus_b(ln);

                vvvvvvvvvvvvvvvvvvvvv
                b->resource[0]->start = ranges->io_start = ranges->io_end;
                ^^^^^^^^^^^^^^^^^^^^^
                b->resource[1]->start = ranges->mem_start = ranges->mem_end;

                pbus_assign_resources(b, ranges);

The reason is because b->resource is NULL.  Looking at drivers/pci/pci.c,
when we hit a non-cardbus bridge, we never set b->resource[*] to point to
anything.  We call "pci_add_new_bus" from pci_scan_bridge, but neither
pci_add_new_bus nor pci_scan_bridge sets up the resources.

Unfortunately, the PCI bus code (in drivers/pci/setup-bus.c) seems to
assume that someone somewhere has allocated these resources.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |         Russell King        rmk@arm.linux.org.uk      --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Oops while assigning PCI resources
  2000-12-07 19:22 Oops while assigning PCI resources Russell King
@ 2000-12-07 22:50 ` Russell King
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2000-12-07 22:50 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

Russell King writes:
> I'm seeing an oops while assigning PCI resources on an ARM board.  This
> board as a PCI to PCI bridge on board without any devices on the second
> bus.

I've solved this one, sorry for the noise.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |         Russell King        rmk@arm.linux.org.uk      --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-12-07 23:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-07 19:22 Oops while assigning PCI resources Russell King
2000-12-07 22:50 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox