lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 23 Dec 2013 10:19:41 -0700 From: Bjorn Helgaas <bhelgaas@...gle.com> To: Alexander Gordeev <agordeev@...hat.com> Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Michael Ellerman <michael@...erman.id.au>, Benjamin Herrenschmidt <benh@...nel.crashing.org>, Tejun Heo <tj@...nel.org>, Ben Hutchings <bhutchings@...arflare.com>, David Laight <David.Laight@...lab.com>, Mark Lord <kernel@...rt.ca>, "H. Peter Anvin" <hpa@...or.com>, "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org> Subject: Re: [PATCH v4 9/9] PCI/MSI: Introduce pci_auto_enable_msi*() family helpers On Mon, Dec 23, 2013 at 7:44 AM, Alexander Gordeev <agordeev@...hat.com> wrote: > On Tue, Dec 17, 2013 at 05:30:02PM -0700, Bjorn Helgaas wrote: >> > +int pci_auto_enable_msi_range(struct pci_dev *dev, struct msix_entry *entries, >> > + int minvec, int maxvec) > > [...] > >> > +If this function returns a positive number it indicates at least the >> > +returned number of MSI interrupts have been successfully allocated (it may >> > +have allocated more in order to satisfy the power-of-two requirement). >> >> I assume this means the return value may be larger than the "maxvec" >> requested, right? And the driver is free to use all the vectors up to the >> return value, even those above maxvec, right? > > No, the returned value may not be larger than the "maxvec" ever. This is just > paraphrasing the semantics of exisitng pci_enable_msi_block() interface - a > value written to MMC register might be larger than the returned value, but the > driver may not use the extra vectors it did not request. Then I think we should remove the "(it may have allocated more...)" text. If the driver can't use those extra vectors, they are an internal implementation detail, and mentioning them here will only cause confusion. The "at least" text should also be removed. From the driver's point of view, it can use exactly the number of interrupts returned. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists