Re: More linker magic..

David Hinds (dhinds@zen.stanford.edu)
Fri, 6 Aug 1999 11:41:23 -0700


On Wed, Aug 04, 1999 at 05:03:59PM -0700, Linus Torvalds wrote:
>
> pre-patch-2.3.13-5 does the proper resource allocation for all PCI cards;
> instead of having the drivers do the resource building, the PCI layer
> builds up the resource information automatically, and at least for the set
> of drivers I was concerned about on my machine there wasn't even any need
> to adjust the old compatibility stuff, but that will almost certainly be
> needed for other sets of drivers (ie extending the resource flags with a
> "BUSY" bit to mark resources as being exclusively used by some driver).

It's mostly as I expected...

A couple questions / things to think about...

- I see that you've done away with the old /proc/pci, but have saved
all the PCI vendor/device ID's, and use them to build device names
that are now used in the resource tables. Is this really a good
idea? Besides the fact that the string lists haven't been kept up
to date (the kernel list is less than half of Martin's user-space
list), do we really want this in the kernel? I know you have them
as initdata, but it is still kernel image bloat, and there's also
the minor issue that any hot swap PCI device can't be named the same
because the strings will be gone.

I'd suggest just naming all PCI devices as "pci <bus>:<slot>.<fn>"
(for consistency with Martin's lspci) and leaving it at that. We
can have a user-space pretty resource printer that cross-references
the /proc files to get nice device names. Otherwise, we'll always
have the hassle of keeping the kernel names in sync with the
userland names.

- There are PCI devices with additional resources that aren't covered
by the base address registers. They can be handled in the PCI fixup
code, but I'm not sure about where to put their resource structures.
The devices I know about like this don't use some/most of their base
address registers, so we could just use those unused structures??
Or will this cause trouble??

-- Dave

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