[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B73B0@saturn3.aculab.com>
Date: Fri, 25 Oct 2013 10:10:02 +0100
From: "David Laight" <David.Laight@...LAB.COM>
To: "Mark Lord" <kernel@...rt.ca>,
"Alexander Gordeev" <agordeev@...hat.com>
Cc: "Tejun Heo" <tj@...nel.org>, <linux-kernel@...r.kernel.org>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
"Michael Ellerman" <michael@...erman.id.au>,
"Benjamin Herrenschmidt" <benh@...nel.crashing.org>,
"Ben Hutchings" <bhutchings@...arflare.com>,
"H. Peter Anvin" <hpa@...or.com>, <linux-pci@...r.kernel.org>
Subject: RE: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers
> > pcim_enable_msix_min_max(struct pci_dev *dev, struct msix_entry *entries,
> > unsigned int minvec, unsigned int maxvec);
>
> The hardware I have in mind here works only for powers of two.
> Eg. 16, 8, 4, 2, or 1 MSI-X vector. Not the odd values in between.
>
> But it appears I can still just use a loop for that case,
> calling the new function above instead of the old functions.
You'd either have to loop with min and max the same (starting at 16),
or do a single call with min=1 and max=16 and the release the
unwanted ones.
The latter might be preferred because it might stop an annoying
trace about the system not having enough MSI interrupts.
What this doesn't resolve is a driver requesting a lot of interrupts
early on and leaving none for later drivers.
Really the system needs to allocate the minimum number to all
drivers before giving out any extra ones - I've NFI how this
would be arranged!
David
Powered by blists - more mailing lists