On Mon, 2008-07-07 at 10:17 -0600, Grant Grundler wrote: > On Thu, Jul 03, 2008 at 01:24:29PM +1000, Benjamin Herrenschmidt wrote: > ... > > > Next, MSI requires that you assign a block of interrupts that is a power > > > of two in size (between 2^0 and 2^5), and aligned to at least that power > > > of two. > ... > > > One thing I do want to be clear in the API is that the driver can ask > > > for any number of irqs, the pci layer will round up to the next power of > > > two if necessary. > > > > Well, that's where I'm not happy. The API shouldn't expose the > > "power-of-two" thing. The numbers shown to drivers aren't in the same > > space as the source numbers as seen by the HW on many architectures and > > thus don't need to have the same constraints. > > The drivers have to deal with the limitations of the HW spec. > In this case it means they have to know they are getting power of 2 > number of interrupts. I think exposing this in the API is a requirement > and not optional. I don't think it's quite that strong. If a driver asked for 6 interrupts the MSI code could setup 8 and have 2 just hooked to nothing. I'm not sure that's a good idea, but it's possible. cheers -- Michael Ellerman OzLabs, IBM Australia Development Lab email: michaele@xxxxxxxxxx stime: ellerman@xxxxxxxxxxx notes: Michael Ellerman/Australia/IBM phone: +61 2 6212 1183 (tie line 70 21183) We do not inherit the earth from our ancestors, we borrow it from our children. - S.M.A.R.T Person -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html