Re: 2.6.13-rc3-mm3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 02, 2005 at 08:48:21AM -0700, Linus Torvalds wrote:
> The problem with this is that it only papers over the bug. 
> 
> I don't mind trying to allocate at higher addresses per se: we used to
> have the starting point be 0x4000 at some point, and that part is fine.  
> The problem is that this also screws us if somebody has a PCI bridge with
> an IO window that is at a lower address than 0x2000 - now the PCI layer 
> will refuse to try to allocate within it, and you'll replace one bug by 
> another.

Right, and this hurts the cardbus as well...
But it should be pretty easy to learn the PCI layer to allocate above
PCIBIOS_MIN_IO _only_ when we allocate on the root bus.
Something like this (completely untested)?

Ivan.

--- linux/drivers/pci/setup-res.c.orig	Fri Jun 17 23:48:29 2005
+++ linux/drivers/pci/setup-res.c	Tue Aug  2 20:44:59 2005
@@ -113,11 +113,12 @@ int pci_assign_resource(struct pci_dev *
 {
 	struct pci_bus *bus = dev->bus;
 	struct resource *res = dev->resource + resno;
-	unsigned long size, min, align;
+	unsigned long size, min, align, min_io;
 	int ret;
 
+	min_io = (bus->self && !bus->self->transparent) ? 0 : PCIBIOS_MIN_IO;
 	size = res->end - res->start + 1;
-	min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
+	min = (res->flags & IORESOURCE_IO) ? min_io : PCIBIOS_MIN_MEM;
 	/* The bridge resources are special, as their
 	   size != alignment. Sizing routines return
 	   required alignment in the "start" field. */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux