Re: Ignore disabled ROM resources at setup

From: Linus Torvalds
Date: Tue Aug 30 2005 - 00:05:55 EST




On Tue, 30 Aug 2005, Benjamin Herrenschmidt wrote:
>
> So what about fixing pci_map_rom() to call pcibios_resource_to_bus() and
> then write the resource back to the BAR ? I'm still a bit annoyed that
> we re-allocate the address while the original one was perfectly good
> (though not enabled) but the above would work.

I just sent you a patch to try.

Btw, as to the re-allocation of an existing address: most of the PCI layer
really does try to avoid re-allocating known good addresses. In fact, I
thought we did so for ROM resources too: at least pci_read_bases() does
read the ROM base, and saves it off into the resource structure.

We'll end up re-assigning that saved-off-address if there were resource
clashes, though. And bugs always happen, especially since that code
doesn't get much testing on x86 (there are almost never any interesting
rom resources for _any_ device, and apparently the video device which is
one of the few interesting ones always ends up using the shadow rom thing
on x86 for the primary card).

If you find the thing that causes us to re-assign the address, holler.

(See drivers/pci/probe.c: pci_read_bases() for the code that probes the
old address and saves it into the resource struct. It's called by
pci_setup_device() from the device scanning routines).

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/