Re: [2/3] Use insert_resource in pci_claim_resource

From: Matthew Wilcox
Date: Fri Mar 19 2004 - 12:11:33 EST


On Fri, Mar 19, 2004 at 03:36:39PM +0000, Russell King wrote:
> On Fri, Mar 19, 2004 at 02:52:12PM +0000, Matthew Wilcox wrote:
> > But I do think insert_resource is the right call to make. If the device has
> > the wrong resources, that means something's gone awfully wrong earlier in
> > the pci code.
>
> Sure, but due to the request_resource semantics, it provides a good way
> to catch this should it occur.

Now that I try it, we lose. ACPI allows us an unlimited number of resources
that can be routed to each bus, and pci_bus only has space for 4. On my
rx2600 box, we have 5 resources pointing to bus 0x20:

# cat /proc/iomem /proc/ioports |grep :20
90000000-97ffffff : PCI Bus 0000:20
ff5e0000-ff5e0007 : PCI Bus 0000:20
ff5e2000-ff5e2007 : PCI Bus 0000:20
90004000000-90103fffffe : PCI Bus 0000:20
00002000-00002fff : PCI Bus 0000:20

Sure, you can argue that some of these should be coalesced and others
aren't used, but I'm not comfortable diddling with that in the kernel,
or asking firmware to change that. And nobody knows what tomorrow will
bring in terms of PCI bus topologies. So I'd like the insert_resource
patch to go in.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
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/