![]() | ||||||||||
Messages in this thread |
On Thu, 27 Mar 2008, Benjamin Herrenschmidt wrote: > > > NOTE! This will also consider a bridge resource at 0 to be an invalid > > resource (since now the alignment will be zero), which is a bit odd and > > makes me worry a bit. I wouldn't be surprised if some non-PC architectures > > have PCI bridges at zero. But maybe they should be (or already are?) > > marked IORESOURCE_PCI_FIXED? > > PCI bridges at zero is perfectly valid indeed and I'm sure we have that > around at least for IO space. In fact, I'm surprised you don't have that > on x86. x86 has memory there, always has had, probably always will. Also, the reason I *think* this issue is ok is that I think the only PCI bus resources we can see in the whole pdev_sort_resources() mess is the ones that are behind the bus that we're not sizing for, and they've been set up by pbus_size_mem(). And pbus_size_mem() has this special magic setup where it calculates the size and the alignment of the bus resource, and then makes r->start = alignment; r->end = r->start + size - 1; so using "r->start" *should* be ok in this case because it really means "alignment" in this one case. That said, I'm not going to be willing to bet my life on it. I also wonder if we maybe should just add a separate "alignment" field to the resources. Rather than playing games like these (and having to compare the resource number to decide whether it is a bus resource or a normal PCI device resource), just adding the dang field would be a whole lot saner. I dunno. I'm not going to do anything in this area before 2.6.25 is out because this *does* make me a bit nervous, but if somebody wants to think about this and perhaps write patches for testing, that would be good. And once more: Ivan, can you again double-check my blatherings above? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | |||||||||
| Last update: 2008-03-26 22:37 [W:0.393 / U:0.100 seconds] ©2003-2008 Jasper Spaans | ||||||||||